From: Alexandre Bounine <alexandre.bounine@idt.com>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Cc: Alexandre Bounine <alexandre.bounine@idt.com>,
Thomas Moll <thomas.moll@sysgo.com>
Subject: [PATCH 3/5] RapidIO: Modify subsystem and driver initialization sequence
Date: Mon, 28 Feb 2011 15:51:03 -0500 [thread overview]
Message-ID: <1298926265-5381-4-git-send-email-alexandre.bounine@idt.com> (raw)
In-Reply-To: <1298926265-5381-1-git-send-email-alexandre.bounine@idt.com>
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: Alexandre Bounine <alexandre.bounine@idt.com>
---
arch/powerpc/sysdev/fsl_rio.c | 10 +---------
drivers/net/rionet.c | 2 +-
drivers/rapidio/rio.c | 6 ++++--
include/linux/rio.h | 1 -
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 4c28226..6995907 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1575,18 +1575,10 @@ err_ops:
static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev,
const struct of_device_id *match)
{
- int rc;
printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
dev->dev.of_node->full_name);
- rc = fsl_rio_setup(dev);
- if (rc)
- goto out;
-
- /* Enumerate all registered ports */
- rc = rio_init_mports();
-out:
- return rc;
+ return fsl_rio_setup(dev);
};
static const struct of_device_id fsl_of_rio_rpn_ids[] = {
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index 678e577..26afbaa 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -571,5 +571,5 @@ static void __exit rionet_exit(void)
rio_unregister_driver(&rionet_driver);
}
-module_init(rionet_init);
+late_initcall(rionet_init);
module_exit(rionet_exit);
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index d520dba..f861b72 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1134,8 +1134,6 @@ static int __devinit rio_init(void)
return 0;
}
-device_initcall(rio_init);
-
int __devinit rio_init_mports(void)
{
int rc = 0;
@@ -1158,10 +1156,14 @@ int __devinit rio_init_mports(void)
rio_disc_mport(port);
}
+ rio_init();
+
out:
return rc;
}
+device_initcall_sync(rio_init_mports);
+
void rio_register_mport(struct rio_mport *port)
{
list_add_tail(&port->node, &rio_mports);
diff --git a/include/linux/rio.h b/include/linux/rio.h
index efed116..b6bcb16 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -395,7 +395,6 @@ union rio_pw_msg {
};
/* Architecture and hardware-specific functions */
-extern int rio_init_mports(void);
extern void rio_register_mport(struct rio_mport *);
extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int);
extern void rio_close_inb_mbox(struct rio_mport *, int);
--
1.7.3.1
next prev parent reply other threads:[~2011-02-28 20:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 20:51 [PATCH 0/5] RapidIO: configuration and initialization changes Alexandre Bounine
2011-02-28 20:51 ` [PATCH 1/5] RapidIO: Add architecture specific callbacks Alexandre Bounine
2011-02-28 20:51 ` [PATCH 2/5] RapidIO: Modify configuration to support PCI-SRIO controller Alexandre Bounine
2011-02-28 20:51 ` Alexandre Bounine [this message]
2011-02-28 20:51 ` [PATCH 4/5] RapidIO: Modify mport ID assignment Alexandre Bounine
2011-02-28 20:51 ` [PATCH 5/5] RapidIO: remove mport resource reservation from common RIO code Alexandre Bounine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298926265-5381-4-git-send-email-alexandre.bounine@idt.com \
--to=alexandre.bounine@idt.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=thomas.moll@sysgo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox