From patchwork Wed May 8 06:39:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 390 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 415403F066 for ; Wed, 8 May 2019 08:40:16 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id g11sf10897741plt.23 for ; Tue, 07 May 2019 23:40:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557297614; cv=pass; d=google.com; s=arc-20160816; b=P0usmtRwPedaFUQ4fWqFNJ2dGx7+ZGcspdkd+l+APHr3Gc+BS0sVz8i7irLISR466I 47/uK+MGWXvl/Le57G6PlNfvjpVuY44hgDbXUpkZ2sz58Jx0M3yAgV5Rirve0eTpRa1C woT0Lpbnyqhg/bC8T4k8nchw0LimUbuP45or++VYuzNCdQ57YyB7E+YNIkKCn/weUrJu gxo1uHH+CI0+nsuNrWRARf0XWNP15D+YF8fo3wQZvA3d3gRDZ2rsTF6IPo/em69bIgAY TOmJiHtm5JkQKO8hARQHiqzI5cpIcyZ6zS0V9+vxz3m80rNVBcrKHUa9AFYVMUMBh58T 2WxA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=+yX1cUxf5wIEE1avzqh146NPQH6NOmoUSn2vJ+odiEw=; b=M8ED0Lc77eQ56b3q/Cji7++gK0ZYRU4GScINpd3UmBWh868Y4rKjlOeNhBWowexN0M eCy77xuvvgPbbrJYJUa0DRK9tEpGuCK+UjRBKB3dWv/FriSKm/X1a2AqbBG1Xc4uHnk0 UqXkLlkHKTNR/MwYHrO/+j3MmV/rM+V5dfHYsZl5zZXHmfvxPppW4rfwqB2J1p278vFp KTBWOZfCyOzReVcmpluDhdi8I1XVWShaoKkU7uqQuicH5a1n9TPpxRcrP1IpbDoUkqJ2 r0Is78OWEbp4owZ3/2q4VSwyRpkXk0xMQeu6oqjxq1+t0aaGZOtuk5lAmoUvVaWk4Ui3 bB2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pPZm92bd; 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=+yX1cUxf5wIEE1avzqh146NPQH6NOmoUSn2vJ+odiEw=; b=NLPZWvheE0si1r535aotn+Oce1AzOYk4dJHBIuY8JhBmsIc4bfawycEMFHUzE6okdV mFHjdSZV353nlaOQc+qF1Xb9NNbSXkctyxvUaaSItnPohMmHVYOcElWg8fmNTDTqtXQJ muYNfp+j++3Q6qZMNM07QU/JFakJnG+e5bw4g= 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: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=+yX1cUxf5wIEE1avzqh146NPQH6NOmoUSn2vJ+odiEw=; b=N9j4t4eqVkEAQP2TjcwMMyqZKsP/UvdbKIz0CMNwgstvsvqNVf9Mxye+ThQIDliq3o xFKfBOPU0hmVIXMD1oxo6KqmohDcUCE7rG1PYEJ6M6hHZ8X6oyf02fjJSieKWDHQSdaF rNdqbyoob04z/S660kBql3g9dIyM8tposRSLAGd043zPoHI8qZye31WChtiQIAkPE/Ij XG7c75Vmm8DADIVcNofZ/StmIVdSZQ0UobWjR1pSFkbypVueQo40RHT6GxorUKkqSSZd xpHowgsVy/FrOkLMgvuaR4w0zps2gmV0dbpeJ33bHCIgwXVr459hO92KdIP9z83BPt4Z tbow== X-Gm-Message-State: APjAAAVtI2UuvYjryGeHOSYSRFZ6Ahw8w/tiV6XSBLJlXo0rqehbaldm I1vjSVrj9VfWBYwhz4sLHiXGCXaF X-Google-Smtp-Source: APXvYqzdo6FvwdjLy4Vem1VxYGeMQqGNo+zSuld8qVqm+3UFs79nvcEC3ZzZJnhJuChaSL7GGX3DiA== X-Received: by 2002:a63:5511:: with SMTP id j17mr45040674pgb.449.1557297613857; Tue, 07 May 2019 23:40:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:2928:: with SMTP id g37ls1849985plb.11.gmail; Tue, 07 May 2019 23:40:13 -0700 (PDT) X-Received: by 2002:a17:902:704c:: with SMTP id h12mr45286381plt.270.1557297613498; Tue, 07 May 2019 23:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557297613; cv=none; d=google.com; s=arc-20160816; b=e8XtoPdQ/HZ//QvCeEW9O7hDGrTucolnS/bKQx9YhOa1wSNeeQGqIkiTh20eZh4Oay kEGDrgvW23XGEjGIKm+VQChkG1pm65AWFiQEFDFRCgEewIf8E3rcxAqghexDIaOfsvS6 GBY5nQ+xDFmcB9VFs44/lDErnjF88nXMX2sJ6hcxn+iyvsd1vlxsW1foON6ScRpRubnX 2YAknigs0EBaA/j4NXfrRRnh7NSA49wgKLky9+zAhfRn6cOAeCXD2HHPzXxES5k6ePsu 8D+thnYEAqYaL6kr45QbP6qmVQ6c7LNMLztZu7QxjysrflUgcKwkYJgoRlhUT2kdIMcv RKmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=XOO2rvueYSuWIGhM7d7TnrnUVFlbCl2qMqPqO3No5ck=; b=XL28bA3rs2wDQHMzIbjipva+U/91e8ZiHjlG3f91G656kPMfoT5W458MlkJTPV9Bhb Ot0gcSy9VVM+tVIM+E1nSbPXqFD5LUR3kYCz6hgONEiCRAqxEkyGfV5W/jrrYHS4NtAX SZBT2mIBXMyGl0HqmwY02E79XWfEW2XFWukn80qJI4pgv2KTIEklkkcohkqD2QnDCgux WbyljlkLnSGdRWfBzr4ym8+AQa4lj/tNr+q/c2Nahka23Yb+dCaijauCHMmywMkxe6g5 utv14/fAoCkDog6rGz5E2Y31biLY/0fFVQ4fnpVZw+i/qdQc1Qx24/+h1c47UcJ41Z3q ksQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pPZm92bd; 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 ck13sor1489079plb.38.2019.05.07.23.40.12 for (Google Transport Security); Tue, 07 May 2019 23:40:12 -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:902:8609:: with SMTP id f9mr43284128plo.32.1557297612521; Tue, 07 May 2019 23:40:12 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id z187sm12739340pfb.132.2019.05.07.23.40.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 23:40:11 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled Date: Wed, 8 May 2019 12:09:56 +0530 Message-Id: <20190508063956.26549-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 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=pPZm92bd; 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: , DRAM init would require in - TPL stage if target support TPL and - SPL stage if target support SPL alone So, don't initialize the dram in SPL if TPL defined and at the same time enable it if TPL undefined which is SPL alone. Tested in TPL and SPL supported boards. Signed-off-by: Jagan Teki --- arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c index 3eea73ef33..a439e09b61 100644 --- a/arch/arm/mach-rockchip/rk3399-board-spl.c +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c @@ -198,11 +198,13 @@ void board_init_f(ulong dummy) return; } +#if !defined(SUPPORT_TPL) ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { pr_err("DRAM init failed: %d\n", ret); return; } +#endif } #if defined(SPL_GPIO_SUPPORT)