aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/sdhci.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
commit48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch)
treeda3aa535c98cc0957851354ceb0fbff7482d7a9d /drivers/mmc/sdhci.c
parent1a1689344add3333d28d1b5495d8043a3877d01c (diff)
parent4409d28140d9a6e6e3f4f1fdaf7234c4b965d954 (diff)
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r--drivers/mmc/sdhci.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 4bf1fea5e2c..7522f76b15e 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -22,9 +22,6 @@
22#include "sdhci.h" 22#include "sdhci.h"
23 23
24#define DRIVER_NAME "sdhci" 24#define DRIVER_NAME "sdhci"
25#define DRIVER_VERSION "0.12"
26
27#define BUGMAIL "<sdhci-devel@list.drzeus.cx>"
28 25
29#define DBG(f, x...) \ 26#define DBG(f, x...) \
30 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) 27 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x)
@@ -154,8 +151,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
154 /* hw clears the bit when it's done */ 151 /* hw clears the bit when it's done */
155 while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) { 152 while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) {
156 if (timeout == 0) { 153 if (timeout == 0) {
157 printk(KERN_ERR "%s: Reset 0x%x never completed. " 154 printk(KERN_ERR "%s: Reset 0x%x never completed.\n",
158 "Please report this to " BUGMAIL ".\n",
159 mmc_hostname(host->mmc), (int)mask); 155 mmc_hostname(host->mmc), (int)mask);
160 sdhci_dumpregs(host); 156 sdhci_dumpregs(host);
161 return; 157 return;
@@ -474,12 +470,11 @@ static void sdhci_finish_data(struct sdhci_host *host)
474 470
475 if ((data->error == MMC_ERR_NONE) && blocks) { 471 if ((data->error == MMC_ERR_NONE) && blocks) {
476 printk(KERN_ERR "%s: Controller signalled completion even " 472 printk(KERN_ERR "%s: Controller signalled completion even "
477 "though there were blocks left. Please report this " 473 "though there were blocks left.\n",
478 "to " BUGMAIL ".\n", mmc_hostname(host->mmc)); 474 mmc_hostname(host->mmc));
479 data->error = MMC_ERR_FAILED; 475 data->error = MMC_ERR_FAILED;
480 } else if (host->size != 0) { 476 } else if (host->size != 0) {
481 printk(KERN_ERR "%s: %d bytes were left untransferred. " 477 printk(KERN_ERR "%s: %d bytes were left untransferred.\n",
482 "Please report this to " BUGMAIL ".\n",
483 mmc_hostname(host->mmc), host->size); 478 mmc_hostname(host->mmc), host->size);
484 data->error = MMC_ERR_FAILED; 479 data->error = MMC_ERR_FAILED;
485 } 480 }
@@ -526,8 +521,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
526 while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { 521 while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) {
527 if (timeout == 0) { 522 if (timeout == 0) {
528 printk(KERN_ERR "%s: Controller never released " 523 printk(KERN_ERR "%s: Controller never released "
529 "inhibit bit(s). Please report this to " 524 "inhibit bit(s).\n", mmc_hostname(host->mmc));
530 BUGMAIL ".\n", mmc_hostname(host->mmc));
531 sdhci_dumpregs(host); 525 sdhci_dumpregs(host);
532 cmd->error = MMC_ERR_FAILED; 526 cmd->error = MMC_ERR_FAILED;
533 tasklet_schedule(&host->finish_tasklet); 527 tasklet_schedule(&host->finish_tasklet);
@@ -548,8 +542,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
548 sdhci_set_transfer_mode(host, cmd->data); 542 sdhci_set_transfer_mode(host, cmd->data);
549 543
550 if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { 544 if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) {
551 printk(KERN_ERR "%s: Unsupported response type! " 545 printk(KERN_ERR "%s: Unsupported response type!\n",
552 "Please report this to " BUGMAIL ".\n",
553 mmc_hostname(host->mmc)); 546 mmc_hostname(host->mmc));
554 cmd->error = MMC_ERR_INVALID; 547 cmd->error = MMC_ERR_INVALID;
555 tasklet_schedule(&host->finish_tasklet); 548 tasklet_schedule(&host->finish_tasklet);
@@ -647,9 +640,8 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
647 while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL)) 640 while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL))
648 & SDHCI_CLOCK_INT_STABLE)) { 641 & SDHCI_CLOCK_INT_STABLE)) {
649 if (timeout == 0) { 642 if (timeout == 0) {
650 printk(KERN_ERR "%s: Internal clock never stabilised. " 643 printk(KERN_ERR "%s: Internal clock never "
651 "Please report this to " BUGMAIL ".\n", 644 "stabilised.\n", mmc_hostname(host->mmc));
652 mmc_hostname(host->mmc));
653 sdhci_dumpregs(host); 645 sdhci_dumpregs(host);
654 return; 646 return;
655 } 647 }
@@ -899,9 +891,8 @@ static void sdhci_timeout_timer(unsigned long data)
899 spin_lock_irqsave(&host->lock, flags); 891 spin_lock_irqsave(&host->lock, flags);
900 892
901 if (host->mrq) { 893 if (host->mrq) {
902 printk(KERN_ERR "%s: Timeout waiting for hardware interrupt. " 894 printk(KERN_ERR "%s: Timeout waiting for hardware "
903 "Please report this to " BUGMAIL ".\n", 895 "interrupt.\n", mmc_hostname(host->mmc));
904 mmc_hostname(host->mmc));
905 sdhci_dumpregs(host); 896 sdhci_dumpregs(host);
906 897
907 if (host->data) { 898 if (host->data) {
@@ -935,8 +926,6 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
935 printk(KERN_ERR "%s: Got command interrupt even though no " 926 printk(KERN_ERR "%s: Got command interrupt even though no "
936 "command operation was in progress.\n", 927 "command operation was in progress.\n",
937 mmc_hostname(host->mmc)); 928 mmc_hostname(host->mmc));
938 printk(KERN_ERR "%s: Please report this to " BUGMAIL ".\n",
939 mmc_hostname(host->mmc));
940 sdhci_dumpregs(host); 929 sdhci_dumpregs(host);
941 return; 930 return;
942 } 931 }
@@ -972,8 +961,6 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
972 printk(KERN_ERR "%s: Got data interrupt even though no " 961 printk(KERN_ERR "%s: Got data interrupt even though no "
973 "data operation was in progress.\n", 962 "data operation was in progress.\n",
974 mmc_hostname(host->mmc)); 963 mmc_hostname(host->mmc));
975 printk(KERN_ERR "%s: Please report this to " BUGMAIL ".\n",
976 mmc_hostname(host->mmc));
977 sdhci_dumpregs(host); 964 sdhci_dumpregs(host);
978 965
979 return; 966 return;
@@ -1045,8 +1032,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
1045 intmask &= SDHCI_INT_BUS_POWER; 1032 intmask &= SDHCI_INT_BUS_POWER;
1046 1033
1047 if (intmask) { 1034 if (intmask) {
1048 printk(KERN_ERR "%s: Unexpected interrupt 0x%08x. Please " 1035 printk(KERN_ERR "%s: Unexpected interrupt 0x%08x.\n",
1049 "report this to " BUGMAIL ".\n",
1050 mmc_hostname(host->mmc), intmask); 1036 mmc_hostname(host->mmc), intmask);
1051 sdhci_dumpregs(host); 1037 sdhci_dumpregs(host);
1052 1038
@@ -1528,8 +1514,7 @@ static struct pci_driver sdhci_driver = {
1528static int __init sdhci_drv_init(void) 1514static int __init sdhci_drv_init(void)
1529{ 1515{
1530 printk(KERN_INFO DRIVER_NAME 1516 printk(KERN_INFO DRIVER_NAME
1531 ": Secure Digital Host Controller Interface driver, " 1517 ": Secure Digital Host Controller Interface driver\n");
1532 DRIVER_VERSION "\n");
1533 printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); 1518 printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n");
1534 1519
1535 return pci_register_driver(&sdhci_driver); 1520 return pci_register_driver(&sdhci_driver);
@@ -1551,7 +1536,6 @@ module_param(debug_quirks, uint, 0444);
1551 1536
1552MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); 1537MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
1553MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); 1538MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver");
1554MODULE_VERSION(DRIVER_VERSION);
1555MODULE_LICENSE("GPL"); 1539MODULE_LICENSE("GPL");
1556 1540
1557MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); 1541MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)");