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: 71648 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp321204qgy; Fri, 8 Jul 2016 01:11:28 -0700 (PDT) X-Received: by 10.66.160.199 with SMTP id xm7mr7787543pab.78.1467965488788; Fri, 08 Jul 2016 01:11:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz2si1843025pac.86.2016.07.08.01.11.28; Fri, 08 Jul 2016 01:11:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753875AbcGHIL0 (ORCPT + 30 others); 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 Received: by mail-wm0-f51.google.com with SMTP id f126so7934103wma.1 for ; Fri, 08 Jul 2016 01:11:15 -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=HJ+DJoJijV+V1w8+Q+5A2p8GxwQ565IVZwfKOVk6HQpJhpCHxtPmxbFYHGdFjQCLK8 0yVDmvTxedqKDtOuSjIIZF30G/ESzpkIyouvFJdFILtqysIjN+O7xz6Zm/zG3YgU4vhc OYWxLoQjTRx8WRcSFDd3ID9NbTT5ymTZduldLMh++XY18Wsz7ndaCj8+exY+tw5nkMQj E/JIIx5epsiwpGBM7N+8tHyxFJAyxu/Uts7ELwZk6uGjYJ0jUg/cdLlskmTv6oEFiWdv +FAzGG+bfTdqdhlHUKxlGusQrGYBM6VegGyEXpHhGOoflgZF7c3y9jB1E4FhkJgsZlUI TSeA== X-Gm-Message-State: ALyK8tJuI6SlAl5VWqr+3GU7Ga1aKtNE6TDRB71avr2J2/JNgWRj/T0+Lom1N2uEbApvR5FF 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 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 Precedence: bulk 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(+) -- 2.7.4 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);