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: <CAOiHx=mC=GfX0VvuRWR-AmXYfVOEkuruwGHooS08WrL_z-60UA@mail.gmail.com>
Date:   Wed, 6 Sep 2017 13:01:32 +0200
From:   Jonas Gorski <jonas.gorski@...il.com>
To:     MIPS Mailing List <linux-mips@...ux-mips.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
        Kevin Cernekee <cernekee@...il.com>,
        Jiri Slaby <jslaby@...e.com>,
        "David S. Miller" <davem@...emloft.net>,
        Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree

Hi Greg,

On 2 August 2017 at 11:34, Jonas Gorski <jonas.gorski@...il.com> wrote:
> Codify using a named clock for the refclk of the uart. This makes it
> easier if we might need to add a gating clock (like present on the
> BCM6345).
>
> Signed-off-by: Jonas Gorski <jonas.gorski@...il.com>

Could I please get a (N)Ack so Ralf can add this patch to his tree?


Regards
Jonas


> ---
>  Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | 6 ++++++
>  drivers/tty/serial/bcm63xx_uart.c                              | 6 ++++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> index 5c52e5eef16d..8b2b0460259a 100644
> --- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> +++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> @@ -11,6 +11,11 @@ Required properties:
>  - clocks: Clock driving the hardware; used to figure out the baud rate
>    divisor.
>
> +
> +Optional properties:
> +
> +- clock-names: Should be "refclk".
> +
>  Example:
>
>         uart0: serial@...00520 {
> @@ -19,6 +24,7 @@ Example:
>                 interrupt-parent = <&periph_intc>;
>                 interrupts = <2>;
>                 clocks = <&periph_clk>;
> +               clock-names = "refclk";
>         };
>
>         clocks {
> diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
> index a2b9376ec861..f227eff28d3a 100644
> --- a/drivers/tty/serial/bcm63xx_uart.c
> +++ b/drivers/tty/serial/bcm63xx_uart.c
> @@ -841,8 +841,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
>         if (!res_irq)
>                 return -ENODEV;
>
> -       clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
> -                                 clk_get(&pdev->dev, "refclk");
> +       clk = clk_get(&pdev->dev, "refclk");
> +       if (IS_ERR(clk) && pdev->dev.of_node)
> +               clk = of_clk_get(pdev->dev.of_node, 0);
> +
>         if (IS_ERR(clk))
>                 return -ENODEV;
>
> --
> 2.13.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ