From patchwork Thu Jun 20 18:54:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 680 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 945FF3F086 for ; Thu, 20 Jun 2019 20:55:24 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id j36sf2344329pgb.20 for ; Thu, 20 Jun 2019 11:55:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1561056923; cv=pass; d=google.com; s=arc-20160816; b=BwviiS0OjwTJ7uQ2FUbUSe0Y3mcnT4JIdqjzyyBG1kU0beX0JcBNy6zk9H6glDU9WK m1sryO72KzZGETCwPY4SbdnyWYx3I2FTSCz/rNsqY43PVqmQ7mARyWhsVZKWNTV4O7iD N9tOCsm7PGu9HrbhmatuLFxsRtwf3I52esp2odYz/8DzFdMHk49qHIk3kEOCpH7PvAwZ 1/Opa/Wa5O3MYYaBNGgcONPKmbUaoDorSFXA+hxmyQ+ETri/MQIy1k8PLj8AGVFJNU+8 An/OO0EkH150aGg3gjPyxw8pIwR7wokfCpii4fT1z5AxpjYUWOJxB8i9XbTz/t/Py31S nYEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Lw0qFPQdAFOZgUJhXZ9wlv9sxbdiNpe+S/xrPVu6Udw=; b=r8GDsD4Zm6nWK21HRk1bQniTZoDsT2gDTW7YD2XIj6qtmPTKUiNPQpIl2vWem2rgnl CBEg4ZZo7LlJvOQhrqeAbwV0QIf6BWVKt7ql1fjxdSB3zuxegJ3osyEpfWG++JIYvgl2 YbFKIDKjPVgfkQhWBRxyFUn3fsA7BrA9Fp8Pf2Gx4tMI1iB8WS+PAw/B8JUzzdBZehpn 8iSd3EkcJbmFAIsAPArNKXmYFJ2/3Sfo2wxDn/VI3uOs5spBL30LsoitCdedQfZgotbc oT9jCm2cKBwdrTRHI+udqzEmAKwbEd5PzmOw49A3KHGZBsS3/sjP5176IlbAzhrxZ+39 mr+A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lh5IPRX3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Lw0qFPQdAFOZgUJhXZ9wlv9sxbdiNpe+S/xrPVu6Udw=; b=Nrims0adXiALU5fnzSQmKGxE7W47qp9XGI4u9ioMq7JBFplkT4rCPVUoNIYdPe8vVk k4yD+Z6ml/zi9LR2DNkwA9lY3UFLSPPtWvY6R1jl1obXf12dm40ZrCxHWFplu3cubYNF 1krFW4iscAg0N7FrWrfE/AwKLO5wF2DnnYsiI= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Lw0qFPQdAFOZgUJhXZ9wlv9sxbdiNpe+S/xrPVu6Udw=; b=lHW0F06/anorF5eQRD4heekoDpHF0B0EWSewpsiZGJxmq4H9EUZAD5ztcEKPnS8wZF pclvUltAY6T/RDSHxa4mxq3aAwy/yNO6vlxRqJ2qutlKqnGWsP+qe4mEcELzO0Xfr6QW spi87lKqt+jG2pJGYTEYqdO5TiN7DDdCK1OS7PTe5KN7MnB/wtNaoPIN/tOImCTHnjPL 413sCd6GL1SAamgK1+Zig3GowdKC8M7xJFgiG4oC6X6x/DDrvTWwxtM84AUHCVHPg1l0 Ajq2aSM5ss5BrWwL8zajwjgLsNlAlM4oCDe72thSoJnSRxf79P0VzrjABYFAGofGz0C+ L/nQ== X-Gm-Message-State: APjAAAVftjIIiYZqYT4QlyMEdBXY1aXwPubz7/ldtPCSWGvDrrPpoDTI SJnlHFxYc+wyucE1l+7gPOr97bEU X-Google-Smtp-Source: APXvYqw6rPBYplS9tFc+lOE4Igfw593REtruQT9Td1R3eiVwG36ASUMkLpVWfXqOEBoKXMQBcWMvnw== X-Received: by 2002:a17:902:704a:: with SMTP id h10mr18674878plt.337.1561056923457; Thu, 20 Jun 2019 11:55:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8056:: with SMTP id y22ls1511115pfm.6.gmail; Thu, 20 Jun 2019 11:55:23 -0700 (PDT) X-Received: by 2002:a63:9502:: with SMTP id p2mr3935744pgd.12.1561056923069; Thu, 20 Jun 2019 11:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561056923; cv=none; d=google.com; s=arc-20160816; b=tYBNUPMNgWLXO2ZutkEzCO3pdS+nR51lKKHucGkKYp3Vti9635zVO5rTsXtKvvgOLN wHAVAZ18L/hFs8UUigfytmkw1oNhD2/B1scsY3N4nURSquneZsxEdlLERYkZZghzMAP7 Cs/zXPHk2JOTk1/ExRPiUsR7jbEKdmyQUeqxSVflp8Mu2URC79piXRJZPACJnAz4bimz 5GPql66rVhjg6pl37jXiqRH2R46wiQOT8gWIaaf+S3R9iz/Gz40CkWiU71yLKKwDhwEm kjlSaxNhRdubS5XgBEfAD8q7TQ9r7jcDuRZKUumlYdUz630DzQTlkqZDcTtzyWpUc6+t 6FxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iJdc+LE+goLm9GBcZ8RQa+EHlJZSHEiVDu4uCr02hoI=; b=HN6ZN2K0xyhXLH7XZfGPu+oBjkshaJS1Tr5Z362rUrGyh4BdXE3O33IzsNGVGpxHN8 Hp6Q/QYMlO2FerJKtV1yv+f8cr70n914MhuTwpTGe1geKmGFiFNIWXUt2VNFawGYoV6D jtvXOSQ0oL2ngtLR4oH4RvyHVbA1iXuNRG4Ohp1n+EKiHcAMU4ue0lowlv3r7openKUT kvW5KtWpWUCIC514wjsDz62XKmVaESjZjwiHykE08/Dx6CNQG/m7nXFYtHaT4AP4amOM r44NKY9pyA5+T081bNa9U7X2hwvNlvRRjVECI2HuoyRZoQHjQtyIO6PBTtpwD3pc1oFw H+7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lh5IPRX3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g9sor892586pjs.21.2019.06.20.11.55.23 for (Google Transport Security); Thu, 20 Jun 2019 11:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:ad93:: with SMTP id s19mr1184079pjq.36.1561056922773; Thu, 20 Jun 2019 11:55:22 -0700 (PDT) Received: from localhost.localdomain ([183.82.225.128]) by smtp.gmail.com with ESMTPSA id k3sm372183pju.27.2019.06.20.11.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 11:55:22 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , u-boot@lists.denx.de Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 1/8] board: rk3399: Drop explicit uart enablement in spl_board_init Date: Fri, 21 Jun 2019 00:24:59 +0530 Message-Id: <20190620185506.11449-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190620185506.11449-1-jagan@amarulasolutions.com> References: <20190620185506.11449-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lh5IPRX3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , preloader_console_init is used for printing SPL boot banner that usually called from spl_board_init. The current spl_board_init in evb and rock960 is enabling explicit pinctrl, debug uart prior to calling preloader_console_init which eventually not required since board_init_f is already enabled debug uart. So, drop those explicit enablement calls from spl_board_init of evb, rock960. Tested this by enabling CONFIG_SPL_BOARD_INIT and adding u-boot,dm-pre-reloc property for uart node. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- board/rockchip/evb_rk3399/evb-rk3399.c | 23 +------------------ board/vamrs/rock960_rk3399/rock960-rk3399.c | 25 +-------------------- 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index bf2ad98c47..769b5d146f 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -68,27 +67,7 @@ out: void spl_board_init(void) { - struct udevice *pinctrl; - int ret; - - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); - if (ret) { - debug("%s: Cannot find pinctrl device\n", __func__); - goto err; - } - - /* Enable debug UART */ - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG); - if (ret) { - debug("%s: Failed to set up console UART\n", __func__); - goto err; - } - preloader_console_init(); - return; -err: - printf("%s: Error %d\n", __func__, ret); - /* No way to report error here */ - hang(); + return; } diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c index 0f5ef3a09a..018e4b55b8 100644 --- a/board/vamrs/rock960_rk3399/rock960-rk3399.c +++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c @@ -5,9 +5,6 @@ #include #include -#include -#include -#include #include #include @@ -24,27 +21,7 @@ int board_init(void) void spl_board_init(void) { - struct udevice *pinctrl; - int ret; - - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); - if (ret) { - debug("%s: Cannot find pinctrl device\n", __func__); - goto err; - } - - /* Enable debug UART */ - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG); - if (ret) { - debug("%s: Failed to set up console UART\n", __func__); - goto err; - } - preloader_console_init(); - return; -err: - printf("%s: Error %d\n", __func__, ret); - /* No way to report error here */ - hang(); + return; }