diff options
author | Kishore Kadiyala <kishore.kadiyala@ti.com> | 2011-03-01 16:12:56 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-01 16:12:56 -0500 |
commit | 6ab8946f672497a55625d2106250d2923125fdfb (patch) | |
tree | ccf86208fb9cf4f33d243c51bc01a915d593dfd9 | |
parent | 17203bdaf2fd0cda6ac941a7b3fb8416c57303c7 (diff) |
OMAP: hwmod data: Add dev_attr and use in the host driver
Add a device attribute to hwmod data of omap2430, omap3, omap4.
Currently the device attribute holds information regarding dual volt MMC card
support by the controller which will be later passed to the host driver via
platform data.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Acked-by: Benoit Cousson<b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mmc.h | 9 |
4 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 0d239e3a9801..ca25fa2af78f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <plat/gpio.h> | 20 | #include <plat/gpio.h> |
21 | #include <plat/mcspi.h> | 21 | #include <plat/mcspi.h> |
22 | #include <plat/dmtimer.h> | 22 | #include <plat/dmtimer.h> |
23 | #include <plat/mmc.h> | ||
23 | #include <plat/l3_2xxx.h> | 24 | #include <plat/l3_2xxx.h> |
24 | 25 | ||
25 | #include "omap_hwmod_common_data.h" | 26 | #include "omap_hwmod_common_data.h" |
@@ -2204,6 +2205,10 @@ static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = { | |||
2204 | &omap2430_l4_core__mmc1, | 2205 | &omap2430_l4_core__mmc1, |
2205 | }; | 2206 | }; |
2206 | 2207 | ||
2208 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
2209 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
2210 | }; | ||
2211 | |||
2207 | static struct omap_hwmod omap2430_mmc1_hwmod = { | 2212 | static struct omap_hwmod omap2430_mmc1_hwmod = { |
2208 | .name = "mmc1", | 2213 | .name = "mmc1", |
2209 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 2214 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2223,6 +2228,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = { | |||
2223 | .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT, | 2228 | .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT, |
2224 | }, | 2229 | }, |
2225 | }, | 2230 | }, |
2231 | .dev_attr = &mmc1_dev_attr, | ||
2226 | .slaves = omap2430_mmc1_slaves, | 2232 | .slaves = omap2430_mmc1_slaves, |
2227 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves), | 2233 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves), |
2228 | .class = &omap2430_mmc_class, | 2234 | .class = &omap2430_mmc_class, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 207ccfbac2e4..5fdcc1e9d4ac 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <plat/l4_3xxx.h> | 22 | #include <plat/l4_3xxx.h> |
23 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
24 | #include <plat/gpio.h> | 24 | #include <plat/gpio.h> |
25 | #include <plat/mmc.h> | ||
25 | #include <plat/smartreflex.h> | 26 | #include <plat/smartreflex.h> |
26 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
27 | #include <plat/dmtimer.h> | 28 | #include <plat/dmtimer.h> |
@@ -2944,6 +2945,10 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = { | |||
2944 | &omap3xxx_l4_core__mmc1, | 2945 | &omap3xxx_l4_core__mmc1, |
2945 | }; | 2946 | }; |
2946 | 2947 | ||
2948 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
2949 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
2950 | }; | ||
2951 | |||
2947 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { | 2952 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { |
2948 | .name = "mmc1", | 2953 | .name = "mmc1", |
2949 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, | 2954 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, |
@@ -2962,6 +2967,7 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = { | |||
2962 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, | 2967 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, |
2963 | }, | 2968 | }, |
2964 | }, | 2969 | }, |
2970 | .dev_attr = &mmc1_dev_attr, | ||
2965 | .slaves = omap3xxx_mmc1_slaves, | 2971 | .slaves = omap3xxx_mmc1_slaves, |
2966 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), | 2972 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), |
2967 | .class = &omap34xx_mmc_class, | 2973 | .class = &omap34xx_mmc_class, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 12fcd0a08207..9398c2db7258 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <plat/gpio.h> | 25 | #include <plat/gpio.h> |
26 | #include <plat/dma.h> | 26 | #include <plat/dma.h> |
27 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
28 | #include <plat/mmc.h> | ||
28 | 29 | ||
29 | #include "omap_hwmod_common_data.h" | 30 | #include "omap_hwmod_common_data.h" |
30 | 31 | ||
@@ -3383,6 +3384,7 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = { | |||
3383 | }; | 3384 | }; |
3384 | 3385 | ||
3385 | /* mmc1 */ | 3386 | /* mmc1 */ |
3387 | |||
3386 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { | 3388 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { |
3387 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, | 3389 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, |
3388 | }; | 3390 | }; |
@@ -3420,6 +3422,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = { | |||
3420 | &omap44xx_l4_per__mmc1, | 3422 | &omap44xx_l4_per__mmc1, |
3421 | }; | 3423 | }; |
3422 | 3424 | ||
3425 | /* mmc1 dev_attr */ | ||
3426 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
3427 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
3428 | }; | ||
3429 | |||
3423 | static struct omap_hwmod omap44xx_mmc1_hwmod = { | 3430 | static struct omap_hwmod omap44xx_mmc1_hwmod = { |
3424 | .name = "mmc1", | 3431 | .name = "mmc1", |
3425 | .class = &omap44xx_mmc_hwmod_class, | 3432 | .class = &omap44xx_mmc_hwmod_class, |
@@ -3433,6 +3440,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = { | |||
3433 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, | 3440 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, |
3434 | }, | 3441 | }, |
3435 | }, | 3442 | }, |
3443 | .dev_attr = &mmc1_dev_attr, | ||
3436 | .slaves = omap44xx_mmc1_slaves, | 3444 | .slaves = omap44xx_mmc1_slaves, |
3437 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves), | 3445 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves), |
3438 | .masters = omap44xx_mmc1_masters, | 3446 | .masters = omap44xx_mmc1_masters, |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index e5de5d452b3e..a7afab095716 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -43,6 +43,12 @@ | |||
43 | 43 | ||
44 | #define OMAP_MMC_MAX_SLOTS 2 | 44 | #define OMAP_MMC_MAX_SLOTS 2 |
45 | 45 | ||
46 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(1) | ||
47 | |||
48 | struct omap_mmc_dev_attr { | ||
49 | u8 flags; | ||
50 | }; | ||
51 | |||
46 | struct omap_mmc_platform_data { | 52 | struct omap_mmc_platform_data { |
47 | /* back-link to device */ | 53 | /* back-link to device */ |
48 | struct device *dev; | 54 | struct device *dev; |
@@ -71,6 +77,9 @@ struct omap_mmc_platform_data { | |||
71 | 77 | ||
72 | u64 dma_mask; | 78 | u64 dma_mask; |
73 | 79 | ||
80 | /* Integrating attributes from the omap_hwmod layer */ | ||
81 | u8 controller_flags; | ||
82 | |||
74 | /* Register offset deviation */ | 83 | /* Register offset deviation */ |
75 | u16 reg_offset; | 84 | u16 reg_offset; |
76 | 85 | ||