From patchwork Fri Jul 8 08:11:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 9220139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73E4B6044F for ; Fri, 8 Jul 2016 08:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 637BA28585 for ; Fri, 8 Jul 2016 08:13:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55B412858D; Fri, 8 Jul 2016 08:13:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D54C228585 for ; Fri, 8 Jul 2016 08:13:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLQsu-000886-1Q; Fri, 08 Jul 2016 08:11:40 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLQsr-00087B-6w for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2016 08:11:37 +0000 Received: by mail-wm0-x231.google.com with SMTP id z126so7954742wme.0 for ; Fri, 08 Jul 2016 01:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mKhnKIChlyUy4GuqqNh2f/V8TanfayuAjCEhVx7BPXs=; b=ULb13Idy2p6dIRb5QaQ5QdbVWDN8ApYy4jmCGDBvu5S+y0OknmPLJi8+wUgq0qQ1Nn LoKEJOekDm/9mxBz5hQ7OnrOTPgwL9dHLM0099KQYwC7tHIiEs/s2AJQu/tU0zNq5+ME BUq5k1sd8dkxgTXai5mxl47J/5Pu5sHL0Hipo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mKhnKIChlyUy4GuqqNh2f/V8TanfayuAjCEhVx7BPXs=; b=Y4dhQNxEkclOYBcs4Q8KGLOEvYMEXfg20ooCHpvXPQPPffwMC13CZ6jQB9e8hKVEkH DvwrXSfvhCnGBykjpR1BQtwHm3IomYDd4D1xzkGAP7Tg/rpeTTlfOI0CIOXpsKEo4czM 8+I8xjpG1oGkr6HTATjymfeMf3hgMzrCf3yU6leaWlcNDkHEne7qhqom5W/AnxApMbqv qic7/Lfhjy0gloDSQX9kSV0gMkGkc9yx0AatB6gcUmIT0yW1Xtp0AgpguGkpaMaMP5DT 8iIYhq02yfyG5pNte+bK/Jyq3ET5mxLZsy5apOze+yRN6rqtrQwJOVgvbEP4he2VnrdM LMVw== X-Gm-Message-State: ALyK8tKLVAc3haBtu2kMQ6eVRIwNsiGd0QG71uMmgxBBOSx3iWl7pP8OL3WwYGWX/KMuW8gH X-Received: by 10.194.104.134 with SMTP id ge6mr4451487wjb.157.1467965475110; Fri, 08 Jul 2016 01:11:15 -0700 (PDT) Received: from igloo.telefonica.net (208.red-88-0-111.dynamicip.rima-tde.net. [88.0.111.208]) by smtp.gmail.com with ESMTPSA id i207sm6897863wmf.0.2016.07.08.01.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jul 2016 01:11:14 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, linux@armlinux.org.uk, xuwei5@hisilicon.com, mturquette@baylibre.com 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160708_011137_399899_218C27C8 X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guodong.xu@linaro.org, xinliang.liu@linaro.org, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);