| Message ID | 20261029160513.666555-1-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBQO5RXLQMGQEX4Q4IAQ@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6B7883F1B8
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 29 Oct 2026 17:05:22 +0100 (CET)
Received: by mail-wm1-f72.google.com with SMTP id
5b1f17b1804b1-4a17741243esf16764855e9.0
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 29 Oct 2026 09:05:22 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1793289922; cv=pass;
d=google.com; s=arc-20260327;
b=GA+ZJjEHhfQklQAvDAEzShAZZbZljB6QPO8x4Pj2I+WDTUUed3MiWvMNqy39DOCAUg
ac9f/CcxnNZvdWMXAUXgK5mVQsQrEnZKPbnE/A3RvkyL2g2J9Z0kzBbBGeoGqihKqA7j
owkJ/knGGO5tq+CwfcfY0lwMV8YgCvgmsrPsiNO0O6LyOd1Zutq4sgusBgDY9dFOSHtj
nKgiMMrzTUoIofLdHo9NN382SD3aSGzzJiw+ZZyOXb7sxtxwfY9+63dOyRiE/2WngVjO
P46c2v+9z+dV8BupVg/slslN3roNAkJKustzYpMeGc98111nEMtiqKlEC/stalIltcaC
Eebg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
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=MBXPu/BjZznnOErqIBRE+5Gv6PN8u54QvcdnErV8baI=;
fh=zJRbbD5z+8sBdPavkPQADPZ5D7AbGZJ4Y0qxwaglrik=;
b=dA15gJ+eD0kCBlb1gRt68XpFw5fmDkdwnF/GVaHmBpdS4ogKzqJmGhORicXspHXEud
zYL8dmVq84I0yCsqh/CWLtUZPCgYZ4RLR7prTraUftEgpdT80lZwUJ+rQYUsJFMdooQm
vWNa6YqJrGtUqymR1yJN53kFlW4Edb4r69CvMnGOpABLlQfcA03Rqzi4laJ0fnJhG/l3
kfoYH/sHRZNyRtmWIY3//HAvokZ47gX8V7apf58bDmQ3812TZpKR1ZCBRkjrj4/U0nTG
Pjy+CONK5oYedE3Gaomt/4p5IXViUbjr5vhBHWh5LJBXZy8TilGA4jCBgUpDxg9Jp9KL
XeSA==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=hkSbhBsD;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1793289922; x=1793894722;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:content-type
:x-original-authentication-results:x-original-sender:mime-version
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=MBXPu/BjZznnOErqIBRE+5Gv6PN8u54QvcdnErV8baI=;
b=YKmCwVC1X9dN3rnwlVVcxufzi2klhxO9sBASLArlmvYaNC3MiL9GCMxxcnB483ViDO
shBQZ0koYmkU22YvsLgb9VDyauAV9WbveQ7uVgwmQgIyWbwqSaZQrDJLT11/tIA2Uak1
lE32pG851QO5sIYfOyjKNWcnkYfLDRpuJOL1w=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793289922; x=1793894722;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:content-type:x-original-authentication-results:x-original-sender
:mime-version:message-id:date:subject:cc:to:from:x-gm-gg:x-beenthere
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=MBXPu/BjZznnOErqIBRE+5Gv6PN8u54QvcdnErV8baI=;
b=XGgAEq5Iw09SrpO1lVBcg7JNfAnfntewTaLpyOZhCc46HNNWtUXsLvacn6/AqKXc8l
IhfNi6MoWVPHVA1hjhhoPJcKkr2Fm7blnbQUaAGpl7YgQ4kWssa6nduj5D9SkFiTXgRv
Jd+3srOVVr25ToXbpuW/EYN/+9huHkjcyJ61HkMkPAh40uRea3e5kGgsDVALOBdDxHKu
PeU8/HuugTkN99Qwb1TiPbqZUHNk+4ZnXp6qhCe59n+oQomwYOQK4P+VyVfrSEB3fWal
L/sAR5t9XK9ON+P+8AzKii9RLAJXHuJanRTC/Eb4jDvtXSqoh9jIuhYwxNhqBSP4+nF3
WjjA==
X-Forwarded-Encrypted: i=2;
AKwUvBzYScoc+dK8ruji+t6QkjXfgFJI/awdK7PL2D9wCm6Rcqj0BuEOaf6a445z17wiBloWA8abTgizbmkz6369@patchwork.amarulasolutions.com
X-Gm-Message-State: AFq9FYItosUqw14IK+kMUcExglhhy6IK3FzT5iRutyXE3dB0hb+WIhRt
9MvKvTtdv/w+Kdtfcu7N7AifDVALF2gnERNZFcXmenG9itCKk771zHvdnYaPMEbpkklGOBrdpdh
Jfw==
X-Received: by 2002:a05:600c:3516:b0:4a1:fb01:13 with SMTP id
5b1f17b1804b1-4a966a56974mr133293145e9.18.1793289921787;
Thu, 29 Oct 2026 09:05:21 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="ATskLdfK8qHPkBFxpetr453+1Webs+UmSUZC1NqihCWp3pTNEQ=="
Received: by 2002:a05:600c:470d:b0:4a1:7c7d:8876 with SMTP id
5b1f17b1804b1-4abd2759f27ls620945e9.2.-pod-prod-08-eu; Thu, 29 Oct 2026
09:05:20 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AKwUvBxJ8e/+ur5u7/RWQl90pZXuicgLwUS6+xXmyY5DHBKp6kPUQ24VTn3TTWuwUDIXUWTEOLVJyIZ2vqNb1dNh@amarulasolutions.com
X-Received: by 2002:a05:600c:e543:b0:4aa:1527:659 with SMTP id
5b1f17b1804b1-4aa152706e5mr92761175e9.17.1793289919839;
Thu, 29 Oct 2026 09:05:19 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1793289919; cv=none;
d=google.com; s=arc-20260327;
b=MS6FemqFEOd8rXdbgsF71bHaYbsZjAqqI4iBIwkAtW5dDLMlVFLkG4JDPyOyD08JAf
2JP8n2NfaYjtn7QUJNlk1Em31HfxeuiNRKbt4wduF1PbJ76NRGBGd4Jfa6+gv5KPI4sN
Ok/sh/7K8kFkw3pDydO+kE1ntOgTNlSfX4I71o0Hhi2hgAvm7hCS71euM0kp6i5oKPNZ
h/iUFCXemQqRVUa2DFNwcT2YeLhxaFh/A3CiGAtuzHfnX9XYOtAmrXiLpudb7CCTY2Je
iyENuBBS7jlSrqpcgrAfcidKZ6fnsYKHcSAe9aLErAbySDB4DNqw7C6iHkVMx7P+bsCK
ceJQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=RvLm5Bvl+OlF/aMgZSZmEan847IxVTZEFojJR3gTKBU=;
fh=jWhGypPXyGl/kqN7pQTYvkV4hSTpzo/yJprt+X7Qh78=;
b=hrwfC7HUVXs1DbSZvgmKPgoBHYWpoZ1/Y3W5n84aoXMa1+YbNjcfQRaRBOePDQcrVA
MspHB8gnvRqE8XxXrmQE5ZlID4tESH5pIPTCWiC/OxIq3WYf4uD8M2sokzd5fF1ChJZ7
MdfCRhvERaNHsK6PsyjO2oMMneu04LEIJxb7J4NnTfJZIcer2asdC4acfL+GIzaNnsr1
Ig0WJmADk8y6HZthtG++ViR+eHo4DeoUEHTb9z6wDmrzRA6nwEMigztnFf4F8a5yHFnr
FA2Pnlp0LmmD0rShk/YBdr4P/YMf7IysFvVvzzuiee6ZNlY4tkQPZ1ke+KWwfs+C/giV
UBOA==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=hkSbhBsD;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
5b1f17b1804b1-4a35a41a699sor31321485e9.7.2026.10.29.09.05.19
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Thu, 29 Oct 2026 09:05:19 -0700 (PDT)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Forwarded-Encrypted: i=1;
AKwUvBxy0vJ9mSR2SjuADETG5Rn7nVXukcmjCTe2VKRZaqNLKegHRUuaw1U1fIquIn4+o7BO8FWwtxnZycTeb9hT@amarulasolutions.com
X-Gm-Gg: AYBFou0mh9TupWtqa45wV+Y9PVro2Opun4rHkfXFHKhDxiofu5w+41X/ivJ8B4fGOA0
6VRN/s72zGksrvBHr1ofI5ZYyWS13xXXMs13uLwn+QEAVMu9gcciazfWyKXi1wP5Krru4mEqTRB
t71GxEYjlQaAZ6U4W0fcsjEcqwhSxmSqs6+kooLbJyS2eiUKjkVk1jLi1462e6owkEv4htXo5xq
7XFSdYKmsGowZDzg2oM0fEGvlUT1JQyVLE2+v0RaXMPx2OkPlKQOusPK4cTiRZyuU0QCvXSOtqs
p8wtRxc9jDLZf7MJph2GtEq0kJrCfo49m7dgom6nbcbGwEmOPXtQrVkdu91TMnkP9fMMT7XOrzs
OchFjRbyCQn+6mMRO1vUKMU4M/C0ctEQeud/JPUhMUyBm51f5i6cQSrqdTLFA+1uh3+wMyjjQ/X
uXDbAYomEXNpNJkDhlicjMtLtMz21GF0UtUwoFeUxzz1eBJqg1EH7Uk8TtRfQG5qEanMTyi+W7Z
pQRwqXaIqL4dxFKsINWs+cPKarFFDXQD261Ltd+rsD6uqmomkEjc+todIKoFOVDRpRifeXnK53Q
sQPlgfmuuW2yQOWTyw55E9VlWBzqaOpa3DUlSCoYbxCfoOD3Uw+mmHVMqY0T8GhyrFVbKyGiama
6jM7DMRhV5fl35FAtk4YxUGP4OQF2ZBC/Z4AvsNi8RlS94aOB4KHjsVFRe7tE0xseZrQbzULP3g
9S3sh2N4bx06P2XlWy02mNu+A/4Q==
X-Received: by 2002:a05:600c:6095:b0:4a7:d9b1:b684 with SMTP id
5b1f17b1804b1-4a9643d51aamr128478565e9.2.1793289919349;
Thu, 29 Oct 2026 09:05:19 -0700 (PDT)
Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it
(host-79-14-29-58.business.telecomitalia.it. [79.14.29.58])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-48e6df1e543sm104692f8f.4.2026.10.29.09.05.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 29 Oct 2026 09:05:18 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: michael@amarulasolutions.com,
linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Fabio Estevam <festevam@gmail.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
Stefano Babic <sbabic@nabladev.com>,
Tom Rini <trini@konsulko.com>,
u-boot@lists.u-boot-project.org
Subject: [PATCH] ddr: imx: keep ddrmix_initialized out of .bss
Date: Thu, 29 Oct 2026 17:05:11 +0100
Message-ID: <20261029160513.666555-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=hkSbhBsD;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@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: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
ddr: imx: keep ddrmix_initialized out of .bss
|
|
Commit Message
Dario Binacchi
Oct. 29, 2026, 4:05 p.m. UTC
ddr_init() is called from board_init_f(), before .bss is cleared, so
ddrmix_initialized may already be non-zero on the first call. The DDRMIX
cold reset is then run on a DDRMIX that has never been initialized and
the SPL hangs (with DEBUG enabled in ddr_init.c):
DDRINFO: start DRAM init
DDRINFO: cold reset the DDRMIX
Move ddrmix_initialized to .data, so that it is zero on the first call.
Fixes: ae03528affd3 ("ddr: imx: Recreate the power-on state before repeating ddr_init()")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/ddr/imx/imx8m/ddr_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: 03e45557e1f38a39a0c80fe30483130ff376cf92
branch: imx8m-ddrmix-initialized-data
Comments
Hi Dario, On 29.10.26 17:05, Dario Binacchi wrote: > ddr_init() is called from board_init_f(), before .bss is cleared, so > ddrmix_initialized may already be non-zero on the first call. The DDRMIX > cold reset is then run on a DDRMIX that has never been initialized and > the SPL hangs (with DEBUG enabled in ddr_init.c): > > DDRINFO: start DRAM init > DDRINFO: cold reset the DDRMIX > > Move ddrmix_initialized to .data, so that it is zero on the first call. > > Fixes: ae03528affd3 ("ddr: imx: Recreate the power-on state before repeating ddr_init()") > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> This issue didn't show up in my tests on i.MX8MM and i.MX8MP, but it looks correct to me. Thanks for fixing this! Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Best regards Frieder > > --- > > drivers/ddr/imx/imx8m/ddr_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c > index b2873ab439d7..154e9d887465 100644 > --- a/drivers/ddr/imx/imx8m/ddr_init.c > +++ b/drivers/ddr/imx/imx8m/ddr_init.c > @@ -48,7 +48,7 @@ > #define CCGR_DDRMIX CCGR_DDR1 > #endif > > -static bool ddrmix_initialized; > +static bool ddrmix_initialized __section(".data"); > > static unsigned int g_cdd_rr_max[4]; > static unsigned int g_cdd_rw_max[4]; > --- > base-commit: 03e45557e1f38a39a0c80fe30483130ff376cf92 > branch: imx8m-ddrmix-initialized-data > To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On 10/29/26 17:05, Dario Binacchi wrote: > ddr_init() is called from board_init_f(), before .bss is cleared, so > ddrmix_initialized may already be non-zero on the first call. The DDRMIX > cold reset is then run on a DDRMIX that has never been initialized and > the SPL hangs (with DEBUG enabled in ddr_init.c): > > DDRINFO: start DRAM init > DDRINFO: cold reset the DDRMIX > > Move ddrmix_initialized to .data, so that it is zero on the first call. > > Fixes: ae03528affd3 ("ddr: imx: Recreate the power-on state before repeating ddr_init()") > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > [...] 3 out of 6 Verdin iMX8M Plus and the SMARC iMX8M Plus SoMs in our CI farm were hanging in SPL, this patch fixes it. Thanks! Emanuele Reviewed-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Tested-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c index b2873ab439d7..154e9d887465 100644 --- a/drivers/ddr/imx/imx8m/ddr_init.c +++ b/drivers/ddr/imx/imx8m/ddr_init.c @@ -48,7 +48,7 @@ #define CCGR_DDRMIX CCGR_DDR1 #endif -static bool ddrmix_initialized; +static bool ddrmix_initialized __section(".data"); static unsigned int g_cdd_rr_max[4]; static unsigned int g_cdd_rw_max[4];