]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Xilinx: ARM: Make L2 cache init early_initcall.
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Fri, 29 Jun 2012 10:55:26 +0000 (03:55 -0700)
committerJohn Linn <john.linn@xilinx.com>
Wed, 22 Aug 2012 16:53:31 +0000 (09:53 -0700)
Enable the caches as early as possible to decrease boot time.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
arch/arm/mach-zynq/common.c

index 9a8b872f0886ff8e39e0d779741dea704dde7ded..166009bae3475c455e7d66b05db3b1668159bdb4 100644 (file)
@@ -40,28 +40,6 @@ static struct of_device_id zynq_of_bus_ids[] __initdata = {
        {}
 };
 
-/**
- * xilinx_init_machine() - System specific initialization, intended to be
- *                        called from board specific initialization.
- */
-void __init xilinx_init_machine(void)
-{
-       of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL);
-
-#ifdef CONFIG_CACHE_L2X0
-       /*
-        * 64KB way size, 8-way associativity, parity disabled, prefetching option
-        */
-#ifndef        CONFIG_XILINX_L2_PREFETCH
-       l2x0_of_init(0x02060000, 0xF0F0FFFF);
-#else
-       l2x0_of_init(0x72060000, 0xF0F0FFFF);
-#endif
-#endif
-
-       platform_device_init();
-}
-
 static const struct of_device_id xilinx_dt_irq_match[] __initconst = {
        { .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
        { }
@@ -136,3 +114,27 @@ void __init xilinx_memory_init()
        memblock_reserve(0, 0x4000);
 #endif
 }
+
+#ifdef CONFIG_CACHE_L2X0
+static int __init xilinx_l2c_init(void)
+{
+       /* 64KB way size, 8-way associativity, parity disabled,
+        * prefetching option */
+#ifndef        CONFIG_XILINX_L2_PREFETCH
+       return l2x0_of_init(0x02060000, 0xF0F0FFFF);
+#else
+       return l2x0_of_init(0x72060000, 0xF0F0FFFF);
+#endif
+}
+early_initcall(xilinx_l2c_init);
+#endif
+
+/**
+ * xilinx_init_machine() - System specific initialization, intended to be
+ *                        called from board specific initialization.
+ */
+void __init xilinx_init_machine(void)
+{
+       of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL);
+       platform_device_init();
+}