From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753744AbcGHIL0 (ORCPT ); Fri, 8 Jul 2016 04:11:26 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36231 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbcGHILQ (ORCPT ); Fri, 8 Jul 2016 04:11:16 -0400 From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, linux@armlinux.org.uk, xuwei5@hisilicon.com, mturquette@baylibre.com Cc: guodong.xu@linaro.org, sboyd@codeaurora.org, xinliang.liu@linaro.org, john.stultz@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt Date: Fri, 8 Jul 2016 10:11:06 +0200 Message-Id: <1467965467-28180-1-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow to specify the clock frequency for any given port via the assigned-clock-rates device tree property. Signed-off-by: Jorge Ramirez-Ortiz Tested-by: Jorge Ramirez-Ortiz --- drivers/tty/serial/amba-pl011.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 1b7331e..51867ab 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -2472,6 +2473,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); + ret = of_clk_set_defaults(dev->dev.of_node, false); + if (ret < 0) + return ret; + uap->reg_offset = vendor->reg_offset; uap->vendor = vendor; uap->fifosize = vendor->get_fifosize(dev); -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.ramirez-ortiz@linaro.org (Jorge Ramirez-Ortiz) Date: Fri, 8 Jul 2016 10:11:06 +0200 Subject: [PATCH 1/2] tty: amba-pl011: add support for clock frequency setting via dt Message-ID: <1467965467-28180-1-git-send-email-jorge.ramirez-ortiz@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Allow to specify the clock frequency for any given port via the assigned-clock-rates device tree property. Signed-off-by: Jorge Ramirez-Ortiz Tested-by: Jorge Ramirez-Ortiz --- drivers/tty/serial/amba-pl011.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 1b7331e..51867ab 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -2472,6 +2473,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); + ret = of_clk_set_defaults(dev->dev.of_node, false); + if (ret < 0) + return ret; + uap->reg_offset = vendor->reg_offset; uap->vendor = vendor; uap->fifosize = vendor->get_fifosize(dev); -- 2.7.4