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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 17 Jun 2023 08:00:39 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     Shiji Yang <yangshiji66@...look.com>
Cc:     arinc.unal@...nc9.com, devicetree@...r.kernel.org,
        john@...ozen.org, krzysztof.kozlowski+dt@...aro.org,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org, matthias.bgg@...il.com,
        mturquette@...libre.com, p.zabel@...gutronix.de,
        robh+dt@...nel.org, sboyd@...nel.org, tsbogend@...ha.franken.de
Subject: Re: [PATCH v3 2/9] clk: ralink: add clock and reset driver for MTMIPS SoCs

On Sat, Jun 17, 2023 at 7:51 AM Shiji Yang <yangshiji66@...look.com> wrote:
>
> Thank you for your quick reply!
>
> >> >+      {
> >> >+              .compatible = "ralink,mt7620a-sysc",
> >> >+              .data = &mt7620_clk_data,
> >> >+      },
> >> >+      {
> >> >+              .compatible = "ralink,mt7620-sysc",
> >> >+              .data = &mt7620_clk_data,
> >> >+      },
> >> >+      {
> >>
> >> I am confused about the difference between `ralink,mt7620-sysc` and
> >> `ralink,mt7620a-sysc`. Do you mean mt7620n?
> >> https://www.mediatek.com/products/home-networking/mt7620n-a
> >
> >There is no real difference. As you can see both of them use the same
> >'mt7620_clk_data' but since both compatible strings already exist
> >somewhere I introduced both of them.
> >arch/mips/boot/dts/ralink
>
> If they are the same, perhaps `mt7620a` also need to be checked in mtmips_clk_regs_init().
> Or just remove compatible string of `mt7620a` and update dtsi files?

We are planning to properly port dts files from openWRT into the
mainline kernel and also update the current out of date files which
already exist on tree, so we will take care of this kind of details
then.

>
> >+static void __init mtmips_clk_regs_init(struct device_node *node,
> >+                                      struct mtmips_clk_priv *priv)
> >+{
> >+      u32 t;
> >+
> >+      if (!of_device_is_compatible(node, "ralink,mt7620-sysc"))
> >+              return;
> >+
> >+      /*
> >+       * When the CPU goes into sleep mode, the BUS
> >+       * clock will be too low for USB to function properly.
> >+       * Adjust the busses fractional divider to fix this
> >+       */
> >+      regmap_read(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, &t);
> >+      t &= ~(CLKCFG_FDIV_MASK | CLKCFG_FFRAC_MASK);
> >+      t |= CLKCFG_FDIV_USB_VAL | CLKCFG_FFRAC_USB_VAL;
> >+      regmap_write(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, t);
> >+}
> >+
>
> If we choose to update dts file. We can also remove the legacy
> "ralink,rt2880-reset" compatible string by the way.

Ditto.

>
> >+static const struct of_device_id mtmips_clk_of_match[] = {
> >+      { .compatible = "ralink,rt2880-reset" },
> >+      { .compatible = "ralink,rt2880-sysc" },
> >+      { .compatible = "ralink,rt3050-sysc" },
> >+      { .compatible = "ralink,rt3050-sysc" },
> >+      { .compatible = "ralink,rt3352-sysc" },
> >+      { .compatible = "ralink,rt3883-sysc" },
> >+      { .compatible = "ralink,rt5350-sysc" },
> >+      { .compatible = "ralink,mt7620a-sysc" },
> >+      { .compatible = "ralink,mt7620-sysc" },
> >+      { .compatible = "ralink,mt7628-sysc" },
> >+      { .compatible = "ralink,mt7688-sysc" },
> >+      {}
> >+};
>
> Thanks,
>     Shiji Yang

Thanks,
    Sergio Paracuellos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ