]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
arm:omap2:spi device changes
authorGirish <girishsg@ti.com>
Tue, 29 Jan 2008 12:49:06 +0000 (18:19 +0530)
committerTony Lindgren <tony@atomide.com>
Wed, 30 Jan 2008 00:27:21 +0000 (16:27 -0800)
OMAP SPI device specific changes. Also, corrects SPI Clock name and id in clock34xx.

Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/configs/omap_3430sdp_defconfig
arch/arm/mach-omap2/clock34xx.h
arch/arm/mach-omap2/devices.c

index 8670b178eefdfff017ed376bc4e4484bc290fba0..08f3450cf4bc0a977929e6d2db04a1bf30137a4a 100644 (file)
@@ -554,7 +554,7 @@ CONFIG_KEYBOARD_TWL4030=y
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
 CONFIG_INPUT_TOUCHSCREEN=y
-# CONFIG_TOUCHSCREEN_ADS7846 is not set
+CONFIG_TOUCHSCREEN_ADS7846=y
 # CONFIG_INPUT_MISC is not set
 
 #
@@ -619,8 +619,13 @@ CONFIG_TWL4030_GPIO=y
 #
 # SPI support
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_OMAP24XX=y
 # CONFIG_W1 is not set
 # CONFIG_HWMON is not set
 CONFIG_MISC_DEVICES=y
index 229d34fa40efe027135a062f1557e04f1a734854..e2d31bcfee1fd9e4b0a44ce31e971dc9ec5776c4 100644 (file)
@@ -1123,7 +1123,8 @@ static struct clk core_48m_fck = {
 };
 
 static struct clk mcspi4_fck = {
-       .name           = "mcspi4_fck",
+       .name           = "mcspi_fck",
+       .id             = 4,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI4_SHIFT,
@@ -1132,7 +1133,8 @@ static struct clk mcspi4_fck = {
 };
 
 static struct clk mcspi3_fck = {
-       .name           = "mcspi3_fck",
+       .name           = "mcspi_fck",
+       .id             = 3,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI3_SHIFT,
@@ -1141,7 +1143,8 @@ static struct clk mcspi3_fck = {
 };
 
 static struct clk mcspi2_fck = {
-       .name           = "mcspi2_fck",
+       .name           = "mcspi_fck",
+       .id             = 2,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI2_SHIFT,
@@ -1150,7 +1153,8 @@ static struct clk mcspi2_fck = {
 };
 
 static struct clk mcspi1_fck = {
-       .name           = "mcspi1_fck",
+       .name           = "mcspi_fck",
+       .id             = 1,
        .parent         = &core_48m_fck,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI1_SHIFT,
@@ -1402,7 +1406,8 @@ static struct clk hdq_ick = {
 };
 
 static struct clk mcspi4_ick = {
-       .name           = "mcspi4_ick",
+       .name           = "mcspi_ick",
+       .id             = 4,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI4_SHIFT,
@@ -1411,7 +1416,8 @@ static struct clk mcspi4_ick = {
 };
 
 static struct clk mcspi3_ick = {
-       .name           = "mcspi3_ick",
+       .name           = "mcspi_ick",
+       .id             = 3,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI3_SHIFT,
@@ -1420,7 +1426,8 @@ static struct clk mcspi3_ick = {
 };
 
 static struct clk mcspi2_ick = {
-       .name           = "mcspi2_ick",
+       .name           = "mcspi_ick",
+       .id             = 2,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI2_SHIFT,
@@ -1429,7 +1436,8 @@ static struct clk mcspi2_ick = {
 };
 
 static struct clk mcspi1_ick = {
-       .name           = "mcspi1_ick",
+       .name           = "mcspi_ick",
+       .id             = 1,
        .parent         = &core_l4_ick,
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP3430_EN_MCSPI1_SHIFT,
index 87de30d194b0ba02d090de1bf99f2a92c847355f..4041fe5df1e61eb91f3aad85a83bffc4ccce892f 100644 (file)
@@ -134,6 +134,8 @@ static inline void omap_init_sti(void) {}
 
 #define OMAP2_MCSPI1_BASE              0x48098000
 #define OMAP2_MCSPI2_BASE              0x4809a000
+#define OMAP2_MCSPI3_BASE              0x480b8000
+#define OMAP2_MCSPI4_BASE              0x480ba000
 
 static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
        .num_cs         = 4,
@@ -179,10 +181,64 @@ struct platform_device omap2_mcspi2 = {
        },
 };
 
+#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
+static struct omap2_mcspi_platform_config omap2_mcspi3_config = {
+       .num_cs         = 2,
+};
+
+static struct resource omap2_mcspi3_resources[] = {
+       {
+       .start          = OMAP2_MCSPI3_BASE,
+       .end            = OMAP2_MCSPI3_BASE + 0xff,
+       .flags          = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device omap2_mcspi3 = {
+       .name           = "omap2_mcspi",
+       .id             = 3,
+       .num_resources  = ARRAY_SIZE(omap2_mcspi3_resources),
+       .resource       = omap2_mcspi3_resources,
+       .dev            = {
+               .platform_data = &omap2_mcspi3_config,
+       },
+};
+#endif
+
+#ifdef CONFIG_ARCH_OMAP3
+static struct omap2_mcspi_platform_config omap2_mcspi4_config = {
+       .num_cs         = 1,
+};
+
+static struct resource omap2_mcspi4_resources[] = {
+       {
+               .start          = OMAP2_MCSPI4_BASE,
+               .end            = OMAP2_MCSPI4_BASE + 0xff,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+struct platform_device omap2_mcspi4 = {
+       .name           = "omap2_mcspi",
+       .id             = 4,
+       .num_resources  = ARRAY_SIZE(omap2_mcspi4_resources),
+       .resource       = omap2_mcspi4_resources,
+       .dev            = {
+               .platform_data = &omap2_mcspi4_config,
+       },
+};
+#endif
+
 static void omap_init_mcspi(void)
 {
        platform_device_register(&omap2_mcspi1);
        platform_device_register(&omap2_mcspi2);
+#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
+       platform_device_register(&omap2_mcspi3);
+#endif
+#ifdef CONFIG_ARCH_OMAP3
+       platform_device_register(&omap2_mcspi4);
+#endif
 }
 
 #else