Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Grant Likely
On Tue, May 26, 2009 at 9:48 PM, Grant Likely wrote: > First, udelay just burns time, and if the delay is too large, then the > it is wasting time that could be used for something else.  That being > said, it needs to be balanced with the context switch overhead.  If > the udelay() is less than do

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Grant Likely
On Tue, May 26, 2009 at 9:12 PM, Timur Tabi wrote: > On Tue, May 26, 2009 at 8:01 PM, Jon Smirl wrote: > >> Then why did you need to make your routine that calls cpu_relax()? > > That gets called only if delay == 0.  udelay(0) is a no-op, so if the > caller specifies no delay, then I need to manu

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Grant Likely
On Tue, May 26, 2009 at 6:44 PM, Jon Smirl wrote: > On Tue, May 26, 2009 at 8:38 PM, Timur Tabi wrote: >> On Tue, May 26, 2009 at 7:25 PM, Jon Smirl wrote: >> >>> -       spin_event_timeout(0, 10, 0, rc); >>> +       spin_event_timeout(0, 10, 0); >>>        out_8(®s->op0, MPC52xx_PSC_OP_RES); >>

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Timur Tabi
On Tue, May 26, 2009 at 8:01 PM, Jon Smirl wrote: > Then why did you need to make your routine that calls cpu_relax()? That gets called only if delay == 0. udelay(0) is a no-op, so if the caller specifies no delay, then I need to manually call cpu_relax(). > I don't know what goes on in the gu

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Jon Smirl
On Tue, May 26, 2009 at 8:53 PM, Timur Tabi wrote: > On Tue, May 26, 2009 at 7:44 PM, Jon Smirl wrote: > >> Because Grant didn't want me doing udelay(50) just to delay things in >> order to give the AC97 controller time to initialize. Your function >> lets me loop on cpu_relax() for 50us. > > But

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Timur Tabi
On Tue, May 26, 2009 at 7:44 PM, Jon Smirl wrote: > Because Grant didn't want me doing udelay(50) just to delay things in > order to give the AC97 controller time to initialize. Your function > lets me loop on cpu_relax() for 50us. But udelay() calls HMT_low(), which is like cpu_relax(). -- Ti

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Jon Smirl
On Tue, May 26, 2009 at 8:38 PM, Timur Tabi wrote: > On Tue, May 26, 2009 at 7:25 PM, Jon Smirl wrote: > >> -       spin_event_timeout(0, 10, 0, rc); >> +       spin_event_timeout(0, 10, 0); >>        out_8(®s->op0, MPC52xx_PSC_OP_RES); >> -       spin_event_timeout(0, 50, 0, rc); >> +       spin

Re: [alsa-devel] [PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Timur Tabi
On Tue, May 26, 2009 at 7:25 PM, Jon Smirl wrote: > -       spin_event_timeout(0, 10, 0, rc); > +       spin_event_timeout(0, 10, 0); >        out_8(®s->op0, MPC52xx_PSC_OP_RES); > -       spin_event_timeout(0, 50, 0, rc); > +       spin_event_timeout(0, 50, 0); Jon, I'm still hoping you'll expl

[PATCH] Modify mpc5200 AC97 driver to use V9 of spin_event_timeout()

2009-05-26 Thread Jon Smirl
The function signature for spin_event_timeout() has changed in version V9. Adjust the mpc5200 AC97 driver to use the new function. Signed-off-by: Jon Smirl --- sound/soc/fsl/mpc5200_psc_ac97.c | 30 ++ 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a