[PATCH] spi/mpc52xx: check for invalid PSC usage

Grant Likely grant.likely at secretlab.ca
Tue Nov 3 05:03:24 EST 2009


On Mon, Nov 2, 2009 at 6:53 AM, Wolfram Sang <w.sang at pengutronix.de> wrote:
>> I wouldn't even bother.  It's not actively dangerous to try and use
>> PSC{4,5} in SPI mode.  It just not going to work.  Besides, the
>> MPC5200 common code already checks for an invalid PSC number when
>> setting the clock divisor.
>>
>> Have you seen cases of users trying to do the wrong thing with the
>> crippled PSCs?
>
> Yes, that was the reason for this patch :) How about this patch to give users a
> better idea than just -ENODEV via set_psc_clkdiv? ...[/me hacks]...
> Uuuh, there is even a bug which makes the case go unnoticed.

Sure.  This looks okay to me.  I'll pick it up.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-dev mailing list