Re: [PATCH] reset: socfpga: use arch_initcall for early initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi!

> From: Dinh Nguyen <dinguyen@xxxxxxxxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxxxx>

> +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);

That is quite a strange combination. Driver can be module but needs to
be initialized early? Should we make it always built in?

>  MODULE_AUTHOR("Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx");
>  MODULE_DESCRIPTION("Socfpga Reset Controller Driver");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux