Commit bbd39a40 authored by Girish's avatar Girish Committed by Tony Lindgren

arm:omap2:spi device changes

OMAP SPI device specific changes. Also, corrects SPI Clock name and id in clock34xx.
Signed-off-by: default avatarGirish S G <girishsg@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 9d49df73
...@@ -554,7 +554,7 @@ CONFIG_KEYBOARD_TWL4030=y ...@@ -554,7 +554,7 @@ CONFIG_KEYBOARD_TWL4030=y
# CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set CONFIG_TOUCHSCREEN_ADS7846=y
# CONFIG_INPUT_MISC is not set # CONFIG_INPUT_MISC is not set
# #
...@@ -619,8 +619,13 @@ CONFIG_TWL4030_GPIO=y ...@@ -619,8 +619,13 @@ CONFIG_TWL4030_GPIO=y
# #
# SPI support # SPI support
# #
# CONFIG_SPI is not set CONFIG_SPI=y
# CONFIG_SPI_MASTER is not set CONFIG_SPI_MASTER=y
#
# SPI Master Controller Drivers
#
CONFIG_SPI_OMAP24XX=y
# CONFIG_W1 is not set # CONFIG_W1 is not set
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_MISC_DEVICES=y CONFIG_MISC_DEVICES=y
......
...@@ -1123,7 +1123,8 @@ static struct clk core_48m_fck = { ...@@ -1123,7 +1123,8 @@ static struct clk core_48m_fck = {
}; };
static struct clk mcspi4_fck = { static struct clk mcspi4_fck = {
.name = "mcspi4_fck", .name = "mcspi_fck",
.id = 4,
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCSPI4_SHIFT, .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
...@@ -1132,7 +1133,8 @@ static struct clk mcspi4_fck = { ...@@ -1132,7 +1133,8 @@ static struct clk mcspi4_fck = {
}; };
static struct clk mcspi3_fck = { static struct clk mcspi3_fck = {
.name = "mcspi3_fck", .name = "mcspi_fck",
.id = 3,
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCSPI3_SHIFT, .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
...@@ -1141,7 +1143,8 @@ static struct clk mcspi3_fck = { ...@@ -1141,7 +1143,8 @@ static struct clk mcspi3_fck = {
}; };
static struct clk mcspi2_fck = { static struct clk mcspi2_fck = {
.name = "mcspi2_fck", .name = "mcspi_fck",
.id = 2,
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCSPI2_SHIFT, .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
...@@ -1150,7 +1153,8 @@ static struct clk mcspi2_fck = { ...@@ -1150,7 +1153,8 @@ static struct clk mcspi2_fck = {
}; };
static struct clk mcspi1_fck = { static struct clk mcspi1_fck = {
.name = "mcspi1_fck", .name = "mcspi_fck",
.id = 1,
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCSPI1_SHIFT, .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
...@@ -1402,7 +1406,8 @@ static struct clk hdq_ick = { ...@@ -1402,7 +1406,8 @@ static struct clk hdq_ick = {
}; };
static struct clk mcspi4_ick = { static struct clk mcspi4_ick = {
.name = "mcspi4_ick", .name = "mcspi_ick",
.id = 4,
.parent = &core_l4_ick, .parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCSPI4_SHIFT, .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
...@@ -1411,7 +1416,8 @@ static struct clk mcspi4_ick = { ...@@ -1411,7 +1416,8 @@ static struct clk mcspi4_ick = {
}; };
static struct clk mcspi3_ick = { static struct clk mcspi3_ick = {
.name = "mcspi3_ick", .name = "mcspi_ick",
.id = 3,
.parent = &core_l4_ick, .parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCSPI3_SHIFT, .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
...@@ -1420,7 +1426,8 @@ static struct clk mcspi3_ick = { ...@@ -1420,7 +1426,8 @@ static struct clk mcspi3_ick = {
}; };
static struct clk mcspi2_ick = { static struct clk mcspi2_ick = {
.name = "mcspi2_ick", .name = "mcspi_ick",
.id = 2,
.parent = &core_l4_ick, .parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCSPI2_SHIFT, .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
...@@ -1429,7 +1436,8 @@ static struct clk mcspi2_ick = { ...@@ -1429,7 +1436,8 @@ static struct clk mcspi2_ick = {
}; };
static struct clk mcspi1_ick = { static struct clk mcspi1_ick = {
.name = "mcspi1_ick", .name = "mcspi_ick",
.id = 1,
.parent = &core_l4_ick, .parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCSPI1_SHIFT, .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
......
...@@ -134,6 +134,8 @@ static inline void omap_init_sti(void) {} ...@@ -134,6 +134,8 @@ static inline void omap_init_sti(void) {}
#define OMAP2_MCSPI1_BASE 0x48098000 #define OMAP2_MCSPI1_BASE 0x48098000
#define OMAP2_MCSPI2_BASE 0x4809a000 #define OMAP2_MCSPI2_BASE 0x4809a000
#define OMAP2_MCSPI3_BASE 0x480b8000
#define OMAP2_MCSPI4_BASE 0x480ba000
static struct omap2_mcspi_platform_config omap2_mcspi1_config = { static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
.num_cs = 4, .num_cs = 4,
...@@ -179,10 +181,64 @@ struct platform_device omap2_mcspi2 = { ...@@ -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) static void omap_init_mcspi(void)
{ {
platform_device_register(&omap2_mcspi1); platform_device_register(&omap2_mcspi1);
platform_device_register(&omap2_mcspi2); 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 #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment