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: 1490 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 48D263F1BD for ; Tue, 14 Jul 2020 11:33:59 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id bf1sf3603792plb.11 for ; Tue, 14 Jul 2020 02:33:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594719238; cv=pass; d=google.com; s=arc-20160816; b=xxj1oh/OYYcL8ISBE/ImjcW30y9ax1wVEKrhRYU+TvmbiyEhP+eyMx/rBxhyVZvfcJ tNRHbAZWKydKDJy7lr2AKu0Tt5y0dU5e0IOOjSQeeW78UeJ+s37jbVs12IMv1CIXmJND f5JgUFwirt84iR5TtHvU61OMKmdqe9cadMdHsjWarwxK8XuAk+DA73ADY00X+QWzwRXg OwTLKaRwf3nGV6gmxcrdN+EtDsz6fpFPi3k2qiVAAZ6F0IEz4Tw750ftsa4rFVBNLSYY JAoWCuL6B/ck+O0zfNTOGgwiLHwUAen/Of5pKcWhr6Ey/NbVajK5Q5mYbGAi6fq7LeNZ wk9g== 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=8Wa67F3uIkliY92AKRAKsoMSrvUq4TGz3PwUepPMe4A=; b=UclmY1R5siw1aEc1SZL7EbPLlSkH/kLvgo3DSe0XcnN76fAZfMwlN0tuJHwv5aUTEC 0IuC2MptoclHrJZ2EJ6ep4tLQwKywMu7sHteOUTS8OLGh0zGmfl5MPGLKDJQnGiCC3Ir Y2m/xME7T177uX5V2MKo7L8qbkLAwVomxtROIjum0AlJJ89EQs5CzT45cGsMxxWBnVDE nKwr0nI8HLAAtCyzak+O1jcpZ4dsGHpaPqbj1tFYQ/TRjVHyybNpaBgsOzG3LFxncFL9 Duco4jAdxwMfJ4JfKipAKcwvofld9K7dvMDv3TUH+dHkkLYDUASeoGslAmUPI8JDv2Aq DehA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K7EffqyN; 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=8Wa67F3uIkliY92AKRAKsoMSrvUq4TGz3PwUepPMe4A=; b=JCsYJEbZzP8u9J/4gZ7IaXqEKnQJscmdf5lK3LuBB8FC/gfSSsPJM+cKpOKQ0CMX1y zo1nIlAtt9PNFpRhRyj3erf3KGfjoSJCj7Kt7O5qz7WrgAzOTm18sH32qLKl/j2yU2KJ RgyihXDS/7wElPX5A+S8MKF06axawJ3E83xj8= 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=8Wa67F3uIkliY92AKRAKsoMSrvUq4TGz3PwUepPMe4A=; b=ROVAfOx/ZhZ9T7j27E5jRN1ZeqSHjpjgkTWfFlOWc8WmvVHle+xZc1kc5jsp/n7ee3 /K36ONwGhEKvK8gmxZzwFMzJeLJDgTUgiojpXX2gr598mbrK51DeIroxQf5iwrDrEMxL UOfQwxRC2815ODouDCajqFbDqmvXngycawRu5LCNp8M+y/x7hFwv0KkbXe766fUVaogr qv7xhJknCKiA+CYw0Ibr2KT29xKxXx/aMr1d2TKnWi2m+dFoaYGCqPT5txviar1XKP7n y8dyvtoA7KEO1PWNLoiUVHZObgJQI9gbXLuY3VCbk1r6ljBTSjsqu8WPLOOG5kaoxDli mJsg== X-Gm-Message-State: AOAM532qAP2otHKXA7/tZS7CN7SUpvRZgmgJRJzOk2kI7mn8bMqW4izN +3Koo4fnkB6xciirvl9f75/Z4W4Z X-Google-Smtp-Source: ABdhPJxFgmii6ALn2CSHorqe+xzNoCDL5ih7Fsxb4LYZkU5co3UguU978/qSTQvGCm3nnwzNUtvXfg== X-Received: by 2002:a17:902:6bca:: with SMTP id m10mr3213024plt.210.1594719238057; Tue, 14 Jul 2020 02:33:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9344:: with SMTP id g4ls4147029plp.10.gmail; Tue, 14 Jul 2020 02:33:57 -0700 (PDT) X-Received: by 2002:a17:90a:36e5:: with SMTP id t92mr3583794pjb.59.1594719237625; Tue, 14 Jul 2020 02:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594719237; cv=none; d=google.com; s=arc-20160816; b=A1YUswf7EEdVvuWlAn5O1dTWFIKplK7l5heIWE2iROmGB1ygWcFMmaLfuChwHmhJaj M3sguh3PV5+lIiX/XcOUMlpkzuNXDQY0gdC+V8svzX++AUR0JyXAB8Im/JLvA0bD+6RT imLuYmLeULcHhFayTcNQgkTBf52NnNVIatgB22ZDwmMNV40SQyRCnpOZwxz8e6cb2R8R P5fxKiLjFhoHsFZEbKCNB+dfTCtoxLezEaxQos4TYVEATiulc8APeWKmqYERKgACIDGU LIWDKaQekG1g9QNVkYWU984q1pyrMpQwcP2u+AJRAGcdwB9nGLKzsYxUIEIBruLlBKW4 Q0sw== 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=gI8p0P7GBhpZRpRW9dMCtIUfvWoAmDO5toDakeAqdnQ=; b=ZbqO5dAA9wOIFOCvopQSfiDH78b7i/aCoJClSrHcWVaHTnJ/lBzD4/98SPPmQJp0U9 dMPaHv5yP7imFI9Hog+yFCdRtIXvIVzvbe5V/tJfWm54u1Xj1cGYRQ4EI9YVY5t79C5H R5Y5eE3QsPIkyRq499+W/avOCtFCn52UjleHzbafg2jUXStREpYDKg884PPYsv3aAAQz +a0mzn7TUeROTrI0Vx3iAcTqDpJmdcPWjfJQZ5yWn2+LFvv7bbtrrbtYLqGmsevr3pDN wRJzHuru3EbIaIQBv0DLdc78uYvNs3eccgC2UdG15Cgh0VL4AhNPFcyltdrDHAFSuTK+ iiNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K7EffqyN; 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 x8sor15255001plv.61.2020.07.14.02.33.57 for (Google Transport Security); Tue, 14 Jul 2020 02:33:57 -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: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 Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K7EffqyN; 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: , 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();