[PATCH 2/2] clk for mpc52xx: use psc_mclk's in spi driver

Domen Puncer domen.puncer at telargo.com
Mon Oct 15 15:16:31 EST 2007


On 14/10/07 16:42 -0600, Grant Likely wrote:
> On 10/14/07, Domen Puncer <domen.puncer at telargo.com> wrote:
> > Use clocks subsystem in spi driver.
> 
> I don't understand the advantage of this approach.  Is the current code broken?

Actually the calculations are broken. But ok, fix doesn't need to be like this.

And it wasn't my idea to use clk.h :-)
http://patchwork.ozlabs.org/linuxppc-embedded/patch?id=11186

> 
> I agree that abstraction is good; but in this case it seems these two
> patches add a lot of code for a very simple calculation.  Also, there
> is exactly 2 chips that use these devices, the mpc5200 and the
> mpc5200b, and they are both wired up in exactly the same way.  I'm
> inclined to believe that splitting of reading of the CDM into a
> separate driver (or at least using the clk infrastructure) is over the
> edge of diminishing returns.  However, I could be convinced that
> having a utility function for setting the PSC clock rate is a useful
> thing, but until arch/ppc goes away, you should support it in both
> arch/ppc and arch/powerpc.
> 
> Cheers,
> g.
> 
> -- 
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> grant.likely at secretlab.ca
> (403) 399-0195

-- 
Domen Puncer | Research & Development
.............................................................................................
Telargo d.o.o. | Zagrebška cesta 20 | 2000 Maribor | Slovenia
.............................................................................................
www.telargo.com



More information about the Linuxppc-dev mailing list