[PATCH] 85xxCDS: Make sure restart resets the PCI bus.

Mark A. Greer mgreer at mvista.com
Fri Jun 8 08:29:12 EST 2007


On Thu, Jun 07, 2007 at 01:38:07PM -0700, Randy Vinson wrote:
> --- 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



More information about the Linuxppc-dev mailing list