Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140492
b: refs/heads/master
c: 8114634
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Pierre Ossman committed Mar 24, 2009
1 parent 15bca76 commit 51d5959
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4240ff0a02cb52f7d10dc1df6d82ba9c27dba07b
refs/heads/master: 8114634ccb54d67a8c01e5825d95bff4e7f7b357
6 changes: 6 additions & 0 deletions trunk/drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,12 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
if (clock == host->clock)
return;

if (host->ops->set_clock) {
host->ops->set_clock(host, clock);
if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
return;
}

sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);

if (clock == 0)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/mmc/host/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15)
/* Controller reports inverted write-protect state */
#define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16)
/* Controller has nonstandard clock management */
#define SDHCI_QUIRK_NONSTANDARD_CLOCK (1<<17)

int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */
Expand Down Expand Up @@ -284,6 +286,8 @@ struct sdhci_ops {
void (*writeb)(struct sdhci_host *host, u8 val, int reg);
#endif

void (*set_clock)(struct sdhci_host *host, unsigned int clock);

int (*enable_dma)(struct sdhci_host *host);
unsigned int (*get_max_clock)(struct sdhci_host *host);
unsigned int (*get_timeout_clock)(struct sdhci_host *host);
Expand Down

0 comments on commit 51d5959

Please sign in to comment.