]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Move second I2C init on 24xx to mach-omap2/devices.c
authorTony Lindgren <tony@atomide.com>
Wed, 19 Oct 2005 19:54:42 +0000 (22:54 +0300)
committerTony Lindgren <tony@atomide.com>
Wed, 19 Oct 2005 19:54:42 +0000 (22:54 +0300)
Move second I2C init on 24xx to mach-omap2/devices.c

arch/arm/mach-omap2/Makefile
arch/arm/plat-omap/devices.c

index 8cf286dc7b4acd3d81077a1b0d88745f0b83779c..471d1d78314d9263b74743ebae7cb8d7f19b6287 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # Common support
-obj-y := irq.o io.o sram-fn.o clock.o mux.o serial.o
+obj-y := irq.o io.o sram-fn.o clock.o mux.o devices.o serial.o
 
 obj-$(CONFIG_OMAP_MPU_TIMER)           += timer-gp.o
 
index f199012c4a14a67a41189a1f275255c7f8a842d6..c9b37ccef674413673e923afd6eee4ea7b2d9ff5 100644 (file)
@@ -37,11 +37,9 @@ void omap_nop_release(struct device *dev)
 
 #define        OMAP1_I2C_BASE          0xfffb3800
 #define OMAP2_I2C_BASE1                0x48070000
-#define OMAP2_I2C_BASE2                0x48072000
 #define OMAP_I2C_SIZE          0x3f
 #define OMAP1_I2C_INT          INT_I2C
 #define OMAP2_I2C_INT1         56
-#define OMAP2_I2C_INT2         57
 
 static struct resource i2c_resources1[] = {
        {
@@ -67,32 +65,7 @@ static struct platform_device omap_i2c_device1 = {
        .resource       = i2c_resources1,
 };
 
-#ifdef CONFIG_ARCH_OMAP24XX
-static struct resource i2c_resources2[] = {
-       {
-               .start          = OMAP2_I2C_BASE2,
-               .end            = OMAP2_I2C_BASE2 + OMAP_I2C_SIZE,
-               .flags          = IORESOURCE_MEM,
-       },
-       {
-               .start          = OMAP2_I2C_INT2,
-               .flags          = IORESOURCE_IRQ,
-       },
-};
-
-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,
-};
-#else
-#define omap_i2c_device2       NULL
-#endif
-
+/* See also arch/arm/mach-omap2/devices.c for second I2C on 24xx */
 static void omap_init_i2c(void)
 {
        if (cpu_is_omap24xx()) {
@@ -112,20 +85,14 @@ static void omap_init_i2c(void)
        if (cpu_is_omap24xx()) {
                omap_cfg_reg(M19_24XX_I2C1_SCL);
                omap_cfg_reg(L15_24XX_I2C1_SDA);
-               omap_cfg_reg(J15_24XX_I2C2_SCL);
-               omap_cfg_reg(H19_24XX_I2C2_SDA);
        } else {
                omap_cfg_reg(I2C_SCL);
                omap_cfg_reg(I2C_SDA);
        }
 
        (void) platform_device_register(&omap_i2c_device1);
-
-       if (cpu_is_omap24xx())
-               (void) platform_device_register(&omap_i2c_device2);
 }
-#else
-static inline void omap_init_i2c(void) {}
+
 #endif
 
 /*-------------------------------------------------------------------------*/