From: <dinguyen@opensource.altera.com>
To: p.zabel@pengutronix.de
Cc: dinh.linux@gmail.com, s.trumtrar@pengutronix.de,
grant.likely@linaro.org, robh+dt@kernel.org,
atull@opensource.altera.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dinh Nguyen <dinguyen@opensource.altera.com>
Subject: [PATCH] reset: socfpga: use arch_initcall for early initialization
Date: Wed, 8 Oct 2014 21:44:06 -0500 [thread overview]
Message-ID: <1412822646-11257-1-git-send-email-dinguyen@opensource.altera.com> (raw)
From: Dinh Nguyen <dinguyen@opensource.altera.com>
There are certain drivers that are required to get loaded very early using
arch_initcall. An example of such a driver is the SOCFPGA's FPGA bridge driver.
This driver has to get loaded early because it needs to enable FPGA components
that are connected to the bridge.
This FPGA bridge driver will using the reset controller API to toggle it's
reset bits, thus, it needs the reset driver to be loaded as early as possible
in order for it to get used properly.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
drivers/reset/reset-socfpga.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 79c32ca..a5e8d37 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -139,7 +139,20 @@ static struct platform_driver socfpga_reset_driver = {
.of_match_table = socfpga_reset_dt_ids,
},
};
-module_platform_driver(socfpga_reset_driver);
+
+static int __init socfpga_reset_init(void)
+{
+ return platform_driver_probe(&socfpga_reset_driver,
+ socfpga_reset_probe);
+}
+
+static void __exit socfpga_reset_exit(void)
+{
+ platform_driver_unregister(&socfpga_reset_driver);
+}
+
+arch_initcall(socfpga_reset_init);
+module_exit(socfpga_reset_exit);
MODULE_AUTHOR("Steffen Trumtrar <s.trumtrar@pengutronix.de");
MODULE_DESCRIPTION("Socfpga Reset Controller Driver");
--
2.0.3
next reply other threads:[~2014-10-09 2:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 2:44 dinguyen [this message]
[not found] ` <1412822646-11257-1-git-send-email-dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2014-10-09 9:03 ` [PATCH] reset: socfpga: use arch_initcall for early initialization Philipp Zabel
[not found] ` <1412845410.6809.3.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-10-09 13:16 ` Dinh Nguyen
[not found] ` <54368AA2.9000104-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2014-10-09 13:28 ` Steffen Trumtrar
2014-10-09 14:57 ` atull
2014-10-09 15:19 ` Steffen Trumtrar
[not found] ` <20141009151935.GK15799-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-10-10 16:32 ` atull
2014-10-14 18:45 ` atull
2014-10-15 10:02 ` Steffen Trumtrar
2014-10-15 13:53 ` Dinh Nguyen
2014-10-18 9:22 ` Arnd Bergmann
2014-10-12 14:30 ` Pavel Machek
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=1412822646-11257-1-git-send-email-dinguyen@opensource.altera.com \
--to=dinguyen@opensource.altera.com \
--cc=atull@opensource.altera.com \
--cc=devicetree@vger.kernel.org \
--cc=dinh.linux@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=s.trumtrar@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).