Pull cpu-hotplug into release branch
[sfrench/cifs-2.6.git] / arch / arm / mach-omap2 / devices.c
index 7181edb89352fc21e06d2e4b6ce669c91b075932..fb7f91da1aad12d8f8682eff0dcb558d6f314916 100644 (file)
 #include <asm/arch/mux.h>
 #include <asm/arch/gpio.h>
 
-extern void omap_nop_release(struct device *dev);
-
-/*-------------------------------------------------------------------------*/
-
 #if    defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
 
 #define OMAP2_I2C_BASE2                0x48072000
@@ -49,9 +45,6 @@ static struct resource i2c_resources2[] = {
 static struct platform_device omap_i2c_device2 = {
         .name           = "i2c_omap",
         .id             = 2,
-        .dev = {
-                .release        = omap_nop_release,
-        },
        .num_resources  = ARRAY_SIZE(i2c_resources2),
        .resource       = i2c_resources2,
 };
@@ -74,6 +67,44 @@ static void omap_init_i2c(void) {}
 
 #endif
 
+#if defined(CONFIG_OMAP_STI)
+
+#define OMAP2_STI_BASE         IO_ADDRESS(0x48068000)
+#define OMAP2_STI_CHANNEL_BASE 0x54000000
+#define OMAP2_STI_IRQ          4
+
+static struct resource sti_resources[] = {
+       {
+               .start          = OMAP2_STI_BASE,
+               .end            = OMAP2_STI_BASE + 0x7ff,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP2_STI_CHANNEL_BASE,
+               .end            = OMAP2_STI_CHANNEL_BASE + SZ_64K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP2_STI_IRQ,
+               .flags          = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device sti_device = {
+       .name           = "sti",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(sti_resources),
+       .resource       = sti_resources,
+};
+
+static inline void omap_init_sti(void)
+{
+       platform_device_register(&sti_device);
+}
+#else
+static inline void omap_init_sti(void) {}
+#endif
+
 /*-------------------------------------------------------------------------*/
 
 static int __init omap2_init_devices(void)
@@ -82,6 +113,7 @@ static int __init omap2_init_devices(void)
         * in alphabetical order so they're easier to sort through.
         */
        omap_init_i2c();
+       omap_init_sti();
 
        return 0;
 }