Re: [PATCH v2] memory: renesas-rpc-if: Fix PHYCNT.STRTIM setting

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

 



Hi Wolfram,

On Thu, Jan 26, 2023 at 1:48 PM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
> > > +       regmap_update_bits(rpc->regmap, RPCIF_PHYCNT,
> > > +                          /* create mask with all affected bits set */
> > > +                          RPCIF_PHYCNT_STRTIM(BIT(fls(rpc->info->strtim)) - 1),
> >
> > fls(0) = 0, and BIT(-1) is undefined, so this won't work for R-Car
> > H3 ES1.x.  So I'm afraid you cannot handle this without storing the
> > actual mask ;-)
>
> You misread the parens, it is: BIT(0) - 1 = 0

Doh... You're right.

Still, it won't clear the bits on H3 ES1.x.
And when changing strtim to a value smaller than 4, it may not work
as expected, as it doesn't clear the upper bits.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux