From patchwork Mon Sep 26 12:26:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Vogt X-Patchwork-Id: 675147 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sjPM640j5z9ryZ for ; Mon, 26 Sep 2016 23:04:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 380A2A768E; Mon, 26 Sep 2016 15:04:43 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ReZoPnwY7XCN; Mon, 26 Sep 2016 15:04:43 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E202A75F3; Mon, 26 Sep 2016 15:04:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A1A53A75A7 for ; Mon, 26 Sep 2016 14:47:47 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id elF-VjXSOs5X for ; Mon, 26 Sep 2016 14:47:47 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) by theia.denx.de (Postfix) with ESMTPS id 5F751A7573 for ; Mon, 26 Sep 2016 14:47:45 +0200 (CEST) Received: from nwb-ext-pat.microfocus.com ([10.120.13.103]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Mon, 26 Sep 2016 14:27:41 +0200 Received: from linux-lm3i.site (nwb-a10-snat.microfocus.com [10.120.13.201]) by nwb-ext-pat.microfocus.com with ESMTP (TLS encrypted); Mon, 26 Sep 2016 13:27:24 +0100 From: Fabian Vogt To: u-boot@lists.denx.de Date: Mon, 26 Sep 2016 14:26:45 +0200 Message-Id: <20160926122651.22132-4-fvogt@suse.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160926122651.22132-1-fvogt@suse.com> References: <20160926122651.22132-1-fvogt@suse.com> X-Mailman-Approved-At: Mon, 26 Sep 2016 15:04:20 +0200 Subject: [U-Boot] [PATCH 3/9] serial: pl01x: expose skip_init platdata option in DT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" To be able to represent the skip-init platdata element with OF_CONTROL, it needs to be read from the device tree as well and put into the platform data. Cc: Eric Anholt Signed-off-by: Fabian Vogt Reviewed-by: Simon Glass --- doc/device-tree-bindings/serial/pl01x.txt | 3 +++ drivers/serial/serial_pl01x.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/device-tree-bindings/serial/pl01x.txt b/doc/device-tree-bindings/serial/pl01x.txt index 61c27d1..017b1e2 100644 --- a/doc/device-tree-bindings/serial/pl01x.txt +++ b/doc/device-tree-bindings/serial/pl01x.txt @@ -5,3 +5,6 @@ Required properties: - reg: exactly one register range with length 0x1000 - clock: input clock frequency for the UART (used to calculate the baud rate divisor) + +Optional properties: +- skip-init: if present, the baud rate divisor is not changed diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index 6f83835..a8d3d67 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -356,6 +356,8 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev) plat->base = addr; plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1); plat->type = dev_get_driver_data(dev); + plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev->of_offset, + "skip-init"); return 0; } #endif