diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/mmc/sdhci.c | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r-- | drivers/mmc/sdhci.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 9a7d39b7cdbf..cd98117632d3 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c | |||
@@ -616,6 +616,7 @@ static void sdhci_finish_command(struct sdhci_host *host) | |||
616 | static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) | 616 | static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) |
617 | { | 617 | { |
618 | int div; | 618 | int div; |
619 | u8 ctrl; | ||
619 | u16 clk; | 620 | u16 clk; |
620 | unsigned long timeout; | 621 | unsigned long timeout; |
621 | 622 | ||
@@ -624,6 +625,13 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) | |||
624 | 625 | ||
625 | writew(0, host->ioaddr + SDHCI_CLOCK_CONTROL); | 626 | writew(0, host->ioaddr + SDHCI_CLOCK_CONTROL); |
626 | 627 | ||
628 | ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL); | ||
629 | if (clock > 25000000) | ||
630 | ctrl |= SDHCI_CTRL_HISPD; | ||
631 | else | ||
632 | ctrl &= ~SDHCI_CTRL_HISPD; | ||
633 | writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); | ||
634 | |||
627 | if (clock == 0) | 635 | if (clock == 0) |
628 | goto out; | 636 | goto out; |
629 | 637 | ||
@@ -784,7 +792,7 @@ static int sdhci_get_ro(struct mmc_host *mmc) | |||
784 | return !(present & SDHCI_WRITE_PROTECT); | 792 | return !(present & SDHCI_WRITE_PROTECT); |
785 | } | 793 | } |
786 | 794 | ||
787 | static struct mmc_host_ops sdhci_ops = { | 795 | static const struct mmc_host_ops sdhci_ops = { |
788 | .request = sdhci_request, | 796 | .request = sdhci_request, |
789 | .set_ios = sdhci_set_ios, | 797 | .set_ios = sdhci_set_ios, |
790 | .get_ro = sdhci_get_ro, | 798 | .get_ro = sdhci_get_ro, |
@@ -1291,6 +1299,13 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1291 | else if (caps & SDHCI_CAN_VDD_180) | 1299 | else if (caps & SDHCI_CAN_VDD_180) |
1292 | mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19; | 1300 | mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19; |
1293 | 1301 | ||
1302 | if ((host->max_clk > 25000000) && !(caps & SDHCI_CAN_DO_HISPD)) { | ||
1303 | printk(KERN_ERR "%s: Controller reports > 25 MHz base clock," | ||
1304 | " but no high speed support.\n", | ||
1305 | host->slot_descr); | ||
1306 | mmc->f_max = 25000000; | ||
1307 | } | ||
1308 | |||
1294 | if (mmc->ocr_avail == 0) { | 1309 | if (mmc->ocr_avail == 0) { |
1295 | printk(KERN_ERR "%s: Hardware doesn't report any " | 1310 | printk(KERN_ERR "%s: Hardware doesn't report any " |
1296 | "support voltages.\n", host->slot_descr); | 1311 | "support voltages.\n", host->slot_descr); |