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.

Reply via email to