From patchwork Wed Dec 12 07:24:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 153555 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1522854ljp; Tue, 11 Dec 2018 23:26:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VUywXkgSRE4mg7kqkJUgM71hwoLj55ch7xsQJALC/GLzp73k04CfmQYUmqoLx46XQQspdW X-Received: by 2002:a17:906:92d1:: with SMTP id d17-v6mr14396430ejx.96.1544599564175; Tue, 11 Dec 2018 23:26:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544599564; cv=none; d=google.com; s=arc-20160816; b=Tme4CcKXQgrnmY/i3xs37P8sYgH7GGS6xf+Poh59fZ7hG2IB1CvAqnLuKpcafdZms1 nJBN9y/lymhSRVS7CYzL3VXvqImEpPVv3S6mXRwL+UZenW6hawoNfXM23HNfElkIrmNW XVv35JOjxpad2wJfkAFGqbW/9MWzCd1gLfK3ODLhdgCUDD4HFF0xF+GRMYSBfbdQDKEC lNHUj8usjKsHpNlohDD1s/oG7L2IxHJQzyHs1Iqbqv0DzFrapMc2/7p88toAFtxihcBi GPbQ/y/+U3KDBgP2BUtzA/Sc7pQMphEy+jwPq4NFFvaXxLD6n8iLy/Z3PF1/zVHmiirQ 7h2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature; bh=yDyWx5Db6tmaq+3gSqV1tdIXVe+TtZ1knuJLw1WgX9w=; b=MQtFa0iSzAS3cznPAEHYLE7j3sJTeClONHhbWs3UgSznwWWQmiKlF6lvdIfFjypQlT AJ5TbW48AQdE6TmROeZZ/id9P5TWpPvL/sbQ6bLy79EuidTFSuQLEcTxbpCezpW5A3nU NKybUYRkcDRnNM0uUUkeeXbcvuT6GeWFdP4oJyVLfVU4/RggzVuPBRCI9/L5IbnScK3I 1/IFy+1ic2oBuoGEk0KTFnZcfbaDffJE0VCB8dCOPteUNjDIbZaFXzfR4GMiW5IlbF9P l9KrNWmflkimqXBAYXQqWxPpFk0WXYptluJO2DlDDHYXZbrUTs/gp0oTAgQGGbbinIBC uhSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UdkuEiIW; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id b7si1909354edy.138.2018.12.11.23.26.03; Tue, 11 Dec 2018 23:26:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UdkuEiIW; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 98D23C228C1; Wed, 12 Dec 2018 07:25:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 66147C228B6; Wed, 12 Dec 2018 07:25:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 44381C228B6; Wed, 12 Dec 2018 07:25:51 +0000 (UTC) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by lists.denx.de (Postfix) with ESMTPS id 94EF8C228AB for ; Wed, 12 Dec 2018 07:25:50 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id u6so8186992plm.8 for ; Tue, 11 Dec 2018 23:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mpBFdz5fUqKT0LZNKq66ClcN5AK/LHRCe0ajEr3FNqY=; b=UdkuEiIWm+vVvK8qy3rWePAwjmQ4ZgerAlWuK648Zo1ShuFoUX39Du1TkZzjZ0WfyS pDO3+1cuZNYcq8XWGob/kfWRUS37s4F+HwUci61KT78tRkkLNb2vmSBgybxpFU651/tQ xfTkJVi1URuQnvcmxGTcjC1P88QJ7GYiDPyKw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mpBFdz5fUqKT0LZNKq66ClcN5AK/LHRCe0ajEr3FNqY=; b=lhlDCoURWpehrJv2kEke0+Stqy2m8XQTrMbY2b5ezykpc3s94LTY6p6wXu9rDUjkxl Bv2ZpnLTPl85MkIl46Z6CexPPBToxfknBrfpdXQ/p+qIbLrO4GwnLubMDIRP1RNzjSUr RCfyawpnsqzRCoolSUzrRRhzTNvYGX/jhxjBkOjlgPy4Xsapqz8rudfk2FSdhOFzBoIi JUR87LgezoU7HFJAHIlCH6ttNa5Gch230UzJD0fHhl5NMLK8PzSbZQo4KxUPkDm4N1DA 1iuPJqejGbnT56lSoKlyQx5ASmAaa4rFyPMYK5h24Pjce/8/pB8Tg8YLDGNCN46rmWOY PrlA== X-Gm-Message-State: AA+aEWZMOK6rMhtfpa6l5UYbxYoIu/NxFCZ8veeARJ5YNkxa27w0R0hl beTZYxcwMQdlVGG7yCtno92Q+5YaHxwXtA== X-Received: by 2002:a17:902:c05:: with SMTP id 5mr19105361pls.155.1544599548785; Tue, 11 Dec 2018 23:25:48 -0800 (PST) Received: from localhost.localdomain (61-216-91-114.HINET-IP.hinet.net. [61.216.91.114]) by smtp.gmail.com with ESMTPSA id 139sm37632952pfb.127.2018.12.11.23.25.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Dec 2018 23:25:47 -0800 (PST) From: Shawn Guo To: u-boot@lists.denx.de Date: Wed, 12 Dec 2018 15:24:44 +0800 Message-Id: <20181212072444.11137-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.18.0 Subject: [U-Boot] [PATCH] poplar: fix boot failure caused by serial driver change X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Commit 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers") essentially drops flag DM_FLAG_PRE_RELOC from serial_pl01x driver for Poplar platform, because the platform falls into the following strategy category made by the commit. Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Before the commit lands, Poplar platform works by statically declaring pl011 serial device via U_BOOT_DEVICE() with DM_FLAG_PRE_RELOC flag set in the driver. But since Poplar also supports device configuration from device tree, the commit practically drops the flag for Poplar, and hence breaks the platform from booting. This patch changes platform code and device tree to initiate pl011 serial device from device tree rather than static declaration, so that above strategy about DM_FLAG_PRE_RELOC applies to Poplar, and therefore the reported boot failure gets fixed. Reported-by: Igor Opaniuk Fixes: 4687919684e0 ("serial: Remove DM_FLAG_PRE_RELOC flag in various drivers") Cc: Bin Meng Cc: Simon Glass Signed-off-by: Shawn Guo Reviewed-by: Igor Opaniuk Tested-by: Igor Opaniuk Reviewed-by: Bin Meng --- arch/arm/dts/hi3798cv200-u-boot.dtsi | 10 ++-------- board/hisilicon/poplar/poplar.c | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/hi3798cv200-u-boot.dtsi b/arch/arm/dts/hi3798cv200-u-boot.dtsi index 709ae1cbc9f3..7844c5208c5d 100644 --- a/arch/arm/dts/hi3798cv200-u-boot.dtsi +++ b/arch/arm/dts/hi3798cv200-u-boot.dtsi @@ -17,12 +17,6 @@ }; &uart0 { - status = "disabled"; + clock = <75000000>; + status = "okay"; }; - -/{ - chosen { - stdout-path = ""; - }; -}; - diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 9e8eac78388b..8adc750962a1 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -35,6 +35,7 @@ static struct mm_region poplar_mem_map[] = { struct mm_region *mem_map = poplar_mem_map; +#if !CONFIG_IS_ENABLED(OF_CONTROL) static const struct pl01x_serial_platdata serial_platdata = { .base = REG_BASE_UART0, .type = TYPE_PL010, @@ -45,6 +46,7 @@ U_BOOT_DEVICE(poplar_serial) = { .name = "serial_pl01x", .platdata = &serial_platdata, }; +#endif int checkboard(void) {