Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218986
b: refs/heads/master
c: c4687d5
h: refs/heads/master
v: v3
  • Loading branch information
Zhangfei Gao authored and Chris Ball committed Oct 23, 2010
1 parent 7ca4d26 commit adbd6ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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: 85105c53b0ce70a277160379f9d89309cefc0bfd
refs/heads/master: c4687d5f601be3f928b815b46964f7426c31aec7
9 changes: 7 additions & 2 deletions trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,8 +1794,13 @@ int sdhci_add_host(struct sdhci_host *host)
mmc_dev(host->mmc)->dma_mask = &host->dma_mask;
}

host->max_clk =
(caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
if (host->version >= SDHCI_SPEC_300)
host->max_clk = (caps & SDHCI_CLOCK_V3_BASE_MASK)
>> SDHCI_CLOCK_BASE_SHIFT;
else
host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK)
>> SDHCI_CLOCK_BASE_SHIFT;

host->max_clk *= 1000000;
if (host->max_clk == 0 || host->quirks &
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN) {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mmc/host/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
#define SDHCI_TIMEOUT_CLK_SHIFT 0
#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080
#define SDHCI_CLOCK_BASE_MASK 0x00003F00
#define SDHCI_CLOCK_V3_BASE_MASK 0x0000FF00
#define SDHCI_CLOCK_BASE_SHIFT 8
#define SDHCI_MAX_BLOCK_MASK 0x00030000
#define SDHCI_MAX_BLOCK_SHIFT 16
Expand Down

0 comments on commit adbd6ad

Please sign in to comment.