diff options
Diffstat (limited to 'arch')
22 files changed, 62 insertions, 210 deletions
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index e1362ce48497..7119ef28e0ad 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -13,12 +13,11 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | 16 | #include <linux/platform_data/gpio-omap.h> | |
17 | #include <linux/i2c/tps65010.h> | 17 | #include <linux/i2c/tps65010.h> |
18 | 18 | ||
19 | #include <plat/mmc.h> | ||
20 | |||
21 | #include "board-h2.h" | 19 | #include "board-h2.h" |
20 | #include "mmc.h" | ||
22 | 21 | ||
23 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | 22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
24 | 23 | ||
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c b/arch/arm/mach-omap1/board-h3-mmc.c index c74daace8cd6..17d77914d769 100644 --- a/arch/arm/mach-omap1/board-h3-mmc.c +++ b/arch/arm/mach-omap1/board-h3-mmc.c | |||
@@ -16,9 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/i2c/tps65010.h> | 17 | #include <linux/i2c/tps65010.h> |
18 | 18 | ||
19 | #include <plat/mmc.h> | ||
20 | |||
21 | #include "board-h3.h" | 19 | #include "board-h3.h" |
20 | #include "mmc.h" | ||
22 | 21 | ||
23 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | 22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
24 | 23 | ||
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 87ab2086ef96..f23200ceb43d 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
44 | 44 | ||
45 | #include <mach/omap7xx.h> | 45 | #include <mach/omap7xx.h> |
46 | #include <plat/mmc.h> | 46 | #include "mmc.h" |
47 | 47 | ||
48 | #include <mach/irqs.h> | 48 | #include <mach/irqs.h> |
49 | #include <mach/usb.h> | 49 | #include <mach/usb.h> |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index db5f7d2976e7..411cc5b14ce3 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -36,13 +36,13 @@ | |||
36 | #include <plat/fpga.h> | 36 | #include <plat/fpga.h> |
37 | #include <plat/tc.h> | 37 | #include <plat/tc.h> |
38 | #include <linux/platform_data/keypad-omap.h> | 38 | #include <linux/platform_data/keypad-omap.h> |
39 | #include <plat/mmc.h> | ||
40 | 39 | ||
41 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
42 | #include <mach/usb.h> | 41 | #include <mach/usb.h> |
43 | 42 | ||
44 | #include "iomap.h" | 43 | #include "iomap.h" |
45 | #include "common.h" | 44 | #include "common.h" |
45 | #include "mmc.h" | ||
46 | 46 | ||
47 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 47 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
48 | #define INNOVATOR1610_ETHR_START 0x04000300 | 48 | #define INNOVATOR1610_ETHR_START 0x04000300 |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 7d5c06d6a52a..cb72f2474430 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -29,13 +29,13 @@ | |||
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | 30 | ||
31 | #include <mach/mux.h> | 31 | #include <mach/mux.h> |
32 | #include <plat/mmc.h> | ||
33 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
34 | 33 | ||
35 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
36 | #include <mach/usb.h> | 35 | #include <mach/usb.h> |
37 | 36 | ||
38 | #include "common.h" | 37 | #include "common.h" |
38 | #include "mmc.h" | ||
39 | 39 | ||
40 | #define ADS7846_PENDOWN_GPIO 15 | 40 | #define ADS7846_PENDOWN_GPIO 15 |
41 | 41 | ||
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c index 5932d56e17bf..4fcf19c78a08 100644 --- a/arch/arm/mach-omap1/board-sx1-mmc.c +++ b/arch/arm/mach-omap1/board-sx1-mmc.c | |||
@@ -16,9 +16,10 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include <plat/mmc.h> | ||
20 | #include <mach/board-sx1.h> | 19 | #include <mach/board-sx1.h> |
21 | 20 | ||
21 | #include "mmc.h" | ||
22 | |||
22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | 23 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
23 | 24 | ||
24 | static int mmc_set_power(struct device *dev, int slot, int power_on, | 25 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index d3fec92c54cb..f85836ae6691 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <plat/tc.h> | 22 | #include <plat/tc.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include <plat/dma.h> | 24 | #include <plat/dma.h> |
25 | #include <plat/mmc.h> | ||
26 | 25 | ||
27 | #include <mach/omap7xx.h> | 26 | #include <mach/omap7xx.h> |
28 | #include <mach/camera.h> | 27 | #include <mach/camera.h> |
@@ -30,6 +29,7 @@ | |||
30 | 29 | ||
31 | #include "common.h" | 30 | #include "common.h" |
32 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "mmc.h" | ||
33 | 33 | ||
34 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) | 34 | #if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) |
35 | 35 | ||
diff --git a/arch/arm/mach-omap1/mmc.h b/arch/arm/mach-omap1/mmc.h new file mode 100644 index 000000000000..39c2b13de884 --- /dev/null +++ b/arch/arm/mach-omap1/mmc.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #include <linux/mmc/host.h> | ||
2 | #include <linux/platform_data/mmc-omap.h> | ||
3 | |||
4 | #define OMAP15XX_NR_MMC 1 | ||
5 | #define OMAP16XX_NR_MMC 2 | ||
6 | #define OMAP1_MMC_SIZE 0x080 | ||
7 | #define OMAP1_MMC1_BASE 0xfffb7800 | ||
8 | #define OMAP1_MMC2_BASE 0xfffb7c00 /* omap16xx only */ | ||
9 | |||
10 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
11 | void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
12 | int nr_controllers); | ||
13 | #else | ||
14 | static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
15 | int nr_controllers) | ||
16 | { | ||
17 | } | ||
18 | #endif | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 3669c120c7e8..2ab267ec3b75 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #include "common.h" | 36 | #include "common.h" |
37 | #include <plat/usb.h> | 37 | #include <plat/usb.h> |
38 | #include <plat/mmc.h> | ||
39 | #include "omap4-keypad.h" | 38 | #include "omap4-keypad.h" |
40 | #include <video/omapdss.h> | 39 | #include <video/omapdss.h> |
41 | #include <video/omap-panel-nokia-dsi.h> | 40 | #include <video/omap-panel-nokia-dsi.h> |
@@ -45,6 +44,7 @@ | |||
45 | 44 | ||
46 | #include "soc.h" | 45 | #include "soc.h" |
47 | #include "mux.h" | 46 | #include "mux.h" |
47 | #include "mmc.h" | ||
48 | #include "hsmmc.h" | 48 | #include "hsmmc.h" |
49 | #include "control.h" | 49 | #include "control.h" |
50 | #include "common-board-devices.h" | 50 | #include "common-board-devices.h" |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index d95f727ca39a..f865ace5cf85 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include "common.h" | 30 | #include "common.h" |
31 | #include <plat/menelaus.h> | 31 | #include <plat/menelaus.h> |
32 | #include <plat/mmc.h> | 32 | #include "mmc.h" |
33 | 33 | ||
34 | #include "mux.h" | 34 | #include "mux.h" |
35 | 35 | ||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index bfcd397e233c..e9ce9fb9ffac 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -40,10 +40,10 @@ | |||
40 | 40 | ||
41 | #include "common.h" | 41 | #include "common.h" |
42 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
43 | #include <plat/mmc.h> | ||
44 | #include <video/omap-panel-tfp410.h> | 43 | #include <video/omap-panel-tfp410.h> |
45 | 44 | ||
46 | #include "soc.h" | 45 | #include "soc.h" |
46 | #include "mmc.h" | ||
47 | #include "hsmmc.h" | 47 | #include "hsmmc.h" |
48 | #include "control.h" | 48 | #include "control.h" |
49 | #include "mux.h" | 49 | #include "mux.h" |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 45997bfbcbd2..f4b3c288e16b 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -23,13 +23,13 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <plat/i2c.h> | 25 | #include <plat/i2c.h> |
26 | #include <plat/mmc.h> | ||
27 | #include <plat/usb.h> | 26 | #include <plat/usb.h> |
28 | #include <plat/gpmc.h> | 27 | #include <plat/gpmc.h> |
29 | #include "common.h" | 28 | #include "common.h" |
30 | #include <plat/serial.h> | 29 | #include <plat/serial.h> |
31 | 30 | ||
32 | #include "mux.h" | 31 | #include "mux.h" |
32 | #include "mmc.h" | ||
33 | #include "hsmmc.h" | 33 | #include "hsmmc.h" |
34 | #include "sdram-nokia.h" | 34 | #include "sdram-nokia.h" |
35 | #include "common-board-devices.h" | 35 | #include "common-board-devices.h" |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 4d3a6324155f..ec6c2230cb38 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -17,11 +17,11 @@ | |||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | #include <linux/platform_data/gpio-omap.h> | 18 | #include <linux/platform_data/gpio-omap.h> |
19 | 19 | ||
20 | #include <plat/mmc.h> | ||
21 | #include <plat/omap-pm.h> | 20 | #include <plat/omap-pm.h> |
22 | #include <plat/omap_device.h> | 21 | #include <plat/omap_device.h> |
23 | 22 | ||
24 | #include "mux.h" | 23 | #include "mux.h" |
24 | #include "mmc.h" | ||
25 | #include "hsmmc.h" | 25 | #include "hsmmc.h" |
26 | #include "control.h" | 26 | #include "control.h" |
27 | 27 | ||
diff --git a/arch/arm/mach-omap2/mmc.h b/arch/arm/mach-omap2/mmc.h new file mode 100644 index 000000000000..0cd4b089da9c --- /dev/null +++ b/arch/arm/mach-omap2/mmc.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <linux/mmc/host.h> | ||
2 | #include <linux/platform_data/mmc-omap.h> | ||
3 | |||
4 | #define OMAP24XX_NR_MMC 2 | ||
5 | #define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE | ||
6 | #define OMAP2_MMC1_BASE 0x4809c000 | ||
7 | |||
8 | #define OMAP4_MMC_REG_OFFSET 0x100 | ||
9 | |||
10 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
11 | void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data); | ||
12 | #else | ||
13 | static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) | ||
14 | { | ||
15 | } | ||
16 | #endif | ||
17 | |||
18 | struct omap_hwmod; | ||
19 | int omap_msdi_reset(struct omap_hwmod *oh); | ||
20 | |||
21 | /* called from board-specific card detection service routine */ | ||
22 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, | ||
23 | int is_closed); | ||
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c index 9e57b4aadb06..a6020d750431 100644 --- a/arch/arm/mach-omap2/msdi.c +++ b/arch/arm/mach-omap2/msdi.c | |||
@@ -27,11 +27,11 @@ | |||
27 | 27 | ||
28 | #include <plat/omap_hwmod.h> | 28 | #include <plat/omap_hwmod.h> |
29 | #include <plat/omap_device.h> | 29 | #include <plat/omap_device.h> |
30 | #include <plat/mmc.h> | ||
31 | 30 | ||
32 | #include "common.h" | 31 | #include "common.h" |
33 | #include "control.h" | 32 | #include "control.h" |
34 | #include "mux.h" | 33 | #include "mux.h" |
34 | #include "mmc.h" | ||
35 | 35 | ||
36 | /* | 36 | /* |
37 | * MSDI_CON_OFFSET: offset in bytes of the MSDI IP block's CON register | 37 | * MSDI_CON_OFFSET: offset in bytes of the MSDI IP block's CON register |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index e1f289748c5d..de89d382f52c 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -27,12 +27,12 @@ | |||
27 | 27 | ||
28 | #include <plat/sram.h> | 28 | #include <plat/sram.h> |
29 | #include <plat/omap-secure.h> | 29 | #include <plat/omap-secure.h> |
30 | #include <plat/mmc.h> | ||
31 | 30 | ||
32 | #include "omap-wakeupgen.h" | 31 | #include "omap-wakeupgen.h" |
33 | 32 | ||
34 | #include "soc.h" | 33 | #include "soc.h" |
35 | #include "common.h" | 34 | #include "common.h" |
35 | #include "mmc.h" | ||
36 | #include "hsmmc.h" | 36 | #include "hsmmc.h" |
37 | #include "omap4-sar-layout.h" | 37 | #include "omap4-sar-layout.h" |
38 | 38 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index b5db6007c523..82ad9a57661e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -21,12 +21,12 @@ | |||
21 | #include <plat/dmtimer.h> | 21 | #include <plat/dmtimer.h> |
22 | #include "l3_2xxx.h" | 22 | #include "l3_2xxx.h" |
23 | #include "l4_2xxx.h" | 23 | #include "l4_2xxx.h" |
24 | #include <plat/mmc.h> | ||
25 | 24 | ||
26 | #include "omap_hwmod_common_data.h" | 25 | #include "omap_hwmod_common_data.h" |
27 | 26 | ||
28 | #include "cm-regbits-24xx.h" | 27 | #include "cm-regbits-24xx.h" |
29 | #include "prm-regbits-24xx.h" | 28 | #include "prm-regbits-24xx.h" |
29 | #include "mmc.h" | ||
30 | #include "wd_timer.h" | 30 | #include "wd_timer.h" |
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index c455e41b0237..5c833fb35d21 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <plat/serial.h> | 20 | #include <plat/serial.h> |
21 | #include <plat/i2c.h> | 21 | #include <plat/i2c.h> |
22 | #include <plat/dmtimer.h> | 22 | #include <plat/dmtimer.h> |
23 | #include <plat/mmc.h> | 23 | #include "mmc.h" |
24 | #include "l3_2xxx.h" | 24 | #include "l3_2xxx.h" |
25 | 25 | ||
26 | #include "soc.h" | 26 | #include "soc.h" |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 59d5c1cd316d..d023a99cfd7a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/platform_data/gpio-omap.h> | 19 | #include <linux/platform_data/gpio-omap.h> |
20 | #include <linux/platform_data/spi-omap2-mcspi.h> | 20 | #include <linux/platform_data/spi-omap2-mcspi.h> |
21 | #include <plat/dma.h> | 21 | #include <plat/dma.h> |
22 | #include <plat/mmc.h> | ||
23 | #include <plat/i2c.h> | 22 | #include <plat/i2c.h> |
24 | 23 | ||
25 | #include "omap_hwmod_common_data.h" | 24 | #include "omap_hwmod_common_data.h" |
@@ -28,6 +27,7 @@ | |||
28 | #include "cm33xx.h" | 27 | #include "cm33xx.h" |
29 | #include "prm33xx.h" | 28 | #include "prm33xx.h" |
30 | #include "prm-regbits-33xx.h" | 29 | #include "prm-regbits-33xx.h" |
30 | #include "mmc.h" | ||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * IP blocks | 33 | * IP blocks |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index f67b7ee07dd4..509e8ba3fe75 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "l3_3xxx.h" | 23 | #include "l3_3xxx.h" |
24 | #include "l4_3xxx.h" | 24 | #include "l4_3xxx.h" |
25 | #include <plat/i2c.h> | 25 | #include <plat/i2c.h> |
26 | #include <plat/mmc.h> | ||
27 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 26 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
28 | #include <linux/platform_data/spi-omap2-mcspi.h> | 27 | #include <linux/platform_data/spi-omap2-mcspi.h> |
29 | #include <plat/dmtimer.h> | 28 | #include <plat/dmtimer.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include "omap_hwmod_common_data.h" | 34 | #include "omap_hwmod_common_data.h" |
36 | #include "prm-regbits-34xx.h" | 35 | #include "prm-regbits-34xx.h" |
37 | #include "cm-regbits-34xx.h" | 36 | #include "cm-regbits-34xx.h" |
37 | #include "mmc.h" | ||
38 | #include "wd_timer.h" | 38 | #include "wd_timer.h" |
39 | 39 | ||
40 | /* | 40 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 652d0285bd6d..f87d781c4ebb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <plat/dma.h> | 27 | #include <plat/dma.h> |
28 | #include <linux/platform_data/spi-omap2-mcspi.h> | 28 | #include <linux/platform_data/spi-omap2-mcspi.h> |
29 | #include <linux/platform_data/asoc-ti-mcbsp.h> | 29 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
30 | #include <plat/mmc.h> | ||
31 | #include <plat/dmtimer.h> | 30 | #include <plat/dmtimer.h> |
32 | #include <plat/common.h> | 31 | #include <plat/common.h> |
33 | #include <plat/iommu.h> | 32 | #include <plat/iommu.h> |
@@ -37,6 +36,7 @@ | |||
37 | #include "cm2_44xx.h" | 36 | #include "cm2_44xx.h" |
38 | #include "prm44xx.h" | 37 | #include "prm44xx.h" |
39 | #include "prm-regbits-44xx.h" | 38 | #include "prm-regbits-44xx.h" |
39 | #include "mmc.h" | ||
40 | #include "wd_timer.h" | 40 | #include "wd_timer.h" |
41 | 41 | ||
42 | /* Base offset for all OMAP4 interrupts external to MPUSS */ | 42 | /* Base offset for all OMAP4 interrupts external to MPUSS */ |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h deleted file mode 100644 index 8b4e4f2da2f5..000000000000 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ /dev/null | |||
@@ -1,188 +0,0 @@ | |||
1 | /* | ||
2 | * MMC definitions for OMAP2 | ||
3 | * | ||
4 | * Copyright (C) 2006 Nokia Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __OMAP2_MMC_H | ||
12 | #define __OMAP2_MMC_H | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/mmc/host.h> | ||
17 | |||
18 | #include <plat/omap_hwmod.h> | ||
19 | |||
20 | #define OMAP15XX_NR_MMC 1 | ||
21 | #define OMAP16XX_NR_MMC 2 | ||
22 | #define OMAP1_MMC_SIZE 0x080 | ||
23 | #define OMAP1_MMC1_BASE 0xfffb7800 | ||
24 | #define OMAP1_MMC2_BASE 0xfffb7c00 /* omap16xx only */ | ||
25 | |||
26 | #define OMAP24XX_NR_MMC 2 | ||
27 | #define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE | ||
28 | #define OMAP2_MMC1_BASE 0x4809c000 | ||
29 | |||
30 | #define OMAP4_MMC_REG_OFFSET 0x100 | ||
31 | |||
32 | #define OMAP_MMC_MAX_SLOTS 2 | ||
33 | |||
34 | /* | ||
35 | * struct omap_mmc_dev_attr.flags possibilities | ||
36 | * | ||
37 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
38 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
39 | * should be set if this is the case. See for example Section 22.5.3 | ||
40 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
41 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
42 | * | ||
43 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
44 | * don't work correctly on some MMC controller instances on some | ||
45 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
46 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
47 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
48 | * Revision F (October 2010) (SPRZ278F). | ||
49 | */ | ||
50 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
51 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
52 | |||
53 | struct omap_mmc_dev_attr { | ||
54 | u8 flags; | ||
55 | }; | ||
56 | |||
57 | struct omap_mmc_platform_data { | ||
58 | /* back-link to device */ | ||
59 | struct device *dev; | ||
60 | |||
61 | /* number of slots per controller */ | ||
62 | unsigned nr_slots:2; | ||
63 | |||
64 | /* set if your board has components or wiring that limits the | ||
65 | * maximum frequency on the MMC bus */ | ||
66 | unsigned int max_freq; | ||
67 | |||
68 | /* switch the bus to a new slot */ | ||
69 | int (*switch_slot)(struct device *dev, int slot); | ||
70 | /* initialize board-specific MMC functionality, can be NULL if | ||
71 | * not supported */ | ||
72 | int (*init)(struct device *dev); | ||
73 | void (*cleanup)(struct device *dev); | ||
74 | void (*shutdown)(struct device *dev); | ||
75 | |||
76 | /* To handle board related suspend/resume functionality for MMC */ | ||
77 | int (*suspend)(struct device *dev, int slot); | ||
78 | int (*resume)(struct device *dev, int slot); | ||
79 | |||
80 | /* Return context loss count due to PM states changing */ | ||
81 | int (*get_context_loss_count)(struct device *dev); | ||
82 | |||
83 | /* Integrating attributes from the omap_hwmod layer */ | ||
84 | u8 controller_flags; | ||
85 | |||
86 | /* Register offset deviation */ | ||
87 | u16 reg_offset; | ||
88 | |||
89 | struct omap_mmc_slot_data { | ||
90 | |||
91 | /* | ||
92 | * 4/8 wires and any additional host capabilities | ||
93 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
94 | */ | ||
95 | u8 wires; /* Used for the MMC driver on omap1 and 2420 */ | ||
96 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
97 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
98 | |||
99 | /* | ||
100 | * nomux means "standard" muxing is wrong on this board, and | ||
101 | * that board-specific code handled it before common init logic. | ||
102 | */ | ||
103 | unsigned nomux:1; | ||
104 | |||
105 | /* switch pin can be for card detect (default) or card cover */ | ||
106 | unsigned cover:1; | ||
107 | |||
108 | /* use the internal clock */ | ||
109 | unsigned internal_clock:1; | ||
110 | |||
111 | /* nonremovable e.g. eMMC */ | ||
112 | unsigned nonremovable:1; | ||
113 | |||
114 | /* Try to sleep or power off when possible */ | ||
115 | unsigned power_saving:1; | ||
116 | |||
117 | /* If using power_saving and the MMC power is not to go off */ | ||
118 | unsigned no_off:1; | ||
119 | |||
120 | /* eMMC does not handle power off when not in sleep state */ | ||
121 | unsigned no_regulator_off_init:1; | ||
122 | |||
123 | /* Regulator off remapped to sleep */ | ||
124 | unsigned vcc_aux_disable_is_sleep:1; | ||
125 | |||
126 | /* we can put the features above into this variable */ | ||
127 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
128 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
129 | unsigned features; | ||
130 | |||
131 | int switch_pin; /* gpio (card detect) */ | ||
132 | int gpio_wp; /* gpio (write protect) */ | ||
133 | |||
134 | int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); | ||
135 | int (*set_power)(struct device *dev, int slot, | ||
136 | int power_on, int vdd); | ||
137 | int (*get_ro)(struct device *dev, int slot); | ||
138 | void (*remux)(struct device *dev, int slot, int power_on); | ||
139 | /* Call back before enabling / disabling regulators */ | ||
140 | void (*before_set_reg)(struct device *dev, int slot, | ||
141 | int power_on, int vdd); | ||
142 | /* Call back after enabling / disabling regulators */ | ||
143 | void (*after_set_reg)(struct device *dev, int slot, | ||
144 | int power_on, int vdd); | ||
145 | /* if we have special card, init it using this callback */ | ||
146 | void (*init_card)(struct mmc_card *card); | ||
147 | |||
148 | /* return MMC cover switch state, can be NULL if not supported. | ||
149 | * | ||
150 | * possible return values: | ||
151 | * 0 - closed | ||
152 | * 1 - open | ||
153 | */ | ||
154 | int (*get_cover_state)(struct device *dev, int slot); | ||
155 | |||
156 | const char *name; | ||
157 | u32 ocr_mask; | ||
158 | |||
159 | /* Card detection IRQs */ | ||
160 | int card_detect_irq; | ||
161 | int (*card_detect)(struct device *dev, int slot); | ||
162 | |||
163 | unsigned int ban_openended:1; | ||
164 | |||
165 | } slots[OMAP_MMC_MAX_SLOTS]; | ||
166 | }; | ||
167 | |||
168 | /* called from board-specific card detection service routine */ | ||
169 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, | ||
170 | int is_closed); | ||
171 | |||
172 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
173 | void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
174 | int nr_controllers); | ||
175 | void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data); | ||
176 | #else | ||
177 | static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
178 | int nr_controllers) | ||
179 | { | ||
180 | } | ||
181 | static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) | ||
182 | { | ||
183 | } | ||
184 | #endif | ||
185 | |||
186 | extern int omap_msdi_reset(struct omap_hwmod *oh); | ||
187 | |||
188 | #endif | ||