Re: [PATCH v8 03/10] clk: eyeq5: add platform driver, and init routine at of_clk_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Théo Lebrun (2024-02-29 07:40:25)
> Hello,
> 
> On Thu Feb 29, 2024 at 3:59 PM CET, Andy Shevchenko wrote:
> > On Thu, Feb 29, 2024 at 03:27:01PM +0100, Théo Lebrun wrote:
> > > On Wed, Feb 28, 2024 at 03:33:29PM +0100, Théo Lebrun wrote:
> > > > On Tue Feb 27, 2024 at 6:11 PM CET, Andy Shevchenko wrote:
> > > > > On Tue, Feb 27, 2024 at 03:55:24PM +0100, Théo Lebrun wrote:
> 
> > 2) Still I see a benefit from using lo_hi_readq() and friends directly.
> 
> So it is:
> 
>         u32 r0 = readl(base_plls + pll->reg64);
>         u32 r1 = readl(base_plls + pll->reg64 + sizeof(r0));
> 
> vs:
> 
>         u64 r = lo_hi_readq(base_plls + pll->regs64);
>         u32 r0 = r;
>         u32 r1 = r >> 32;
> 
> One is straight forward, the other uses an obscure helper that code
> readers must understand and follows that with bit manipulation.
> 

Just use readq() and include the correct header please. We know what
readq() is in the kernel.





[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux