From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4B9CC433F5 for ; Sat, 25 Sep 2021 15:18:27 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C788610FD for ; Sat, 25 Sep 2021 15:18:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C788610FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 317C18355B; Sat, 25 Sep 2021 17:18:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="CLvth6WL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BCB3C83569; Sat, 25 Sep 2021 17:18:20 +0200 (CEST) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 23C008355B for ; Sat, 25 Sep 2021 17:18:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-lf1-x132.google.com with SMTP id m3so54182804lfu.2 for ; Sat, 25 Sep 2021 08:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3+5X3uY9w5/JaSolv2Lr6ow3Vo92ywKTNU5YL9X4edc=; b=CLvth6WL8YRZbwU/VzcIt5p4+SLvZCNjAC/B35F3Ah4/+OfqRlFs47gvMmailp6ear HBJAxohvSk/4TIYCnR7QDUwPlHPisrY4niPdgZZq3ickYPKOYtGcPZUP+pCuYdIQCAjC daL/dLeZmw0QrGLiDFK1kxe/sL9IMk9lvdN6tDAet+BonajLzLmPGgXCXaNlaN8M+C+G 2e/t5s9VhfzOr2Cylz1Egf/h2lRi6Ex7VSPNc68reOTpswc03hTHNa4wMwaAJpSRoQHQ t/Q5uEKMt2tDd7xkJq07xkzwbF+URB3Z27l2PS0XJr+pZSz8Y1ZOX7m2sY95fNK2T6RC Cy5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3+5X3uY9w5/JaSolv2Lr6ow3Vo92ywKTNU5YL9X4edc=; b=K5w7yibef5VGxo1EVRLmz8sFY59/3A5vXGQM8MmJILGQLTKvsXZOa7jrbhwUVtMbY0 yA4liyBUXJVxV+VbMVjYDNLdwyhKC5Os4QzMRb7JGldWHcujcvMY6VzAP+KWUc3B0IQK scG2bVB4p5KVelIrKiTe5hGejGHkAgvR58BWtkwonhzfhUqhJ8U+eSJ0+9TLXhCkNIDY PSpIvuCbx3EAgX8xa3vN2gxBYJ+WuqmMYaDkTgZzSMm6Wbkuz64bJRE55SFdATCOIIg+ MBUAPUlEs+fTJExipq3t3/rXqT/bObwyYGDZ9O5v5pbykfnYEw2gvs7gcxXrxO7lJmxB N8Og== X-Gm-Message-State: AOAM532AVhhyoazSvw+NPnYxydrWB1ofzVxIG/qJQ5Rmdvl75SL5hX2I rlkzizeijpLCvQbbXJAY14ENEeG5dXuxuA== X-Google-Smtp-Source: ABdhPJxMKO2TyeuhhSGwv2xkiZxdvHrfLHxyx6Q1Uk6seonPbqT/BMNgPIQk0X98tj67bM3Un++y9w== X-Received: by 2002:a2e:5005:: with SMTP id e5mr16965802ljb.471.1632583095950; Sat, 25 Sep 2021 08:18:15 -0700 (PDT) Received: from cryobook.bearlog ([82.193.109.226]) by smtp.gmail.com with ESMTPSA id g16sm1056501lfb.102.2021.09.25.08.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 08:18:15 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Michael Scott , Oleksandr Suvorov , Bryan O'Donoghue , Fabio Estevam , "NXP i.MX U-Boot Team" , Peng Fan , Rui Miguel Silva , Stefano Babic Subject: [PATCH] imx: syscounter: allow timer_init for SPL build Date: Sat, 25 Sep 2021 18:18:12 +0300 Message-Id: <20210925151812.58480-1-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Michael Scott If we enable SPL and SKIP_LOWLEVEL_INIT, this results in the weak function timer_init() being used in the SPL build. This is not desirable as on iMX6 SoC, MMC will then fail once u-boot proper is booted due to timing issue. Fixes: be277c3a89 ("imx: mx7: avoid some initialization if low level is skipped") Signed-off-by: Michael Scott Signed-off-by: Oleksandr Suvorov --- arch/arm/mach-imx/syscounter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 6dfed365d2..e69a168a95 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -59,7 +59,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec) return usec; } -#ifndef CONFIG_SKIP_LOWLEVEL_INIT +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) || defined(CONFIG_SPL_BUILD) int timer_init(void) { struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; -- 2.31.1