aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/at91_mci.c2
-rw-r--r--drivers/mmc/host/au1xmmc.c2
-rw-r--r--drivers/mmc/host/imxmmc.c2
-rw-r--r--drivers/mmc/host/mmci.c2
-rw-r--r--drivers/mmc/host/mmci.h2
-rw-r--r--drivers/mmc/host/omap.c2
-rw-r--r--drivers/mmc/host/pxamci.c2
-rw-r--r--drivers/mmc/host/sdhci.c63
-rw-r--r--drivers/mmc/host/sdhci.h2
-rw-r--r--drivers/mmc/host/wbsd.c15
-rw-r--r--drivers/mmc/host/wbsd.h2
11 files changed, 47 insertions, 49 deletions
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 15aab374127e..62564ccde03a 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/at91_mci.c - ATMEL AT91 MCI Driver 2 * linux/drivers/mmc/host/at91_mci.c - ATMEL AT91 MCI Driver
3 * 3 *
4 * Copyright (C) 2005 Cougar Creek Computing Devices Ltd, All Rights Reserved 4 * Copyright (C) 2005 Cougar Creek Computing Devices Ltd, All Rights Reserved
5 * 5 *
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 52b63f11ddd6..34c99d4ea041 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/au1xmmc.c - AU1XX0 MMC driver 2 * linux/drivers/mmc/host/au1xmmc.c - AU1XX0 MMC driver
3 * 3 *
4 * Copyright (c) 2005, Advanced Micro Devices, Inc. 4 * Copyright (c) 2005, Advanced Micro Devices, Inc.
5 * 5 *
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index 7ee2045acbef..54bfc9f25596 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/imxmmc.c - Motorola i.MX MMCI driver 2 * linux/drivers/mmc/host/imxmmc.c - Motorola i.MX MMCI driver
3 * 3 *
4 * Copyright (C) 2004 Sascha Hauer, Pengutronix <sascha@saschahauer.de> 4 * Copyright (C) 2004 Sascha Hauer, Pengutronix <sascha@saschahauer.de>
5 * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com> 5 * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com>
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index d11c2d23ceea..be730c0a0352 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/mmci.c - ARM PrimeCell MMCI PL180/1 driver 2 * linux/drivers/mmc/host/mmci.c - ARM PrimeCell MMCI PL180/1 driver
3 * 3 *
4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. 4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved.
5 * 5 *
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index 6d7eadc9a678..000e6a919782 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/mmci.h - ARM PrimeCell MMCI PL180/1 driver 2 * linux/drivers/mmc/host/mmci.h - ARM PrimeCell MMCI PL180/1 driver
3 * 3 *
4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. 4 * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved.
5 * 5 *
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b0824a38f425..0cf97edc5f58 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/media/mmc/omap.c 2 * linux/drivers/mmc/host/omap.c
3 * 3 *
4 * Copyright (C) 2004 Nokia Corporation 4 * Copyright (C) 2004 Nokia Corporation
5 * Written by Tuukka Tikkanen and Juha Yrjölä<juha.yrjola@nokia.com> 5 * Written by Tuukka Tikkanen and Juha Yrjölä<juha.yrjola@nokia.com>
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index f8985c508bb9..ff960334b337 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/pxa.c - PXA MMCI driver 2 * linux/drivers/mmc/host/pxa.c - PXA MMCI driver
3 * 3 *
4 * Copyright (C) 2003 Russell King, All Rights Reserved. 4 * Copyright (C) 2003 Russell King, All Rights Reserved.
5 * 5 *
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4a24db028d87..f2bc87ac24f7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/sdhci.c - Secure Digital Host Controller Interface driver 2 * linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface driver
3 * 3 *
4 * Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved. 4 * Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved.
5 * 5 *
@@ -34,6 +34,7 @@ static unsigned int debug_quirks = 0;
34/* Controller doesn't like some resets when there is no card inserted. */ 34/* Controller doesn't like some resets when there is no card inserted. */
35#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2) 35#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2)
36#define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3) 36#define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3)
37#define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS (1<<4)
37 38
38static const struct pci_device_id pci_ids[] __devinitdata = { 39static const struct pci_device_id pci_ids[] __devinitdata = {
39 { 40 {
@@ -78,6 +79,24 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
78 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE, 79 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE,
79 }, 80 },
80 81
82 {
83 .vendor = PCI_VENDOR_ID_ENE,
84 .device = PCI_DEVICE_ID_ENE_CB714_SD,
85 .subvendor = PCI_ANY_ID,
86 .subdevice = PCI_ANY_ID,
87 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE |
88 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS,
89 },
90
91 {
92 .vendor = PCI_VENDOR_ID_ENE,
93 .device = PCI_DEVICE_ID_ENE_CB714_SD_2,
94 .subvendor = PCI_ANY_ID,
95 .subdevice = PCI_ANY_ID,
96 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE |
97 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS,
98 },
99
81 { /* Generic SD host controller */ 100 { /* Generic SD host controller */
82 PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00) 101 PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
83 }, 102 },
@@ -361,11 +380,6 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
361 if (data == NULL) 380 if (data == NULL)
362 return; 381 return;
363 382
364 DBG("blksz %04x blks %04x flags %08x\n",
365 data->blksz, data->blocks, data->flags);
366 DBG("tsac %d ms nsac %d clk\n",
367 data->timeout_ns / 1000000, data->timeout_clks);
368
369 /* Sanity checks */ 383 /* Sanity checks */
370 BUG_ON(data->blksz * data->blocks > 524288); 384 BUG_ON(data->blksz * data->blocks > 524288);
371 BUG_ON(data->blksz > host->mmc->max_blk_size); 385 BUG_ON(data->blksz > host->mmc->max_blk_size);
@@ -476,8 +490,6 @@ static void sdhci_finish_data(struct sdhci_host *host)
476 data->error = MMC_ERR_FAILED; 490 data->error = MMC_ERR_FAILED;
477 } 491 }
478 492
479 DBG("Ending data transfer (%d bytes)\n", data->bytes_xfered);
480
481 if (data->stop) { 493 if (data->stop) {
482 /* 494 /*
483 * The controller needs a reset of internal state machines 495 * The controller needs a reset of internal state machines
@@ -501,8 +513,6 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
501 513
502 WARN_ON(host->cmd); 514 WARN_ON(host->cmd);
503 515
504 DBG("Sending cmd (%x)\n", cmd->opcode);
505
506 /* Wait max 10 ms */ 516 /* Wait max 10 ms */
507 timeout = 10; 517 timeout = 10;
508 518
@@ -590,8 +600,6 @@ static void sdhci_finish_command(struct sdhci_host *host)
590 600
591 host->cmd->error = MMC_ERR_NONE; 601 host->cmd->error = MMC_ERR_NONE;
592 602
593 DBG("Ending cmd (%x)\n", host->cmd->opcode);
594
595 if (host->cmd->data) 603 if (host->cmd->data)
596 host->data = host->cmd->data; 604 host->data = host->cmd->data;
597 else 605 else
@@ -759,6 +767,14 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
759 767
760 writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL); 768 writeb(ctrl, host->ioaddr + SDHCI_HOST_CONTROL);
761 769
770 /*
771 * Some (ENE) controllers go apeshit on some ios operation,
772 * signalling timeout and CRC errors even on CMD0. Resetting
773 * it on each ios seems to solve the problem.
774 */
775 if(host->chip->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS)
776 sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
777
762 mmiowb(); 778 mmiowb();
763 spin_unlock_irqrestore(&host->lock, flags); 779 spin_unlock_irqrestore(&host->lock, flags);
764} 780}
@@ -835,8 +851,6 @@ static void sdhci_tasklet_finish(unsigned long param)
835 851
836 mrq = host->mrq; 852 mrq = host->mrq;
837 853
838 DBG("Ending request, cmd (%x)\n", mrq->cmd->opcode);
839
840 /* 854 /*
841 * The controller needs a reset of internal state machines 855 * The controller needs a reset of internal state machines
842 * upon error conditions. 856 * upon error conditions.
@@ -922,20 +936,17 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
922 return; 936 return;
923 } 937 }
924 938
925 if (intmask & SDHCI_INT_RESPONSE) 939 if (intmask & SDHCI_INT_TIMEOUT)
926 sdhci_finish_command(host); 940 host->cmd->error = MMC_ERR_TIMEOUT;
927 else { 941 else if (intmask & SDHCI_INT_CRC)
928 if (intmask & SDHCI_INT_TIMEOUT) 942 host->cmd->error = MMC_ERR_BADCRC;
929 host->cmd->error = MMC_ERR_TIMEOUT; 943 else if (intmask & (SDHCI_INT_END_BIT | SDHCI_INT_INDEX))
930 else if (intmask & SDHCI_INT_CRC) 944 host->cmd->error = MMC_ERR_FAILED;
931 host->cmd->error = MMC_ERR_BADCRC;
932 else if (intmask & (SDHCI_INT_END_BIT | SDHCI_INT_INDEX))
933 host->cmd->error = MMC_ERR_FAILED;
934 else
935 host->cmd->error = MMC_ERR_INVALID;
936 945
946 if (host->cmd->error != MMC_ERR_NONE)
937 tasklet_schedule(&host->finish_tasklet); 947 tasklet_schedule(&host->finish_tasklet);
938 } 948 else if (intmask & SDHCI_INT_RESPONSE)
949 sdhci_finish_command(host);
939} 950}
940 951
941static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) 952static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index a6c870480b8a..d157776c1149 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/sdhci.h - Secure Digital Host Controller Interface driver 2 * linux/drivers/mmc/host/sdhci.h - Secure Digital Host Controller Interface driver
3 * 3 *
4 * Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved. 4 * Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved.
5 * 5 *
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 867ca6a69298..e0c9808fd424 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/wbsd.c - Winbond W83L51xD SD/MMC driver 2 * linux/drivers/mmc/host/wbsd.c - Winbond W83L51xD SD/MMC driver
3 * 3 *
4 * Copyright (C) 2004-2007 Pierre Ossman, All Rights Reserved. 4 * Copyright (C) 2004-2007 Pierre Ossman, All Rights Reserved.
5 * 5 *
@@ -207,8 +207,6 @@ static void wbsd_request_end(struct wbsd_host *host, struct mmc_request *mrq)
207{ 207{
208 unsigned long dmaflags; 208 unsigned long dmaflags;
209 209
210 DBGF("Ending request, cmd (%x)\n", mrq->cmd->opcode);
211
212 if (host->dma >= 0) { 210 if (host->dma >= 0) {
213 /* 211 /*
214 * Release ISA DMA controller. 212 * Release ISA DMA controller.
@@ -360,8 +358,6 @@ static void wbsd_send_command(struct wbsd_host *host, struct mmc_command *cmd)
360 int i; 358 int i;
361 u8 status, isr; 359 u8 status, isr;
362 360
363 DBGF("Sending cmd (%x)\n", cmd->opcode);
364
365 /* 361 /*
366 * Clear accumulated ISR. The interrupt routine 362 * Clear accumulated ISR. The interrupt routine
367 * will fill this one with events that occur during 363 * will fill this one with events that occur during
@@ -411,8 +407,6 @@ static void wbsd_send_command(struct wbsd_host *host, struct mmc_command *cmd)
411 wbsd_get_short_reply(host, cmd); 407 wbsd_get_short_reply(host, cmd);
412 } 408 }
413 } 409 }
414
415 DBGF("Sent cmd (%x), res %d\n", cmd->opcode, cmd->error);
416} 410}
417 411
418/* 412/*
@@ -550,11 +544,6 @@ static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
550 unsigned long dmaflags; 544 unsigned long dmaflags;
551 unsigned int size; 545 unsigned int size;
552 546
553 DBGF("blksz %04x blks %04x flags %08x\n",
554 data->blksz, data->blocks, data->flags);
555 DBGF("tsac %d ms nsac %d clk\n",
556 data->timeout_ns / 1000000, data->timeout_clks);
557
558 /* 547 /*
559 * Calculate size. 548 * Calculate size.
560 */ 549 */
@@ -752,8 +741,6 @@ static void wbsd_finish_data(struct wbsd_host *host, struct mmc_data *data)
752 } 741 }
753 } 742 }
754 743
755 DBGF("Ending data transfer (%d bytes)\n", data->bytes_xfered);
756
757 wbsd_request_end(host, host->mrq); 744 wbsd_request_end(host, host->mrq);
758} 745}
759 746
diff --git a/drivers/mmc/host/wbsd.h b/drivers/mmc/host/wbsd.h
index 873bda1e59b4..0877866f8d28 100644
--- a/drivers/mmc/host/wbsd.h
+++ b/drivers/mmc/host/wbsd.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/mmc/wbsd.h - Winbond W83L51xD SD/MMC driver 2 * linux/drivers/mmc/host/wbsd.h - Winbond W83L51xD SD/MMC driver
3 * 3 *
4 * Copyright (C) 2004-2007 Pierre Ossman, All Rights Reserved. 4 * Copyright (C) 2004-2007 Pierre Ossman, All Rights Reserved.
5 * 5 *