[PATCH 1/3] ppc32: Fix a few issues in Yucca PCIe functionality
Roland Dreier
rolandd at cisco.com
Thu Dec 1 05:09:42 EST 2005
This looks OK, although I would prefer to see this split into a few
patches, for example, first kill off dead code, then add more error
checking, and so on.
Also, one question/comment:
> @@ -335,44 +337,47 @@ int ppc440spe_init_pcie_rootport(int por
> /*
> * Check for VC0 active and assert RDY.
> */
> +
> + attempts = 10;
> switch (port) {
> case 0:
> - if (!(SDR_READ(PESDR0_RCSSTS) & (1 << 16)))
> - printk(KERN_WARNING "PCIE0: VC0 not active\n");
> + while(!(SDR_READ(PESDR0_RCSSTS) & (1 << 16))) {
> + if (!(attempts--)) {
> + printk(KERN_WARNING "PCIE0: VC0 not active\n");
> + return -1;
> + }
> + mdelay(1000);
> + }
> SDR_WRITE(PESDR0_RCSSET, SDR_READ(PESDR0_RCSSET) | 1 << 20);
what lead you to add 10 tries here? Did this fix an issue you saw
with a device?
- R.
More information about the Linuxppc-embedded
mailing list