From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 06 Sep 2017 14:17:35 +0200 (CEST) Received: from mail.linuxfoundation.org ([140.211.169.12]:39140 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992262AbdIFMRX5Js42 (ORCPT ); Wed, 6 Sep 2017 14:17:23 +0200 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6422295E; Wed, 6 Sep 2017 12:17:14 +0000 (UTC) Date: Wed, 6 Sep 2017 14:17:15 +0200 From: Greg Kroah-Hartman To: Jonas Gorski Cc: MIPS Mailing List , "linux-arm-kernel@lists.infradead.org" , "linux-serial@vger.kernel.org" , "devicetree@vger.kernel.org" , Network Development , Rob Herring , Mark Rutland , Ralf Baechle , Florian Fainelli , bcm-kernel-feedback-list , Kevin Cernekee , Jiri Slaby , "David S. Miller" , Russell King Subject: Re: [PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree Message-ID: <20170906121715.GA27869@kroah.com> References: <20170802093429.12572-1-jonas.gorski@gmail.com> <20170802093429.12572-5-jonas.gorski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.0 (2017-09-02) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 59946 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: gregkh@linuxfoundation.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Wed, Sep 06, 2017 at 01:01:32PM +0200, Jonas Gorski wrote: > Hi Greg, > > On 2 August 2017 at 11:34, Jonas Gorski 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 > > 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@14e00520 { > > @@ -19,6 +24,7 @@ Example: > > interrupt-parent = <&periph_intc>; > > interrupts = <2>; > > clocks = <&periph_clk>; > > + clock-names = "refclk"; > > }; > > > > clocks { I don't ack devtree changes :) > > 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; > > This part is fine with me: Acked-by: Greg Kroah-Hartman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.linuxfoundation.org ([140.211.169.12]:39140 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992262AbdIFMRX5Js42 (ORCPT ); Wed, 6 Sep 2017 14:17:23 +0200 Date: Wed, 6 Sep 2017 14:17:15 +0200 From: Greg Kroah-Hartman Subject: Re: [PATCH 4/8] tty/bcm63xx_uart: allow naming clock in device tree Message-ID: <20170906121715.GA27869@kroah.com> References: <20170802093429.12572-1-jonas.gorski@gmail.com> <20170802093429.12572-5-jonas.gorski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Jonas Gorski Cc: MIPS Mailing List , "linux-arm-kernel@lists.infradead.org" , "linux-serial@vger.kernel.org" , "devicetree@vger.kernel.org" , Network Development , Rob Herring , Mark Rutland , Ralf Baechle , Florian Fainelli , bcm-kernel-feedback-list , Kevin Cernekee , Jiri Slaby , "David S. Miller" , Russell King Message-ID: <20170906121715.naWf5y9tkwG9mOR9bmKAMdvjNToGREqIuXQ0Mjau3Do@z> On Wed, Sep 06, 2017 at 01:01:32PM +0200, Jonas Gorski wrote: > Hi Greg, > > On 2 August 2017 at 11:34, Jonas Gorski 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 > > 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@14e00520 { > > @@ -19,6 +24,7 @@ Example: > > interrupt-parent = <&periph_intc>; > > interrupts = <2>; > > clocks = <&periph_clk>; > > + clock-names = "refclk"; > > }; > > > > clocks { I don't ack devtree changes :) > > 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; > > This part is fine with me: Acked-by: Greg Kroah-Hartman