diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:51:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:51:39 -0500 |
commit | d01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (patch) | |
tree | 02ef82b2740cf93a98199eded5ef765fa6e03052 /drivers/mmc/host | |
parent | 8287361abca36504da813638310d2547469283eb (diff) | |
parent | 794b175fc0c0c4844dbb7b137a73bbfd01f6c608 (diff) |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups on various subarchitectures from Olof Johansson:
"Cleanup patches for various ARM platforms and some of their associated
drivers. There's also a branch in here that enables Freescale i.MX to
be part of the multiplatform support -- the first "big" SoC that is
moved over (more multiplatform work comes in a separate branch later
during the merge window)."
Conflicts fixed as per Olof, including a silent semantic one in
arch/arm/mach-omap2/board-generic.c (omap_prcm_restart() was renamed to
omap3xxx_restart(), and a new user of the old name was added).
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (189 commits)
ARM: omap: fix typo on timer cleanup
ARM: EXYNOS: Remove unused regs-mem.h file
ARM: EXYNOS: Remove unused non-dt support for dwmci controller
ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan
ARM: OMAP3: cm-t3517: use GPTIMER for system clock
ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER
ARM: SAMSUNG: use devm_ functions for ADC driver
ARM: EXYNOS: no duplicate mask/unmask in eint0_15
ARM: S3C24XX: SPI clock channel setup is fixed for S3C2443
ARM: EXYNOS: Remove i2c0 resource information and setting of device names
ARM: Kirkwood: checkpatch cleanups
ARM: Kirkwood: Fix sparse warnings.
ARM: Kirkwood: Remove unused includes
ARM: kirkwood: cleanup lsxl board includes
ARM: integrator: use BUG_ON where possible
ARM: integrator: push down SC dependencies
ARM: integrator: delete static UART1 mapping
ARM: integrator: delete SC mapping on the CP
ARM: integrator: remove static CP syscon mapping
ARM: integrator: remove static AP syscon mapping
...
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 29e680f193a..a72936eea6f 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/platform_data/mmc-mxcmmc.h> | 41 | #include <linux/platform_data/mmc-mxcmmc.h> |
42 | 42 | ||
43 | #include <linux/platform_data/dma-imx.h> | 43 | #include <linux/platform_data/dma-imx.h> |
44 | #include <mach/hardware.h> | ||
45 | 44 | ||
46 | #define DRIVER_NAME "mxc-mmc" | 45 | #define DRIVER_NAME "mxc-mmc" |
47 | #define MXCMCI_TIMEOUT_MS 10000 | 46 | #define MXCMCI_TIMEOUT_MS 10000 |
@@ -113,6 +112,11 @@ | |||
113 | #define INT_WRITE_OP_DONE_EN (1 << 1) | 112 | #define INT_WRITE_OP_DONE_EN (1 << 1) |
114 | #define INT_READ_OP_EN (1 << 0) | 113 | #define INT_READ_OP_EN (1 << 0) |
115 | 114 | ||
115 | enum mxcmci_type { | ||
116 | IMX21_MMC, | ||
117 | IMX31_MMC, | ||
118 | }; | ||
119 | |||
116 | struct mxcmci_host { | 120 | struct mxcmci_host { |
117 | struct mmc_host *mmc; | 121 | struct mmc_host *mmc; |
118 | struct resource *res; | 122 | struct resource *res; |
@@ -153,7 +157,26 @@ struct mxcmci_host { | |||
153 | struct imx_dma_data dma_data; | 157 | struct imx_dma_data dma_data; |
154 | 158 | ||
155 | struct timer_list watchdog; | 159 | struct timer_list watchdog; |
160 | enum mxcmci_type devtype; | ||
161 | }; | ||
162 | |||
163 | static struct platform_device_id mxcmci_devtype[] = { | ||
164 | { | ||
165 | .name = "imx21-mmc", | ||
166 | .driver_data = IMX21_MMC, | ||
167 | }, { | ||
168 | .name = "imx31-mmc", | ||
169 | .driver_data = IMX31_MMC, | ||
170 | }, { | ||
171 | /* sentinel */ | ||
172 | } | ||
156 | }; | 173 | }; |
174 | MODULE_DEVICE_TABLE(platform, mxcmci_devtype); | ||
175 | |||
176 | static inline int is_imx31_mmc(struct mxcmci_host *host) | ||
177 | { | ||
178 | return host->devtype == IMX31_MMC; | ||
179 | } | ||
157 | 180 | ||
158 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios); | 181 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios); |
159 | 182 | ||
@@ -843,6 +866,8 @@ static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable) | |||
843 | 866 | ||
844 | static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) | 867 | static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) |
845 | { | 868 | { |
869 | struct mxcmci_host *mxcmci = mmc_priv(host); | ||
870 | |||
846 | /* | 871 | /* |
847 | * MX3 SoCs have a silicon bug which corrupts CRC calculation of | 872 | * MX3 SoCs have a silicon bug which corrupts CRC calculation of |
848 | * multi-block transfers when connected SDIO peripheral doesn't | 873 | * multi-block transfers when connected SDIO peripheral doesn't |
@@ -850,7 +875,7 @@ static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card) | |||
850 | * One way to prevent this is to only allow 1-bit transfers. | 875 | * One way to prevent this is to only allow 1-bit transfers. |
851 | */ | 876 | */ |
852 | 877 | ||
853 | if (cpu_is_mx3() && card->type == MMC_TYPE_SDIO) | 878 | if (is_imx31_mmc(mxcmci) && card->type == MMC_TYPE_SDIO) |
854 | host->caps &= ~MMC_CAP_4_BIT_DATA; | 879 | host->caps &= ~MMC_CAP_4_BIT_DATA; |
855 | else | 880 | else |
856 | host->caps |= MMC_CAP_4_BIT_DATA; | 881 | host->caps |= MMC_CAP_4_BIT_DATA; |
@@ -948,6 +973,7 @@ static int mxcmci_probe(struct platform_device *pdev) | |||
948 | 973 | ||
949 | host->mmc = mmc; | 974 | host->mmc = mmc; |
950 | host->pdata = pdev->dev.platform_data; | 975 | host->pdata = pdev->dev.platform_data; |
976 | host->devtype = pdev->id_entry->driver_data; | ||
951 | spin_lock_init(&host->lock); | 977 | spin_lock_init(&host->lock); |
952 | 978 | ||
953 | mxcmci_init_ocr(host); | 979 | mxcmci_init_ocr(host); |
@@ -1120,6 +1146,7 @@ static const struct dev_pm_ops mxcmci_pm_ops = { | |||
1120 | static struct platform_driver mxcmci_driver = { | 1146 | static struct platform_driver mxcmci_driver = { |
1121 | .probe = mxcmci_probe, | 1147 | .probe = mxcmci_probe, |
1122 | .remove = mxcmci_remove, | 1148 | .remove = mxcmci_remove, |
1149 | .id_table = mxcmci_devtype, | ||
1123 | .driver = { | 1150 | .driver = { |
1124 | .name = DRIVER_NAME, | 1151 | .name = DRIVER_NAME, |
1125 | .owner = THIS_MODULE, | 1152 | .owner = THIS_MODULE, |