aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/sdhci.c40
-rw-r--r--drivers/mmc/tifm_sd.c11
-rw-r--r--drivers/mmc/wbsd.c6
3 files changed, 17 insertions, 40 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 4bf1fea5e2c4..7522f76b15ec 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)");
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c
index e65f8a0a9349..0581d09c58fc 100644
--- a/drivers/mmc/tifm_sd.c
+++ b/drivers/mmc/tifm_sd.c
@@ -36,8 +36,8 @@ module_param(fixed_timeout, bool, 0644);
36#define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ 36#define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */
37#define TIFM_MMCSD_READ 0x8000 37#define TIFM_MMCSD_READ 0x8000
38 38
39#define TIFM_MMCSD_DATAMASK 0x001d /* set bits: EOFB, BRS, CB, EOC */ 39#define TIFM_MMCSD_DATAMASK 0x401d /* set bits: CERR, EOFB, BRS, CB, EOC */
40#define TIFM_MMCSD_ERRMASK 0x41e0 /* set bits: CERR, CCRC, CTO, DCRC, DTO */ 40#define TIFM_MMCSD_ERRMASK 0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */
41#define TIFM_MMCSD_EOC 0x0001 /* end of command phase */ 41#define TIFM_MMCSD_EOC 0x0001 /* end of command phase */
42#define TIFM_MMCSD_CB 0x0004 /* card enter busy state */ 42#define TIFM_MMCSD_CB 0x0004 /* card enter busy state */
43#define TIFM_MMCSD_BRS 0x0008 /* block received/sent */ 43#define TIFM_MMCSD_BRS 0x0008 /* block received/sent */
@@ -242,7 +242,7 @@ change_state:
242 case IDLE: 242 case IDLE:
243 return; 243 return;
244 case CMD: 244 case CMD:
245 if (host_status & TIFM_MMCSD_EOC) { 245 if (host_status & (TIFM_MMCSD_EOC | TIFM_MMCSD_CERR)) {
246 tifm_sd_fetch_resp(cmd, sock); 246 tifm_sd_fetch_resp(cmd, sock);
247 if (cmd->data) { 247 if (cmd->data) {
248 host->state = BRS; 248 host->state = BRS;
@@ -341,10 +341,7 @@ static void tifm_sd_signal_irq(struct tifm_dev *sock,
341 goto done; 341 goto done;
342 342
343 if (host_status & TIFM_MMCSD_ERRMASK) { 343 if (host_status & TIFM_MMCSD_ERRMASK) {
344 if (host_status & TIFM_MMCSD_CERR) 344 if (host_status & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
345 error_code = MMC_ERR_FAILED;
346 else if (host_status
347 & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
348 error_code = MMC_ERR_TIMEOUT; 345 error_code = MMC_ERR_TIMEOUT;
349 else if (host_status 346 else if (host_status
350 & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC)) 347 & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC))
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index a44d8777ab9f..05ccfc43168f 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -42,7 +42,6 @@
42#include "wbsd.h" 42#include "wbsd.h"
43 43
44#define DRIVER_NAME "wbsd" 44#define DRIVER_NAME "wbsd"
45#define DRIVER_VERSION "1.6"
46 45
47#define DBG(x...) \ 46#define DBG(x...) \
48 pr_debug(DRIVER_NAME ": " x) 47 pr_debug(DRIVER_NAME ": " x)
@@ -344,7 +343,6 @@ static inline void wbsd_dma_to_sg(struct wbsd_host *host, struct mmc_data *data)
344 memcpy(sgbuf, dmabuf, size); 343 memcpy(sgbuf, dmabuf, size);
345 else 344 else
346 memcpy(sgbuf, dmabuf, sg[i].length); 345 memcpy(sgbuf, dmabuf, sg[i].length);
347 kunmap_atomic(sgbuf, KM_BIO_SRC_IRQ);
348 dmabuf += sg[i].length; 346 dmabuf += sg[i].length;
349 347
350 if (size < sg[i].length) 348 if (size < sg[i].length)
@@ -2101,8 +2099,7 @@ static int __init wbsd_drv_init(void)
2101 int result; 2099 int result;
2102 2100
2103 printk(KERN_INFO DRIVER_NAME 2101 printk(KERN_INFO DRIVER_NAME
2104 ": Winbond W83L51xD SD/MMC card interface driver, " 2102 ": Winbond W83L51xD SD/MMC card interface driver\n");
2105 DRIVER_VERSION "\n");
2106 printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); 2103 printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n");
2107 2104
2108#ifdef CONFIG_PNP 2105#ifdef CONFIG_PNP
@@ -2166,7 +2163,6 @@ module_param(dma, int, 0444);
2166MODULE_LICENSE("GPL"); 2163MODULE_LICENSE("GPL");
2167MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); 2164MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
2168MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver"); 2165MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver");
2169MODULE_VERSION(DRIVER_VERSION);
2170 2166
2171#ifdef CONFIG_PNP 2167#ifdef CONFIG_PNP
2172MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)"); 2168MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)");