diff options
Diffstat (limited to 'arch/sh/drivers/pci/pcie-sh7786.c')
-rw-r--r-- | arch/sh/drivers/pci/pcie-sh7786.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index 21854ebbaa7c..aacd0fc4cdd5 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c | |||
@@ -341,9 +341,12 @@ static int pcie_init(struct sh7786_pcie_port *port) | |||
341 | data |= PCIEMACCTLR_SCR_DIS | (0xff << 16); | 341 | data |= PCIEMACCTLR_SCR_DIS | (0xff << 16); |
342 | pci_write_reg(chan, data, SH4A_PCIEMACCTLR); | 342 | pci_write_reg(chan, data, SH4A_PCIEMACCTLR); |
343 | 343 | ||
344 | /* | ||
345 | * This will timeout if we don't have a link, but we permit the | ||
346 | * port to register anyways in order to support hotplug on future | ||
347 | * hardware. | ||
348 | */ | ||
344 | ret = pci_wait_for_irq(chan, MASK_INT_TX_CTRL); | 349 | ret = pci_wait_for_irq(chan, MASK_INT_TX_CTRL); |
345 | if (unlikely(ret != 0)) | ||
346 | return -ENODEV; | ||
347 | 350 | ||
348 | data = pci_read_reg(chan, SH4A_PCIEPCICONF1); | 351 | data = pci_read_reg(chan, SH4A_PCIEPCICONF1); |
349 | data &= ~(PCI_STATUS_DEVSEL_MASK << 16); | 352 | data &= ~(PCI_STATUS_DEVSEL_MASK << 16); |
@@ -356,9 +359,13 @@ static int pcie_init(struct sh7786_pcie_port *port) | |||
356 | 359 | ||
357 | wmb(); | 360 | wmb(); |
358 | 361 | ||
359 | data = pci_read_reg(chan, SH4A_PCIEMACSR); | 362 | if (ret == 0) { |
360 | printk(KERN_NOTICE "PCI: PCIe#%d link width %d\n", | 363 | data = pci_read_reg(chan, SH4A_PCIEMACSR); |
361 | port->index, (data >> 20) & 0x3f); | 364 | printk(KERN_NOTICE "PCI: PCIe#%d x%d link detected\n", |
365 | port->index, (data >> 20) & 0x3f); | ||
366 | } else | ||
367 | printk(KERN_NOTICE "PCI: PCIe#%d link down\n", | ||
368 | port->index); | ||
362 | 369 | ||
363 | for (i = win = 0; i < chan->nr_resources; i++) { | 370 | for (i = win = 0; i < chan->nr_resources; i++) { |
364 | struct resource *res = chan->resources + i; | 371 | struct resource *res = chan->resources + i; |