Re: [PATCH] 85xxCDS: Make sure restart resets the PCI bus.
From: Mark A. Greer <hidden>
Date: 2007-06-07 22:28:17
On Thu, Jun 07, 2007 at 01:38:07PM -0700, Randy Vinson wrote:
quoted hunk ↗ jump to hunk
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686,
+ NULL))) {
+
+ /* Use the VIA Super Southbridge to force a PCI reset */
+ pci_read_config_byte(dev, 0x47, &tmp);
+ pci_write_config_byte(dev, 0x47, tmp | 1);How about adding another "pci_read_config_byte(dev, 0x47, &tmp);" to flush the write out of any fifo's and adding a comment that explains that once that write hits the hardware, the reset is essentially instantaneous. IOW, there isn't a race between this reset and the reset you'd call if/when it falls out of this 'if'.
+ + pci_dev_put(dev); + } + + /* + * We should only get here if the P2P bridge is disabled. In that + * case, just use the default reset. + */ + mpc85xx_restart(NULL);
Mark