diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-05 05:35:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-05 05:35:33 -0500 |
commit | 0719dc341389882cc834ed18fc9b7fc6006b2b85 (patch) | |
tree | 794480ac62c07ea8cc4e69c2cb3d2b83bb7f36b7 /drivers/mmc | |
parent | e28edb723e64200554194da17617ee6e82de6690 (diff) | |
parent | 677f4f64e4b2336682f0e15c69b206ade6f6b131 (diff) |
Merge branch 'devel-stable' into devel
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/pxamci.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index b00d67319058..c85f6166056e 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 | |||
46 | struct pxamci_host { | 49 | struct 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 | } |