lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 2/2] mtd: rawnand: Add NAND controller support on Intel LGM SoC
On Fri, May 15, 2020 at 5:25 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, May 15, 2020 at 4:48 PM kbuild test robot <lkp@intel.com> wrote:

> > 440 reg = cpu_to_be32(*pdata++);
> > > 441 writel(reg, ebu_host->hsnand + HSNAND_CMSG_0);
> > 442
> > 443 reg = cpu_to_be32(*pdata);
> > 444 writel(reg, ebu_host->hsnand + HSNAND_CMSG_1);
>
> On BE:
> cpu_to_be32 -> no-op
> writel() -> converts reg to LE
>
> On LE:
> cpu_to_be32 -> converts to BE
> writel() -> no-op (in terms of conversion)
>
> Seems to me that the proper API (if above is intended) should be swab32().
> But something tells me that above is broken (or my understanding is wrong).

And perhaps it should use lo_hi_writeq() or something like that.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-05-15 16:28    [W:0.269 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site