lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdX=95RZFwWBPMEtNTn2FFUr5VzDmDotEnmcip_0j+A-RQ@mail.gmail.com>
Date:   Wed, 20 Sep 2023 11:47:13 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-renesas-soc@...r.kernel.org,
        Andi Shyti <andi.shyti@...nel.org>, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] i2c: rcar: improve accuracy for R-Car Gen3+

Hi Wolfram,

On Tue, Sep 19, 2023 at 8:45 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
> With some new registers, SCL can be calculated to be closer to the
> desired rate. Apply the new formula for R-Car Gen3 device types.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
>
> Changes since v1:
> * fixed two whitespace issues
> * use dedicated variables for scld and schd
> * explicitly say "2 * smd" in the comment explaining the new formula
> * use correct division 'clkp/SCL' in the same comment
> * updated debug printout to use the new variables

Thanks for the update!

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

But given you have to respin 1/2 anyway, what about...

> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c

> @@ -128,6 +146,8 @@ struct rcar_i2c_priv {
>
>         int pos;
>         u32 icccr;
> +       u16 scld;
> +       u16 schd;

... changing the order, to match alphabetical and register offset order.

> +
> +               priv->icccr = cdf;
> +               priv->scld = RCAR_SCLD_RATIO * x;
> +               priv->schd = RCAR_SCHD_RATIO * x;

Likewise.

> +
> +               dev_dbg(dev, "clk %u/%u(%lu), round %u, CDF: %u SCLD %u SCHD %u\n",
> +                       scl, t.bus_freq_hz, rate, round, cdf, priv->scld, priv->schd);
> +       }
>
>         return 0;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ