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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKeu-b8mbMJBtnNn1vL=RSvUXbo+g40haZnjXTW11CJ6w@mail.gmail.com>
Date:   Tue, 9 Jul 2019 14:30:53 -0600
From:   Rob Herring <robh+dt@...nel.org>
To:     Anson Huang <Anson.Huang@....com>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mark Rutland <mark.rutland@....com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Sascha Hauer <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        Leonard Crestez <leonard.crestez@....com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Daniel Baluta <daniel.baluta@....com>,
        Bai Ping <ping.bai@....com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Abel Vesa <abel.vesa@....com>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        Carlo Caione <ccaione@...libre.com>,
        "Angus Ainslie (Purism)" <angus@...ea.ca>,
        Guido Günther <agx@...xcpu.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        devicetree@...r.kernel.org,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        NXP Linux Team <Linux-imx@....com>
Subject: Re: [PATCH V4 2/5] clocksource/drivers/sysctr: Add clock-frequency property

On Mon, Jul 1, 2019 at 3:47 AM <Anson.Huang@....com> wrote:
>
> From: Anson Huang <Anson.Huang@....com>

'dt-bindings: timer: ...' for the subject.

>
> Systems which use platform driver model for clock driver require the
> clock frequency to be supplied via device tree when system counter
> driver is enabled.

This is a DT binding. What's a platform driver?

>
> This is necessary as in the platform driver model the of_clk operations
> do not work correctly because system counter driver is initialized in
> early phase of system boot up, and clock driver using platform driver
> model is NOT ready at that time, it will cause system counter driver
> initialization failed.
>
> Add clock-frequency property to the device tree bindings of the NXP
> system counter, so the driver can tell timer-of driver to get clock
> frequency from DT directly instead of doing of_clk operations via
> clk APIs.

While you've now given a good explanation why you need this, it all
sounds like linux specific issues and a DT change should not be
necessary.

Presumably, 'clocks' points to a fixed-clock node, right? Just parse
the 'clocks' phandle and fetch the frequency from that node if you
need to get the frequency 'early'.

> Signed-off-by: Anson Huang <Anson.Huang@....com>
> ---
> No change.
> ---
>  .../devicetree/bindings/timer/nxp,sysctr-timer.txt        | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt
> index d576599..7088a0e 100644
> --- a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt
> +++ b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt
> @@ -11,15 +11,18 @@ Required properties:
>  - reg :             Specifies the base physical address and size of the comapre
>                      frame and the counter control, read & compare.
>  - interrupts :      should be the first compare frames' interrupt
> -- clocks :         Specifies the counter clock.
> -- clock-names:             Specifies the clock's name of this module
> +- clocks :          Specifies the counter clock, mutually exclusive with clock-frequency.
> +- clock-names :     Specifies the clock's name of this module, mutually exclusive with
> +                   clock-frequency.
> +- clock-frequency : Specifies system counter clock frequency, mutually exclusive with
> +                   clocks/clock-names.

It doesn't really work to say one or the other is needed unless you
make the OS support both cases.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ