[PATCH 2/5] ppc32: verbose error checking for Yucca PCIE initialization
From: Ruslan V. Sushko <hidden>
Date: 2005-12-06 12:49:55
quoted
+> + 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?
I haven't saw any error but this is potential issue because this flag asserts only then PCI Express port initialization is completed. I guess the initialization sequences assumes time using. Therefore the error may appears in future revision of the boards if Core clock will grow up. Nevertheless I do not know the time which is necessary for completeness, so I add this just to be safe. Signed-off-by: Ruslan V. Sushko <redacted>