Subject: Re: [PATCH 35/46] cpufreq: pxa3: move clk register access to clk driver

From: Stephen Boyd <[email-masked]>
Date: Fri, 08 Nov 2019 13:59:31 -0800

Quoting Robert Jarzmik (2019-10-30 13:42:35)
> Stephen Boyd <[email-masked]> writes:
> 
> > Quoting Arnd Bergmann (2019-10-18 08:41:50)
> >> +void pxa3xx_clk_update_accr(u32 disable, u32 enable, u32 xclkcfg, u32 mask)
> >> +{
> >> +       u32 accr = ACCR;
> >> +
> >> +       accr &= ~disable;
> >> +       accr |= enable;
> >> +
> >> +       ACCR = accr;
> >> +       if (xclkcfg)
> >> +               __asm__("mcr p14, 0, %0, c6, c0, 0\n" : : "r"(xclkcfg));
> >
> > It's just a coprocessor instruction though? I don't see what this has to
> > do with clks that we model in the kernel? Why can't it just be put in
> > the cpufreq driver that calls it?
> I think you forget the "ACCR = accr", which is an MMIO register write. ACCR
> stands for "Application Subsystem Clock Configuration Register", so I think Arnd
> is right to put it in here.
> 
> As for the broader question you ask, about the cpufreq driver, the reason is
> unfortunately "historic" : pxa3xx cpufreq driver doesn't use the clock framework
> to set the bus clocks, but does it by directly accessing the registers : old
> platform, old ways, etc ...
> 

Ah ok. I missed the writel at the end of the function.

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel