From patchwork Sun Nov 29 06:01:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Chou X-Patchwork-Id: 549725 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 5FA2F140273 for ; Sun, 29 Nov 2015 17:01:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7CCBC4B7CD; Sun, 29 Nov 2015 07:01:25 +0100 (CET) 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 UElRdUVIptGg; Sun, 29 Nov 2015 07:01:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AA024B7C5; Sun, 29 Nov 2015 07:01:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BFC064B7C5 for ; Sun, 29 Nov 2015 07:01:14 +0100 (CET) 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 Pb6TLqF2lWzH for ; Sun, 29 Nov 2015 07:01:14 +0100 (CET) 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 www.wytron.com.tw (220-134-43-68.HINET-IP.hinet.net [220.134.43.68]) by theia.denx.de (Postfix) with ESMTP id 367414B7C4 for ; Sun, 29 Nov 2015 07:01:09 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.250]) by www.wytron.com.tw (Postfix) with ESMTP id 42AE6D002DE; Sun, 29 Nov 2015 14:01:06 +0800 (CST) From: Thomas Chou To: u-boot@lists.denx.de Date: Sun, 29 Nov 2015 14:01:03 +0800 Message-Id: <1448776863-13789-1-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 2.5.0 Cc: Marek Vasut , Tom Rini , clsee@altera.com, Tom Warren , lftan@altera.com Subject: [U-Boot] [PATCH] ns16550: change reg-shift property default to zero 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" Change reg-shift property default to zero. When the integer property is missing, it should be taken as zero. This is consistent to Linux drivers/tty/serial/of_serial.c. The x86 and most powerpc use reg-shift of 0. Most others use reg-shift of 2. While reg-shift of 1 is rarely used. Signed-off-by: Thomas Chou Reviewed-by: Bin Meng Reviewed-by: Mugunthan V N Acked-by: Simon Glass --- drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index d5bcbc3..5b64f7c 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -403,7 +403,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev) plat->base = addr; plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset, - "reg-shift", 1); + "reg-shift", 0); plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock-frequency", CONFIG_SYS_NS16550_CLK);