aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c2
-rw-r--r--drivers/mmc/host/omap.c10
-rw-r--r--drivers/mmc/host/omap_hsmmc.c8
-rw-r--r--drivers/mmc/host/pxamci.c14
4 files changed, 18 insertions, 16 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 705a5894a6bb..90d168ad03b6 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -56,7 +56,7 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired)
56 clk = 255; 56 clk = 255;
57 host->cclk = host->mclk / (2 * (clk + 1)); 57 host->cclk = host->mclk / (2 * (clk + 1));
58 } 58 }
59 if (host->hw_designer == 0x80) 59 if (host->hw_designer == AMBA_VENDOR_ST)
60 clk |= MCI_FCEN; /* Bug fix in ST IP block */ 60 clk |= MCI_FCEN; /* Bug fix in ST IP block */
61 clk |= MCI_CLK_ENABLE; 61 clk |= MCI_CLK_ENABLE;
62 /* This hasn't proven to be worthwhile */ 62 /* This hasn't proven to be worthwhile */
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b8fd7af1ceeb..5f970e253e50 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -30,12 +30,12 @@
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32 32
33#include <mach/board.h> 33#include <plat/board.h>
34#include <mach/mmc.h> 34#include <plat/mmc.h>
35#include <mach/gpio.h> 35#include <mach/gpio.h>
36#include <mach/dma.h> 36#include <plat/dma.h>
37#include <mach/mux.h> 37#include <plat/mux.h>
38#include <mach/fpga.h> 38#include <plat/fpga.h>
39 39
40#define OMAP_MMC_REG_CMD 0x00 40#define OMAP_MMC_REG_CMD 0x00
41#define OMAP_MMC_REG_ARGL 0x04 41#define OMAP_MMC_REG_ARGL 0x04
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 0aecaaebef3d..4b2322518909 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -30,11 +30,11 @@
30#include <linux/mmc/core.h> 30#include <linux/mmc/core.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/semaphore.h> 32#include <linux/semaphore.h>
33#include <mach/dma.h> 33#include <plat/dma.h>
34#include <mach/hardware.h> 34#include <mach/hardware.h>
35#include <mach/board.h> 35#include <plat/board.h>
36#include <mach/mmc.h> 36#include <plat/mmc.h>
37#include <mach/cpu.h> 37#include <plat/cpu.h>
38 38
39/* OMAP HSMMC Host Controller Registers */ 39/* OMAP HSMMC Host Controller Registers */
40#define OMAP_HSMMC_SYSCONFIG 0x0010 40#define OMAP_HSMMC_SYSCONFIG 0x0010
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index b00d67319058..bb47ff465c04 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -43,6 +43,9 @@
43#define NR_SG 1 43#define NR_SG 1
44#define CLKRT_OFF (~0) 44#define CLKRT_OFF (~0)
45 45
46#define mmc_has_26MHz() (cpu_is_pxa300() || cpu_is_pxa310() \
47 || cpu_is_pxa935())
48
46struct pxamci_host { 49struct pxamci_host {
47 struct mmc_host *mmc; 50 struct mmc_host *mmc;
48 spinlock_t lock; 51 spinlock_t lock;
@@ -457,7 +460,7 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
457 clk_enable(host->clk); 460 clk_enable(host->clk);
458 461
459 if (ios->clock == 26000000) { 462 if (ios->clock == 26000000) {
460 /* to support 26MHz on pxa300/pxa310 */ 463 /* to support 26MHz */
461 host->clkrt = 7; 464 host->clkrt = 7;
462 } else { 465 } else {
463 /* to handle (19.5MHz, 26MHz) */ 466 /* to handle (19.5MHz, 26MHz) */
@@ -608,8 +611,7 @@ static int pxamci_probe(struct platform_device *pdev)
608 * Calculate minimum clock rate, rounding up. 611 * Calculate minimum clock rate, rounding up.
609 */ 612 */
610 mmc->f_min = (host->clkrate + 63) / 64; 613 mmc->f_min = (host->clkrate + 63) / 64;
611 mmc->f_max = (cpu_is_pxa300() || cpu_is_pxa310()) ? 26000000 614 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate;
612 : host->clkrate;
613 615
614 pxamci_init_ocr(host); 616 pxamci_init_ocr(host);
615 617
@@ -618,7 +620,7 @@ static int pxamci_probe(struct platform_device *pdev)
618 if (!cpu_is_pxa25x()) { 620 if (!cpu_is_pxa25x()) {
619 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; 621 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
620 host->cmdat |= CMDAT_SDIO_INT_EN; 622 host->cmdat |= CMDAT_SDIO_INT_EN;
621 if (cpu_is_pxa300() || cpu_is_pxa310()) 623 if (mmc_has_26MHz())
622 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | 624 mmc->caps |= MMC_CAP_MMC_HIGHSPEED |
623 MMC_CAP_SD_HIGHSPEED; 625 MMC_CAP_SD_HIGHSPEED;
624 } 626 }
@@ -760,6 +762,8 @@ static int pxamci_remove(struct platform_device *pdev)
760 if (mmc) { 762 if (mmc) {
761 struct pxamci_host *host = mmc_priv(mmc); 763 struct pxamci_host *host = mmc_priv(mmc);
762 764
765 mmc_remove_host(mmc);
766
763 if (host->pdata) { 767 if (host->pdata) {
764 gpio_cd = host->pdata->gpio_card_detect; 768 gpio_cd = host->pdata->gpio_card_detect;
765 gpio_ro = host->pdata->gpio_card_ro; 769 gpio_ro = host->pdata->gpio_card_ro;
@@ -779,8 +783,6 @@ static int pxamci_remove(struct platform_device *pdev)
779 if (host->pdata && host->pdata->exit) 783 if (host->pdata && host->pdata->exit)
780 host->pdata->exit(&pdev->dev, mmc); 784 host->pdata->exit(&pdev->dev, mmc);
781 785
782 mmc_remove_host(mmc);
783
784 pxamci_stop_clock(host); 786 pxamci_stop_clock(host);
785 writel(TXFIFO_WR_REQ|RXFIFO_RD_REQ|CLK_IS_OFF|STOP_CMD| 787 writel(TXFIFO_WR_REQ|RXFIFO_RD_REQ|CLK_IS_OFF|STOP_CMD|
786 END_CMD_RES|PRG_DONE|DATA_TRAN_DONE, 788 END_CMD_RES|PRG_DONE|DATA_TRAN_DONE,