[PATCH] powerpc/5200: tighten up ac97 reset timing
Wolfram Sang
w.sang at pengutronix.de
Sat Sep 4 02:22:24 EST 2010
> >> - udelay(2);
> >> + udelay(1);
> >>
> >> /* Deassert reset */
> >> setbits8(&wkup_gpio->wkup_dvo, reset);
> >>
> >> + /* wait at least 200ns */
> >> + __delay(7);
> >
> > ndelay(200)?
>
> Is ndelay defined for powerpc? I was under the impression that it was
> being redefined to udelay in linux/delay.h.
>
> #ifndef ndelay
> static inline void ndelay(unsigned long x)
> {
> udelay(DIV_ROUND_UP(x, 1000));
> }
> #define ndelay(x) ndelay(x)
> #endif
Yes, but it is way more readable. Does the extra delay hurt? The value
of 7 looks a bit magic to me. Are you sure it will do for various clock
frequencies?
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100903/734608d0/attachment.pgp>
More information about the Linuxppc-dev
mailing list