From patchwork Tue Jul 14 09:32:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11662171 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F9FF14DD for ; Tue, 14 Jul 2020 09:35:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 310B8217A0 for ; Tue, 14 Jul 2020 09:35:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nlX6PwYE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="K7EffqyN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 310B8217A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=em0hSRE7QMoydtJKOowJ8/fhlsBr2k4e8BYxFEFPs9s=; b=nlX6PwYEgkCPghnkMGAgHbcHi l91CqMJVxMRy5L3BK4Xia0vwYuxB6oBIUATAXltAVZpM0ZTCmdjEdW5lnMUBUaCam5CkIcYoiisS9 tPGXoOZoboMCWJATPBKW4jzd1PDeIoOYiSJOGvuZEjx95FzUnSMVSmzrZVlDiG3GRn8qeUaUz81Ox ZngoBqYazUOqB3xvHvgQAJB49QE533TZ+XfTgU10CEbHvT4sheZOMt08ZKKjqQjrevJaep+/tKP/g NYyiDaqljNzU4wQYcGKkisWEwJh/ILT7gx6Ki1JOdgM/rasyTjUM7Yvjuro/mx6hQx7fq3PnN+Arh fnPoE5qWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHLO-0004MH-VB; Tue, 14 Jul 2020 09:35:23 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvHK3-0003gz-PO for linux-rockchip@lists.infradead.org; Tue, 14 Jul 2020 09:34:09 +0000 Received: by mail-pj1-x1041.google.com with SMTP id ch3so1301801pjb.5 for ; Tue, 14 Jul 2020 02:33:59 -0700 (PDT) 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:content-transfer-encoding; bh=gI8p0P7GBhpZRpRW9dMCtIUfvWoAmDO5toDakeAqdnQ=; b=K7EffqyNLoywQJHa+3+9A2q5FcA120MPzw6xzV+sPfJ66j1EWY7P1N7ErG6E7kNLk8 xvnRehK86jSCyDDx6n8tVVG/zE40u/Sn4XLfajpKIEaUGT9XDISF6fV8z2vZNi4dyhD5 xxQmRC+wr2jeVuDYzqudeTt21D68NgXwT3g5A= 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:content-transfer-encoding; bh=gI8p0P7GBhpZRpRW9dMCtIUfvWoAmDO5toDakeAqdnQ=; b=eN+H4F9aQI164VtehCxayzyahRgcKxAd2MwvWONPuXbMf+RuxzicRmy31O6LAQjqVh vUWSWq3VGNIqZ3AqMfcE5kdmWxpOzdr72oLnsTdm3mwJKRzHAJiaA2yiNaUumoVuG2l7 VhQLdF6Z4q1PEyDXod/IZHdS+yjzKm2SMcZahBfB2KN3uNN39gGnoehbJ1ZpRx6VzzYk D8BDSNf0qb2k4U8HGY0JppzSoPm5YXx0UK6XpyV/bGUpjPHqKWCpyEx+Gm2VRGE8w0wM KycmdeSLyOysqm9UZw1lKGH4IitqevIwDG9tl5AF5ChfBPyGK1M9PWzVOfysqYWxjcYQ nCnA== X-Gm-Message-State: AOAM531d6wsWyfkT8qpRsA9gSXa1YZwgUCjd8+HcMhtM8biqNudincrp KGoc7uUrZ+mMeRM2TZj7r1IlAQ== X-Google-Smtp-Source: ABdhPJwoDA40CV3dV8UqvKjphq00Zc9zvvCgPxAWmBMy2BYZ8x7/VkBoChSsFnVB2NsBdHXEw7xSjQ== X-Received: by 2002:a17:902:262:: with SMTP id 89mr2922913plc.31.1594719237320; Tue, 14 Jul 2020 02:33:57 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:659e:b3d0:e662:3980]) by smtp.gmail.com with ESMTPSA id g6sm16924771pfr.129.2020.07.14.02.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:33:56 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH v5 4/5] rockchip: spl: Move board_early_init_f after cpu timer Date: Tue, 14 Jul 2020 15:02:28 +0530 Message-Id: <20200714093229.28763-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714093229.28763-1-jagan@amarulasolutions.com> References: <20200714093229.28763-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_053359_873053_C3BE5611 X-CRM114-Status: GOOD ( 10.56 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1041 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Custom board_early_init_f not only deal with simple gpio configuration but also have a possibility to access clocks to process any clock related operations like checking reset cause state and etc. So, call it once the rockchip timer initialization done instead of calling first place of board_init_f which doesn't have any rockchip init code before. This specific concern was tested with checking reset reason via board_early_init_f, which indeed require a clk probe. Signed-off-by: Jagan Teki --- Changes for v5: - new patch arch/arm/mach-rockchip/spl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index cddf4fd3d5..082828de66 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -122,8 +122,6 @@ void board_init_f(ulong dummy) debug("\nspl:debug uart enabled in %s\n", __func__); #endif - board_early_init_f(); - ret = spl_early_init(); if (ret) { printf("spl_early_init() failed: %d\n", ret); @@ -137,6 +135,9 @@ void board_init_f(ulong dummy) /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init(); #endif + + board_early_init_f(); + #if !defined(CONFIG_TPL) || defined(CONFIG_SPL_RAM) debug("\nspl:init dram\n"); ret = dram_init();