]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/sdhci.c
[MMC] sdhci: print device id
[linux-2.6-omap-h63xx.git] / drivers / mmc / sdhci.c
index 8e9100bd57ef96596d9fd17884097f1da5b16f84..405b6158cb6c0e65600cb0ea8630d4f407c0733e 100644 (file)
@@ -1030,7 +1030,14 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
        else /* XXX: Hack to get MMC layer to avoid highmem */
                pdev->dma_mask = 0;
 
-       host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
+       host->max_clk =
+               (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
+       if (host->max_clk == 0) {
+               printk(KERN_ERR "%s: Hardware doesn't specify base clock "
+                       "frequency.\n", host->slot_descr);
+               ret = -ENODEV;
+               goto unmap;
+       }
        host->max_clk *= 1000000;
 
        /*
@@ -1078,7 +1085,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
        ret = request_irq(host->irq, sdhci_irq, SA_SHIRQ,
                host->slot_descr, host);
        if (ret)
-               goto unmap;
+               goto untasklet;
 
        sdhci_init(host);
 
@@ -1097,10 +1104,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
 
        return 0;
 
-unmap:
+untasklet:
        tasklet_kill(&host->card_tasklet);
        tasklet_kill(&host->finish_tasklet);
-
+unmap:
        iounmap(host->ioaddr);
 release:
        pci_release_region(pdev, host->bar);
@@ -1144,13 +1151,18 @@ static int __devinit sdhci_probe(struct pci_dev *pdev,
        const struct pci_device_id *ent)
 {
        int ret, i;
-       u8 slots;
+       u8 slots, rev;
        struct sdhci_chip *chip;
 
        BUG_ON(pdev == NULL);
        BUG_ON(ent == NULL);
 
-       DBG("found at %s\n", pci_name(pdev));
+       pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
+
+       printk(KERN_INFO DRIVER_NAME
+               ": SDHCI controller found at %s [%04x:%04x] (rev %x)\n",
+               pci_name(pdev), (int)pdev->vendor, (int)pdev->device,
+               (int)rev);
 
        ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots);
        if (ret)