diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-17 14:13:42 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-10-17 14:13:42 -0400 |
commit | 46cddc01aa6a017193ae7320ef8bfc8242782a66 (patch) | |
tree | da67a2fb45e512689bf909b4f832a8daea57e140 | |
parent | 99f0b8d6b09b0db6452d0d6e252bfa28049bbea9 (diff) | |
parent | 53db20d123f7a1bf44e46b727775403672655fde (diff) |
Merge branch 'omap-for-v3.8/cleanup-headers-mmc' into omap-for-v3.8/cleanup-headers
Conflicts:
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
drivers/mmc/host/omap.c
24 files changed, 91 insertions, 78 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 894e7c9b57f9..8e32d50d275b 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <plat/tc.h> | 22 | #include <plat/tc.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include <plat/mmc.h> | ||
25 | 24 | ||
26 | #include <mach/omap7xx.h> | 25 | #include <mach/omap7xx.h> |
27 | #include <mach/camera.h> | 26 | #include <mach/camera.h> |
@@ -30,6 +29,7 @@ | |||
30 | #include "common.h" | 29 | #include "common.h" |
31 | #include "clock.h" | 30 | #include "clock.h" |
32 | #include "dma.h" | 31 | #include "dma.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 | ||
@@ -175,6 +175,13 @@ static int __init omap_mmc_add(const char *name, int id, unsigned long base, | |||
175 | res[3].name = "tx"; | 175 | res[3].name = "tx"; |
176 | res[3].flags = IORESOURCE_DMA; | 176 | res[3].flags = IORESOURCE_DMA; |
177 | 177 | ||
178 | if (cpu_is_omap7xx()) | ||
179 | data->slots[0].features = MMC_OMAP7XX; | ||
180 | if (cpu_is_omap15xx()) | ||
181 | data->slots[0].features = MMC_OMAP15XX; | ||
182 | if (cpu_is_omap16xx()) | ||
183 | data->slots[0].features = MMC_OMAP16XX; | ||
184 | |||
178 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); | 185 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); |
179 | if (ret == 0) | 186 | if (ret == 0) |
180 | ret = platform_device_add_data(pdev, data, sizeof(*data)); | 187 | ret = platform_device_add_data(pdev, data, sizeof(*data)); |
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 92b19166aac8..cea433b9b7b9 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 | #include "gpmc-onenand.h" | 35 | #include "gpmc-onenand.h" |
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 3c3a47317f8f..208a7a239db5 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 "gpmc.h" | 27 | #include "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 917b1f47598e..80bbbee57649 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 2a6d1ab31bd0..dff04f948a2f 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 f7f3c2dfa0af..44a661882a7e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <plat/cpu.h> | 18 | #include <plat/cpu.h> |
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-omap/dma-omap.h> | ||
22 | #include <plat/mmc.h> | ||
23 | #include <plat/i2c.h> | 21 | #include <plat/i2c.h> |
24 | 22 | ||
25 | #include "omap_hwmod_common_data.h" | 23 | #include "omap_hwmod_common_data.h" |
@@ -28,6 +26,7 @@ | |||
28 | #include "cm33xx.h" | 26 | #include "cm33xx.h" |
29 | #include "prm33xx.h" | 27 | #include "prm33xx.h" |
30 | #include "prm-regbits-33xx.h" | 28 | #include "prm-regbits-33xx.h" |
29 | #include "mmc.h" | ||
31 | 30 | ||
32 | /* | 31 | /* |
33 | * IP blocks | 32 | * 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 76ef2adc683c..2aaf3ce80626 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> |
@@ -37,6 +36,7 @@ | |||
37 | #include "cm-regbits-34xx.h" | 36 | #include "cm-regbits-34xx.h" |
38 | 37 | ||
39 | #include "dma.h" | 38 | #include "dma.h" |
39 | #include "mmc.h" | ||
40 | #include "wd_timer.h" | 40 | #include "wd_timer.h" |
41 | 41 | ||
42 | /* | 42 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 5f59b16978ff..f47a57fa1f3a 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-omap/dma-omap.h> | 27 | #include <plat-omap/dma-omap.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/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index c59c4d25165c..ae115c01283b 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -28,9 +28,8 @@ | |||
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/scatterlist.h> | 29 | #include <linux/scatterlist.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/platform_data/mmc-omap.h> | ||
31 | 32 | ||
32 | #include <plat/mmc.h> | ||
33 | #include <plat-omap/dma-omap.h> | ||
34 | 33 | ||
35 | #define OMAP_MMC_REG_CMD 0x00 | 34 | #define OMAP_MMC_REG_CMD 0x00 |
36 | #define OMAP_MMC_REG_ARGL 0x01 | 35 | #define OMAP_MMC_REG_ARGL 0x01 |
@@ -72,6 +71,13 @@ | |||
72 | #define OMAP_MMC_STAT_CARD_BUSY (1 << 2) | 71 | #define OMAP_MMC_STAT_CARD_BUSY (1 << 2) |
73 | #define OMAP_MMC_STAT_END_OF_CMD (1 << 0) | 72 | #define OMAP_MMC_STAT_END_OF_CMD (1 << 0) |
74 | 73 | ||
74 | #define mmc_omap7xx() (host->features & MMC_OMAP7XX) | ||
75 | #define mmc_omap15xx() (host->features & MMC_OMAP15XX) | ||
76 | #define mmc_omap16xx() (host->features & MMC_OMAP16XX) | ||
77 | #define MMC_OMAP1_MASK (MMC_OMAP7XX | MMC_OMAP15XX | MMC_OMAP16XX) | ||
78 | #define mmc_omap1() (host->features & MMC_OMAP1_MASK) | ||
79 | #define mmc_omap2() (!mmc_omap1()) | ||
80 | |||
75 | #define OMAP_MMC_REG(host, reg) (OMAP_MMC_REG_##reg << (host)->reg_shift) | 81 | #define OMAP_MMC_REG(host, reg) (OMAP_MMC_REG_##reg << (host)->reg_shift) |
76 | #define OMAP_MMC_READ(host, reg) __raw_readw((host)->virt_base + OMAP_MMC_REG(host, reg)) | 82 | #define OMAP_MMC_READ(host, reg) __raw_readw((host)->virt_base + OMAP_MMC_REG(host, reg)) |
77 | #define OMAP_MMC_WRITE(host, reg, val) __raw_writew((val), (host)->virt_base + OMAP_MMC_REG(host, reg)) | 83 | #define OMAP_MMC_WRITE(host, reg, val) __raw_writew((val), (host)->virt_base + OMAP_MMC_REG(host, reg)) |
@@ -157,6 +163,7 @@ struct mmc_omap_host { | |||
157 | u32 buffer_bytes_left; | 163 | u32 buffer_bytes_left; |
158 | u32 total_bytes_left; | 164 | u32 total_bytes_left; |
159 | 165 | ||
166 | unsigned features; | ||
160 | unsigned use_dma:1; | 167 | unsigned use_dma:1; |
161 | unsigned brs_received:1, dma_done:1; | 168 | unsigned brs_received:1, dma_done:1; |
162 | unsigned dma_in_use:1; | 169 | unsigned dma_in_use:1; |
@@ -998,7 +1005,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) | |||
998 | * blocksize is at least that large. Blocksize is | 1005 | * blocksize is at least that large. Blocksize is |
999 | * usually 512 bytes; but not for some SD reads. | 1006 | * usually 512 bytes; but not for some SD reads. |
1000 | */ | 1007 | */ |
1001 | burst = cpu_is_omap15xx() ? 32 : 64; | 1008 | burst = mmc_omap15xx() ? 32 : 64; |
1002 | if (burst > data->blksz) | 1009 | if (burst > data->blksz) |
1003 | burst = data->blksz; | 1010 | burst = data->blksz; |
1004 | 1011 | ||
@@ -1114,8 +1121,7 @@ static void mmc_omap_set_power(struct mmc_omap_slot *slot, int power_on, | |||
1114 | if (slot->pdata->set_power != NULL) | 1121 | if (slot->pdata->set_power != NULL) |
1115 | slot->pdata->set_power(mmc_dev(slot->mmc), slot->id, power_on, | 1122 | slot->pdata->set_power(mmc_dev(slot->mmc), slot->id, power_on, |
1116 | vdd); | 1123 | vdd); |
1117 | 1124 | if (mmc_omap2()) { | |
1118 | if (cpu_is_omap24xx()) { | ||
1119 | u16 w; | 1125 | u16 w; |
1120 | 1126 | ||
1121 | if (power_on) { | 1127 | if (power_on) { |
@@ -1249,7 +1255,7 @@ static int __devinit mmc_omap_new_slot(struct mmc_omap_host *host, int id) | |||
1249 | mmc->ops = &mmc_omap_ops; | 1255 | mmc->ops = &mmc_omap_ops; |
1250 | mmc->f_min = 400000; | 1256 | mmc->f_min = 400000; |
1251 | 1257 | ||
1252 | if (cpu_class_is_omap2()) | 1258 | if (mmc_omap2()) |
1253 | mmc->f_max = 48000000; | 1259 | mmc->f_max = 48000000; |
1254 | else | 1260 | else |
1255 | mmc->f_max = 24000000; | 1261 | mmc->f_max = 24000000; |
@@ -1369,6 +1375,7 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1369 | init_waitqueue_head(&host->slot_wq); | 1375 | init_waitqueue_head(&host->slot_wq); |
1370 | 1376 | ||
1371 | host->pdata = pdata; | 1377 | host->pdata = pdata; |
1378 | host->features = host->pdata->slots[0].features; | ||
1372 | host->dev = &pdev->dev; | 1379 | host->dev = &pdev->dev; |
1373 | platform_set_drvdata(pdev, host); | 1380 | platform_set_drvdata(pdev, host); |
1374 | 1381 | ||
@@ -1401,7 +1408,7 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1401 | host->dma_tx_burst = -1; | 1408 | host->dma_tx_burst = -1; |
1402 | host->dma_rx_burst = -1; | 1409 | host->dma_rx_burst = -1; |
1403 | 1410 | ||
1404 | if (cpu_is_omap24xx()) | 1411 | if (mmc_omap2()) |
1405 | sig = host->id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; | 1412 | sig = host->id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; |
1406 | else | 1413 | else |
1407 | sig = host->id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; | 1414 | sig = host->id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; |
@@ -1417,7 +1424,7 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1417 | dev_warn(host->dev, "unable to obtain TX DMA engine channel %u\n", | 1424 | dev_warn(host->dev, "unable to obtain TX DMA engine channel %u\n", |
1418 | sig); | 1425 | sig); |
1419 | #endif | 1426 | #endif |
1420 | if (cpu_is_omap24xx()) | 1427 | if (mmc_omap2()) |
1421 | sig = host->id == 0 ? OMAP24XX_DMA_MMC1_RX : OMAP24XX_DMA_MMC2_RX; | 1428 | sig = host->id == 0 ? OMAP24XX_DMA_MMC1_RX : OMAP24XX_DMA_MMC2_RX; |
1422 | else | 1429 | else |
1423 | sig = host->id == 0 ? OMAP_DMA_MMC_RX : OMAP_DMA_MMC2_RX; | 1430 | sig = host->id == 0 ? OMAP_DMA_MMC_RX : OMAP_DMA_MMC2_RX; |
@@ -1445,7 +1452,7 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1445 | } | 1452 | } |
1446 | 1453 | ||
1447 | host->nr_slots = pdata->nr_slots; | 1454 | host->nr_slots = pdata->nr_slots; |
1448 | host->reg_shift = (cpu_is_omap7xx() ? 1 : 2); | 1455 | host->reg_shift = (mmc_omap7xx() ? 1 : 2); |
1449 | 1456 | ||
1450 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | 1457 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); |
1451 | if (!host->mmc_omap_wq) | 1458 | if (!host->mmc_omap_wq) |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 54bfd0cc106b..9b24bd46aad3 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -38,9 +38,7 @@ | |||
38 | #include <linux/gpio.h> | 38 | #include <linux/gpio.h> |
39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
40 | #include <linux/pm_runtime.h> | 40 | #include <linux/pm_runtime.h> |
41 | #include <mach/hardware.h> | 41 | #include <linux/platform_data/mmc-omap.h> |
42 | #include <plat/mmc.h> | ||
43 | #include <plat/cpu.h> | ||
44 | 42 | ||
45 | /* OMAP HSMMC Host Controller Registers */ | 43 | /* OMAP HSMMC Host Controller Registers */ |
46 | #define OMAP_HSMMC_SYSSTATUS 0x0014 | 44 | #define OMAP_HSMMC_SYSSTATUS 0x0014 |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/include/linux/platform_data/mmc-omap.h index 8b4e4f2da2f5..2bf6ea82ff94 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/include/linux/platform_data/mmc-omap.h | |||
@@ -8,27 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 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 | 11 | #define OMAP_MMC_MAX_SLOTS 2 |
33 | 12 | ||
34 | /* | 13 | /* |
@@ -50,6 +29,8 @@ | |||
50 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) |
51 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) |
52 | 31 | ||
32 | struct mmc_card; | ||
33 | |||
53 | struct omap_mmc_dev_attr { | 34 | struct omap_mmc_dev_attr { |
54 | u8 flags; | 35 | u8 flags; |
55 | }; | 36 | }; |
@@ -126,6 +107,9 @@ struct omap_mmc_platform_data { | |||
126 | /* we can put the features above into this variable */ | 107 | /* we can put the features above into this variable */ |
127 | #define HSMMC_HAS_PBIAS (1 << 0) | 108 | #define HSMMC_HAS_PBIAS (1 << 0) |
128 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | 109 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) |
110 | #define MMC_OMAP7XX (1 << 2) | ||
111 | #define MMC_OMAP15XX (1 << 3) | ||
112 | #define MMC_OMAP16XX (1 << 4) | ||
129 | unsigned features; | 113 | unsigned features; |
130 | 114 | ||
131 | int switch_pin; /* gpio (card detect) */ | 115 | int switch_pin; /* gpio (card detect) */ |
@@ -164,25 +148,3 @@ struct omap_mmc_platform_data { | |||
164 | 148 | ||
165 | } slots[OMAP_MMC_MAX_SLOTS]; | 149 | } slots[OMAP_MMC_MAX_SLOTS]; |
166 | }; | 150 | }; |
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 | ||