Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

From: Ingo Molnar
Date: Sun Jan 22 2017 - 04:04:49 EST



* Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> wrote:

> >
> >> +static void xdbc_runtime_delay(unsigned long count)
> >> +{
> >> + udelay(count);
> >> +}
> >> +static void (*xdbc_delay)(unsigned long) = xdbc_early_delay;
> > Is this udelay() complication really necessary? udelay() should work fine even in
> > early code. It might not be precisely calibrated, but should be good enough.
>
> I tried udelay() in the early code. It's not precise enough for the
> hardware handshaking.

Possibly because on x86 early udelay() did not work at all - i.e. there's no delay
whatsoever.

Could you try it on top of this commit in tip:timers/core:

4c45c5167c95 x86/timer: Make delay() work during early bootup

?

Thanks,

Ingo