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

Jon Smirl jonsmirl at gmail.com
Wed May 27 10:44:45 EST 2009


On Tue, May 26, 2009 at 8:38 PM, Timur Tabi <timur at freescale.com> wrote:
> On Tue, May 26, 2009 at 7:25 PM, Jon Smirl <jonsmirl at gmail.com> wrote:
>
>> -       spin_event_timeout(0, 10, 0, rc);
>> +       spin_event_timeout(0, 10, 0);
>>        out_8(&regs->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 explain why you're not using udelay() here.

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.

I have to delay 50us because ALSA tries to access the hardware
immediately after the function returns.

>
> --
> Timur Tabi
> Linux kernel developer at Freescale
>



-- 
Jon Smirl
jonsmirl at gmail.com



More information about the Linuxppc-dev mailing list