Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
[pandora-kernel.git] / arch / arm / plat-omap / devices.c
index a64b692..30b5db7 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
-#include <mach/tc.h>
-#include <mach/control.h>
-#include <mach/board.h>
-#include <mach/mmc.h>
-#include <mach/mux.h>
+#include <plat/tc.h>
+#include <plat/control.h>
+#include <plat/board.h>
+#include <plat/mmc.h>
+#include <plat/mux.h>
 #include <mach/gpio.h>
-#include <mach/menelaus.h>
-#include <mach/mcbsp.h>
-#include <mach/dsp_common.h>
+#include <plat/menelaus.h>
+#include <plat/mcbsp.h>
+#include <plat/dsp_common.h>
 
 #if    defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
 
@@ -113,17 +113,17 @@ static void omap_init_kp(void)
                omap_cfg_reg(E19_1610_KBR4);
                omap_cfg_reg(N19_1610_KBR5);
        } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) {
-               omap_cfg_reg(E2_730_KBR0);
-               omap_cfg_reg(J7_730_KBR1);
-               omap_cfg_reg(E1_730_KBR2);
-               omap_cfg_reg(F3_730_KBR3);
-               omap_cfg_reg(D2_730_KBR4);
-
-               omap_cfg_reg(C2_730_KBC0);
-               omap_cfg_reg(D3_730_KBC1);
-               omap_cfg_reg(E4_730_KBC2);
-               omap_cfg_reg(F4_730_KBC3);
-               omap_cfg_reg(E3_730_KBC4);
+               omap_cfg_reg(E2_7XX_KBR0);
+               omap_cfg_reg(J7_7XX_KBR1);
+               omap_cfg_reg(E1_7XX_KBR2);
+               omap_cfg_reg(F3_7XX_KBR3);
+               omap_cfg_reg(D2_7XX_KBR4);
+
+               omap_cfg_reg(C2_7XX_KBC0);
+               omap_cfg_reg(D3_7XX_KBC1);
+               omap_cfg_reg(E4_7XX_KBC2);
+               omap_cfg_reg(F4_7XX_KBC3);
+               omap_cfg_reg(E3_7XX_KBC4);
        } else if (machine_is_omap_h4()) {
                omap_cfg_reg(T19_24XX_KBR0);
                omap_cfg_reg(R19_24XX_KBR1);
@@ -242,6 +242,39 @@ fail:
 
 /*-------------------------------------------------------------------------*/
 
+#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
+
+#ifdef CONFIG_ARCH_OMAP24XX
+#define        OMAP_RNG_BASE           0x480A0000
+#else
+#define        OMAP_RNG_BASE           0xfffe5000
+#endif
+
+static struct resource rng_resources[] = {
+       {
+               .start          = OMAP_RNG_BASE,
+               .end            = OMAP_RNG_BASE + 0x4f,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device omap_rng_device = {
+       .name           = "omap_rng",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(rng_resources),
+       .resource       = rng_resources,
+};
+
+static void omap_init_rng(void)
+{
+       (void) platform_device_register(&omap_rng_device);
+}
+#else
+static inline void omap_init_rng(void) {}
+#endif
+
+/*-------------------------------------------------------------------------*/
+
 /* Numbering for the SPI-capable controllers when used for SPI:
  * spi         = 1
  * uwire       = 2
@@ -324,39 +357,6 @@ static void omap_init_wdt(void)
 static inline void omap_init_wdt(void) {}
 #endif
 
-/*-------------------------------------------------------------------------*/
-
-#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
-
-#ifdef CONFIG_ARCH_OMAP24XX
-#define        OMAP_RNG_BASE           0x480A0000
-#else
-#define        OMAP_RNG_BASE           0xfffe5000
-#endif
-
-static struct resource rng_resources[] = {
-       {
-               .start          = OMAP_RNG_BASE,
-               .end            = OMAP_RNG_BASE + 0x4f,
-               .flags          = IORESOURCE_MEM,
-       },
-};
-
-static struct platform_device omap_rng_device = {
-       .name      = "omap_rng",
-       .id          = -1,
-       .num_resources  = ARRAY_SIZE(rng_resources),
-       .resource       = rng_resources,
-};
-
-static void omap_init_rng(void)
-{
-       (void) platform_device_register(&omap_rng_device);
-}
-#else
-static inline void omap_init_rng(void) {}
-#endif
-
 /*
  * This gets called after board-specific INIT_MACHINE, and initializes most
  * on-chip peripherals accessible on this board (except for few like USB):
@@ -384,9 +384,9 @@ static int __init omap_init_devices(void)
         */
        omap_init_dsp();
        omap_init_kp();
+       omap_init_rng();
        omap_init_uwire();
        omap_init_wdt();
-       omap_init_rng();
        return 0;
 }
 arch_initcall(omap_init_devices);