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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 24 Jul 2022 12:06:54 +0300
From:   Tomer Maimon <tmaimon77@...il.com>
To:     Stephen Boyd <sboyd@...nel.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Avi Fishman <avifishman70@...il.com>,
        Benjamin Fair <benjaminfair@...gle.com>,
        Biju Das <biju.das.jz@...renesas.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Greg KH <gregkh@...uxfoundation.org>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Jiri Slaby <jirislaby@...nel.org>,
        Joel Stanley <joel@....id.au>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Lubomir Rintel <lkundrak@...sk>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Michael Turquette <mturquette@...libre.com>,
        Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
        Olof Johansson <olof@...om.net>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Robert Hancock <robert.hancock@...ian.com>,
        Rob Herring <robh+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Tali Perry <tali.perry1@...il.com>,
        Thomas G leixner <tglx@...utronix.de>,
        Patrick Venture <venture@...gle.com>,
        Vinod Koul <vkoul@...nel.org>, Will Deacon <will@...nel.org>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        Nancy Yuen <yuenn@...gle.com>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        SERIAL DRIVERS <linux-serial@...r.kernel.org>,
        LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v8 04/16] clk: npcm8xx: add clock controller

Hi Stephen,

Thanks for your detailed explanation!

On Sat, 23 Jul 2022 at 06:02, Stephen Boyd <sboyd@...nel.org> wrote:
>
> Quoting Tomer Maimon (2022-07-19 03:04:43)
> > On Mon, 18 Jul 2022 at 22:14, Stephen Boyd <sboyd@...nel.org> wrote:
> > >
> > >
> > > So the clk and reset driver should be the same driver, or one driver
> > > should register the other and use the auxiliary bus to express the
> > > relationship. That way we know that the drivers are tightly coupled and
> > > aren't going to stomp over each other.
> > I think it is very problematic to use the same driver for the reset
> > and the clocks also because The NPCM reset driver is an old driver
> > that was used also to the older NPCM BMC SoC so it will be problematic
> > to use the clock and reset driver in the same space.
> > indeed the reset and clocks are using the same memory region but they
> > are not using the same registers, is it not enough?
> > Please be aware that the NPCM reset driver is checking that it is
> > using the reset registers before calling I/O functions.
>
> To put it simply, platform device drivers should use platform device
> APIs. The platform device APIs hide the fact that the firmware is ACPI
> or DT or nothing at all. The usage of of_address_to_resource() is
> problematic.
>
> After converting that to platform APIs you'll get janitor style cleanups
> trying to convert to devm_platform_ioremap_resource(). We'll have to
> discuss this again when that happens, even if there's a comment in the
> code indicating we can't reserve the IO space because there's another
> driver. These problems have happened in the past, fun times!
>
> Furthermore, in DT, reg properties aren't supposed to overlap. When that
> happens it usually indicates the DT is being written to describe driver
> structure instead of the IP blocks that are delivered by the hardware
> engineer. In this case it sounds like a combined clk and reset IP block
> because they piled all the SoC glue stuff into a register range. Are
> there more features in this IO range?

No, this range only combined the reset and clock together, but it
combined in a way that we cannot split it to two or even three
different registers...

I do see a way to combine the clock and the reset driver, the NPCM
reset driver is serving other NPCM BMC's.
Should we use regmap to handle the clock registers instead of ioremap?

Best regards,

Tomer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ