提交 2f809985 编写于 作者: A Alexandre Bounine 提交者: Linus Torvalds

rapidio: modify subsystem and driver initialization sequence

Subsystem initialization sequence modified to support presence of multiple
RapidIO controllers in the system.  The new sequence is compatible with
initialization of PCI devices.
Signed-off-by: NAlexandre Bounine <alexandre.bounine@idt.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Thomas Moll <thomas.moll@sysgo.com>
Cc: Micha Nelissen <micha@neli.hopto.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 388b78ad
...@@ -1574,18 +1574,10 @@ int fsl_rio_setup(struct platform_device *dev) ...@@ -1574,18 +1574,10 @@ int fsl_rio_setup(struct platform_device *dev)
*/ */
static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev)
{ {
int rc;
printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
dev->dev.of_node->full_name); dev->dev.of_node->full_name);
rc = fsl_rio_setup(dev); return fsl_rio_setup(dev);
if (rc)
goto out;
/* Enumerate all registered ports */
rc = rio_init_mports();
out:
return rc;
}; };
static const struct of_device_id fsl_of_rio_rpn_ids[] = { static const struct of_device_id fsl_of_rio_rpn_ids[] = {
......
...@@ -571,5 +571,5 @@ static void __exit rionet_exit(void) ...@@ -571,5 +571,5 @@ static void __exit rionet_exit(void)
rio_unregister_driver(&rionet_driver); rio_unregister_driver(&rionet_driver);
} }
module_init(rionet_init); late_initcall(rionet_init);
module_exit(rionet_exit); module_exit(rionet_exit);
...@@ -1134,8 +1134,6 @@ static int __devinit rio_init(void) ...@@ -1134,8 +1134,6 @@ static int __devinit rio_init(void)
return 0; return 0;
} }
device_initcall(rio_init);
int __devinit rio_init_mports(void) int __devinit rio_init_mports(void)
{ {
int rc = 0; int rc = 0;
...@@ -1158,10 +1156,14 @@ int __devinit rio_init_mports(void) ...@@ -1158,10 +1156,14 @@ int __devinit rio_init_mports(void)
rio_disc_mport(port); rio_disc_mport(port);
} }
rio_init();
out: out:
return rc; return rc;
} }
device_initcall_sync(rio_init_mports);
void rio_register_mport(struct rio_mport *port) void rio_register_mport(struct rio_mport *port)
{ {
list_add_tail(&port->node, &rio_mports); list_add_tail(&port->node, &rio_mports);
......
...@@ -395,7 +395,6 @@ union rio_pw_msg { ...@@ -395,7 +395,6 @@ union rio_pw_msg {
}; };
/* Architecture and hardware-specific functions */ /* Architecture and hardware-specific functions */
extern int rio_init_mports(void);
extern void rio_register_mport(struct rio_mport *); extern void rio_register_mport(struct rio_mport *);
extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int);
extern void rio_close_inb_mbox(struct rio_mport *, int); extern void rio_close_inb_mbox(struct rio_mport *, int);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册