Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172560
b: refs/heads/master
c: fa3f993
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Eric Miao committed Dec 1, 2009
1 parent 0b56bce commit e6c7916
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c41562b1626b578e9ce2aae5b3363ee2f142c635
refs/heads/master: fa3f99384c20751c66962848807403ff171dc02f
10 changes: 6 additions & 4 deletions trunk/drivers/mmc/host/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#define NR_SG 1
#define CLKRT_OFF (~0)

#define mmc_has_26MHz() (cpu_is_pxa300() || cpu_is_pxa310() \
|| cpu_is_pxa935())

struct pxamci_host {
struct mmc_host *mmc;
spinlock_t lock;
Expand Down Expand Up @@ -457,7 +460,7 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
clk_enable(host->clk);

if (ios->clock == 26000000) {
/* to support 26MHz on pxa300/pxa310 */
/* to support 26MHz */
host->clkrt = 7;
} else {
/* to handle (19.5MHz, 26MHz) */
Expand Down Expand Up @@ -608,8 +611,7 @@ static int pxamci_probe(struct platform_device *pdev)
* Calculate minimum clock rate, rounding up.
*/
mmc->f_min = (host->clkrate + 63) / 64;
mmc->f_max = (cpu_is_pxa300() || cpu_is_pxa310()) ? 26000000
: host->clkrate;
mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate;

pxamci_init_ocr(host);

Expand All @@ -618,7 +620,7 @@ static int pxamci_probe(struct platform_device *pdev)
if (!cpu_is_pxa25x()) {
mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
host->cmdat |= CMDAT_SDIO_INT_EN;
if (cpu_is_pxa300() || cpu_is_pxa310())
if (mmc_has_26MHz())
mmc->caps |= MMC_CAP_MMC_HIGHSPEED |
MMC_CAP_SD_HIGHSPEED;
}
Expand Down

0 comments on commit e6c7916

Please sign in to comment.