Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38356
b: refs/heads/master
c: 8a4da14
h: refs/heads/master
v: v3
  • Loading branch information
Pierre Ossman authored and Linus Torvalds committed Oct 4, 2006
1 parent 98f807a commit 656b724
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f25a66f6bbac563c94af94f03491b3ae43c40af
refs/heads/master: 8a4da1430f7f2a16df3be9c7b5d55ba4e75b708c
17 changes: 13 additions & 4 deletions trunk/drivers/mmc/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ static unsigned int debug_quirks = 0;

#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0)
#define SDHCI_QUIRK_FORCE_DMA (1<<1)
/* Controller doesn't like some resets when there is no card inserted. */
#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2)

static const struct pci_device_id pci_ids[] __devinitdata = {
{
Expand All @@ -51,7 +53,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
.device = PCI_DEVICE_ID_RICOH_R5C822,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = SDHCI_QUIRK_FORCE_DMA,
.driver_data = SDHCI_QUIRK_FORCE_DMA |
SDHCI_QUIRK_NO_CARD_NO_RESET,
},

{
Expand Down Expand Up @@ -125,6 +128,12 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
{
unsigned long timeout;

if (host->chip->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) {
if (!(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
SDHCI_CARD_PRESENT))
return;
}

writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET);

if (mask & SDHCI_RESET_ALL)
Expand Down Expand Up @@ -1174,6 +1183,9 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
host = mmc_priv(mmc);
host->mmc = mmc;

host->chip = chip;
chip->hosts[slot] = host;

host->bar = first_bar + slot;

host->addr = pci_resource_start(pdev, host->bar);
Expand Down Expand Up @@ -1330,9 +1342,6 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
sdhci_dumpregs(host);
#endif

host->chip = chip;
chip->hosts[slot] = host;

mmiowb();

mmc_add_host(mmc);
Expand Down

0 comments on commit 656b724

Please sign in to comment.