Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31657
b: refs/heads/master
c: 4a96550
h: refs/heads/master
i:
  31655: 401e148
v: v3
  • Loading branch information
Pierre Ossman authored and Russell King committed Jul 2, 2006
1 parent b35977f commit c50b3df
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd2208d7c72ef5995b730f1e23b082261499e334
refs/heads/master: 4a9655051fb1efa568e53baf5dfb21e33bad6bf6
11 changes: 11 additions & 0 deletions trunk/drivers/mmc/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ static int sdhci_resume (struct pci_dev *pdev)
static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
{
int ret;
unsigned int version;
struct sdhci_chip *chip;
struct mmc_host *mmc;
struct sdhci_host *host;
Expand Down Expand Up @@ -1131,6 +1132,16 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
goto release;
}

version = readw(host->ioaddr + SDHCI_HOST_VERSION);
version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT;
if (version != 0) {
printk(KERN_ERR "%s: Unknown controller version (%d). "
"Cowardly refusing to continue.\n", host->slot_descr,
version);
ret = -ENODEV;
goto unmap;
}

caps = readl(host->ioaddr + SDHCI_CAPABILITIES);

if ((caps & SDHCI_CAN_DO_DMA) && ((pdev->class & 0x0000FF) == 0x01))
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/mmc/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
#define SDHCI_SLOT_INT_STATUS 0xFC

#define SDHCI_HOST_VERSION 0xFE
#define SDHCI_VENDOR_VER_MASK 0xFF00
#define SDHCI_VENDOR_VER_SHIFT 8
#define SDHCI_SPEC_VER_MASK 0x00FF
#define SDHCI_SPEC_VER_SHIFT 0

struct sdhci_chip;

Expand Down

0 comments on commit c50b3df

Please sign in to comment.