]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: OMAP2+: Change core_initcall levels to postcore_initcall
authorTony Lindgren <tony@atomide.com>
Thu, 3 Dec 2015 19:38:09 +0000 (11:38 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 3 Dec 2015 19:38:09 +0000 (11:38 -0800)
We want to be able to probe a few selected device drivers before hwmod
code populates the clocks in omap_hwmod_setup_all(). This allows us to
convert most of the clock drivers into regular device drivers.

We only need a few minimal clock drivers early for the system timers to
select between the 32KiHz clock and the high frequency oscillator.

With these changes, initializing the clock drivers can be just done at
core_initcall time with something like:

np = of_find_node_by_name(NULL, "plls");
if (np)
of_platform_populate(np, NULL, NULL, NULL);

And then these clocks will be available for the interconnect code to use.

Having most of the clock drivers being regular device drivers allows
us to use the nice things like devm_* functions and dev_err and dev_dbg.
As an extra bonus, this also allows us to develop the clock drivers for
new SoCs as loadable modules initially for cases where we can boot up
the system based on the bootloader configured clocks.

To do this, let's change the core_initcalls to postcore_initcall under
mach-omap2.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap2-restart.c
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/serial.c

index d937b2e4040be2dcb45a70ff0ca1e591c0b4c3bc..497269db882b8931543df52a8651292b750243e7 100644 (file)
@@ -62,4 +62,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
 
        return 0;
 }
-omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
+omap_postcore_initcall(omap2xxx_common_look_up_clks_for_reset);
index 72ebc4c16bae7e55a69775b02bfc534b9c56fda4..3750ed14f8c57f538efc5fc5bd633c5a19db2c9e 100644 (file)
@@ -869,7 +869,7 @@ static int __init omap_device_init(void)
        bus_register_notifier(&platform_bus_type, &platform_nb);
        return 0;
 }
-omap_core_initcall(omap_device_init);
+omap_postcore_initcall(omap_device_init);
 
 /**
  * omap_device_late_idle - idle devices without drivers
index cc8a987149e2737db4bf255075d5baf3bc2b2bb0..49d537641370bcec4fa961b23730d91f0e4bb8c2 100644 (file)
@@ -3307,7 +3307,7 @@ static int __init omap_hwmod_setup_all(void)
 
        return 0;
 }
-omap_core_initcall(omap_hwmod_setup_all);
+omap_postcore_initcall(omap_hwmod_setup_all);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
index 5fb50fe541539c1b1a182c480c54cf21cb47d03f..f164c6b32ce2b467e5caf2acbcdd335f6f5930c8 100644 (file)
@@ -213,7 +213,7 @@ static int __init omap_serial_early_init(void)
 
        return 0;
 }
-omap_core_initcall(omap_serial_early_init);
+omap_postcore_initcall(omap_serial_early_init);
 
 /**
  * omap_serial_init_port() - initialize single serial port