[RFC,1/3] spl: Kconfig: allow to enable SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR for i.MX8M
| Message ID | 20250515131246.784206-2-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBVWQS7AQMGQE4BQ47QI@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9246140D18
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 15 May 2025 15:12:55 +0200 (CEST)
Received: by mail-wr1-f69.google.com with SMTP id
ffacd0b85a97d-3a0b5d18cb7sf480542f8f.2
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 15 May 2025 06:12:55 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1747314775; cv=pass;
d=google.com; s=arc-20240605;
b=Oi/0Bf/YVM4SrYGvlI3XUyaoHLfL70nghIF9p1VdPODnL5fRTGEMJIJh7c/Xrb1/QK
DgC3pk10UDawb7ZiyFeSeLsLYXZJYu29yH7CpWeypCbbmXAvopO5rE81jYYjOPblBJek
5wM1IH6LfnWalx+CodG5ggSbjXziA48e4h5/OnPdU+Lqi/I2ABTKLao4QMQspgqv5Cc6
r5EsuKHq6DX4mVEsQ8j8GZPVh6T7wSDyvIe+wm9Il5gM/VQWm+3tAObnuMZDHODh3umf
T53Oj5sw+2tX7f598muGUuWrtBSmWIG20BoXPpnQSU4JATJQoNSfSDyaXC7BzaU+xehB
1YVg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
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=SjGasdPXzkbX0nMQ5nDVFnKI2N9NjCh+a3BZIcQDWos=;
fh=nxSxlTbv4S9jhzeqtMEoxhuVEdqQWc/v64Fn4gJGgIY=;
b=Pgfe1T/lCp5d2UePQKZ0yic+zLq/CsBhc+gwdcM+oqKwUEZbjZaQ0Op7TYFfMPJ54x
TZfGC0jv72qzRtdqsfU6esukWQkZq0sqeEnrV1+V8+QszT/ttFbrKlNk2YIT5xrkzj7R
vy+QoTXuuuVdUdhLnogN9SSw0e2BfQA7TBRPSeF8b/Gq/pF0fpI1NlAA9Q1tJlPQZdCu
M8k3EUVML0+XRq/Orij3KE6B7Apu4/DvbHkoJrak7kZsJImOh7IOc6e8+JadMQbGLXGu
98yxuduk3sF7UdhJZsUVtyX264qHotGnQHxg63KDDOiUXkBAZ6pKW5o7Jp3lpzxzBGly
nhqA==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=S50eC9IY;
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=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1747314775; x=1747919575;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=SjGasdPXzkbX0nMQ5nDVFnKI2N9NjCh+a3BZIcQDWos=;
b=K3ydKnkXix0L3eF3m1BrJy+lE+YP9pHESWligCbvLNUPbSg4pVAabBVrtJhVQm0ww2
43kGE6Xu4PMHZ42ZbEwMi1JTfhMRGgxRsW9uuZBlifYHpyjwGHa2dOdU8A6ajaGTgd2r
NOhpTc038qv7dVA0T4EZwe6pwq9Rmzm6Ug5Jo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1747314775; x=1747919575;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from
:x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=SjGasdPXzkbX0nMQ5nDVFnKI2N9NjCh+a3BZIcQDWos=;
b=YcsH76EEPH/vYTAPTiXdMm6YbPWWK/JyHPhnG5FXxmR4VDVYIQgPnzcFQEq8ZRMdQ2
XtNPDn+9FIGlaUCaBYToorWob1+HcsYRzgL2oCGiFOAebdGAcZPZhAW5R7cRWDtPSm5l
hM23yorfMMkGRZBOyGPEB6w4YLQP9L/dnxSYQbULrGqsUNV913hXxy8dpDB0rFSNmU92
lNwY7NNVn1n9nhcCykRfGJwXb/x9nZ5II4UTZ/hbNwXvqNB3d6TJoHi1YJTXauA1NQhs
fvBoRYJ9O43Rm9wfkSTHMKNwijWO6HoV4Cys7mbOFLbnBbMR9MeLCP/hI/BgYLorpXPZ
z57Q==
X-Forwarded-Encrypted: i=2;
AJvYcCW4A7x3JkAnNo+DQSy3zNXxamjbdG9+JDhlbK40+3jDBqPsYTOkcYxpR71zRrjQTiIr/df9jnMRHMKwSY+C@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YwwYcM3E4yt+oJ/lljRB8lk2JXFLoyWfA8rvegM+MWgFZOGNHhO
i8OFQIl1pLx/VMtB0Bk97n9oFHSZPv1nROhEUiSap9/JzmSTlBKjCFIdgqt9AqzmvpDFD2ckgw=
=
X-Google-Smtp-Source:
AGHT+IGMmzFrrNikU2q0DXsyQqSXaftRa8gam1jUIJXnfeXXcPuaadS88BFcINxK7PH5vjZkO6R+cQ==
X-Received: by 2002:a05:6000:4007:b0:3a1:f537:45ea with SMTP id
ffacd0b85a97d-3a353751139mr2455933f8f.25.1747314775123;
Thu, 15 May 2025 06:12:55 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h=AVT/gBH4bKC7/cXwuBEPkYMmWM4LLknEEBiVc8+iRAxgIIgHiA==
Received: by 2002:a05:6000:18a3:b0:3a0:b37b:4c8d with SMTP id
ffacd0b85a97d-3a3513b4eb8ls524780f8f.1.-pod-prod-06-eu; Thu, 15 May 2025
06:12:53 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AJvYcCW/28lrFYpjzF/ArPYnKdqNsC1hxm6C44/5VT93v3bZGidcmoLdwqK5KR3zmX+rbg2VSbMDwlu/rgcX0Gne@amarulasolutions.com
X-Received: by 2002:a05:6000:184b:b0:3a0:b816:5a44 with SMTP id
ffacd0b85a97d-3a353752c02mr2660438f8f.35.1747314772934;
Thu, 15 May 2025 06:12:52 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1747314772; cv=none;
d=google.com; s=arc-20240605;
b=ZeKuhfxLd9DTIVKPJlvAg2553EOWUUrN2jxMgYZoJU82OaDpaTzHu29r81pJD9GiFD
Wxad3yEA9PG/yW6HX9DvOfwFqa3JM4C2VF7P2rMVxTQ9MiNvA+wfdb3Y3UiSHfG2K1pB
O3cECpYkzwj7o5alD4GqL/a9TEclnB3VCg9mRdC3g9+SNBggtzHTWqcylcoiFgS83L0O
AXYmgtSGJ9l2x19peagUyHM5WY1UWFfmUMYeaRa97FW5wPhpLf7P8sfoIr5j8ZtNbrSn
x19PNaXLqLBoeHCw9MaV0f2YC6YKVYdbzsUdRVAkuIrInfSpqtsCHALjTKBqRHJV692b
+gfA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=WLMDYlc7XBPS/Fby7WYjjbe9uW9pf+KvNQavun0zEN4=;
fh=RLWmTqoq6Qx+i/AHckUr+i1rEcE7n6qe/txspRTDChQ=;
b=cYihbjBD/jcs8j07rTXNRpXKDo/CQMXddlSF+eiZp7YMmbFr8xtcKfe7//oJujfHj7
K2mnul8yRnIvdD7uedYdTClhREmbgkXrAZuj6zufhZNCJsLIn5bPQ9+vNpvQAYFWhjFQ
Ad87kCxEom15hgiSJRlSsMrP4J3Tv+fEIAuLVaanMV+O10lujDnk6yOC9kmRmx/JKG1A
BBPCamPWcdkFm9bunoL22RvO4sxV/oYYF5UdkfbjeIZnG+2g0JeHtf5Dmtb4hzwIXMp1
q90M7thXgK6I18o2sG9YLenVtS9qQOMg4y+lRtHxI4HDaOffhgXuUCfjxCjrb+Ot2Ysl
nZ+Q==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=S50eC9IY;
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=pass 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-442d6875c12sor3331385e9.9.2025.05.15.06.12.52
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Thu, 15 May 2025 06:12:52 -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;
AJvYcCWljkkexMDSsvd6igGce+F3D5Y1byF1Xne5vT9jRDncjf9aQRuAIDcVNMDv2q6ZQB2vouZ2U/l0S41rWdrJ@amarulasolutions.com
X-Gm-Gg: ASbGncv0wWko65ITpguFA2YrQZyyPSyae3hvaoq9IS1u2AgYActYN++pAFv2cfIpGKh
OXYGQRyQ/RFsyQ3LfA0RFWDgKAvNVuz/cvsaQcoMOP9rQx/BpF2OJxWmvzA7lZF6h4BMJHbaC/Q
PSRS99hputIPrtfrC5mot7+GRKes7TJQkdqU+6J45GrU0qDsmvadXHhyUWJBEnQgEBmxDVO4zEi
5VhgPnbWfCBJVojD/6+Npl8bWtmo3cUs53G3FHYWW9H8zCEZ4p32GbMqCbpvgNQQpdDHsmBSzaA
R/bhmSOIYOswNvwavg8sjWJ3T7UlVvk4g91IcO0/O7wGdf8kxdjGOv55+DANLI5G6XRn2JJ/49C
4Y5bQCkbZeVTZIjkKUAtbpUZ82X+h/5qkdpP9CBxMgQs=
X-Received: by 2002:a05:600c:3e86:b0:43c:eeee:b706 with SMTP id
5b1f17b1804b1-442f9706006mr24406015e9.24.1747314772512;
Thu, 15 May 2025 06:12:52 -0700 (PDT)
Received: from dario-ThinkPad-T14s-Gen-2i.client.m3-hotspots.de
([46.189.28.43])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-442f39ef811sm65516825e9.35.2025.05.15.06.12.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 15 May 2025 06:12:51 -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>,
Anshul Dalal <anshuld@ti.com>,
Greg Malysa <malysagreg@gmail.com>,
Jerome Forissier <jerome.forissier@linaro.org>,
Lukas Funke <lukas.funke@weidmueller.com>,
Marek Vasut <marex@denx.de>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Paul Kocialkowski <contact@paulk.fr>,
Peng Fan <peng.fan@nxp.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Sean Anderson <seanga2@gmail.com>,
Simon Glass <sjg@chromium.org>,
Tom Rini <trini@konsulko.com>,
Trevor Woerner <twoerner@gmail.com>
Subject: [RFC PATCH 1/3] spl: Kconfig: allow to enable
SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR for i.MX8M
Date: Thu, 15 May 2025 15:12:40 +0200
Message-ID: <20250515131246.784206-2-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250515131246.784206-1-dario.binacchi@amarulasolutions.com>
References: <20250515131246.784206-1-dario.binacchi@amarulasolutions.com>
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=S50eC9IY;
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=pass 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 |
Restore imx8mn_bsh_smm_s2 properly booting
|
|
Commit Message
Dario Binacchi
May 15, 2025, 1:12 p.m. UTC
Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks
the boot of the BSH SMM S2 board. As stated in the commit itself, "Some
boards use this value even though MMC is not enabled in SPL, for example
imx8mn_bsh_smm_s2". The same commit makes SPL_SYS_MMCSD_RAW_MODE depend
on SPL_DM_MMC || SPL_MMC. With SPL_SYS_MMCSD_RAW_MODE unset, it is not
possible to enable SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR, thus breaking
the board's boot process.
The patch once again allows SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR to be
selected also for boards that do not use MMC, in this case on the i.MX8M
platform.
Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
common/spl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Dario, On 5/15/25 3:12 PM, Dario Binacchi wrote: > Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks > the boot of the BSH SMM S2 board. As stated in the commit itself, "Some > boards use this value even though MMC is not enabled in SPL, for example > imx8mn_bsh_smm_s2". The same commit makes SPL_SYS_MMCSD_RAW_MODE depend > on SPL_DM_MMC || SPL_MMC. With SPL_SYS_MMCSD_RAW_MODE unset, it is not > possible to enable SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR, thus breaking > the board's boot process. > > The patch once again allows SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR to be > selected also for boards that do not use MMC, in this case on the i.MX8M > platform. > Why would you use SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if you don't have any MMC? Shouldn't we rather fix the incorrect usage of this variable to be something else (or better guarded?). Cheers, Quentin To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Thu, May 15, 2025 at 03:26:18PM +0200, Quentin Schulz wrote: > Hi Dario, > > On 5/15/25 3:12 PM, Dario Binacchi wrote: > > Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks > > the boot of the BSH SMM S2 board. As stated in the commit itself, "Some > > boards use this value even though MMC is not enabled in SPL, for example > > imx8mn_bsh_smm_s2". The same commit makes SPL_SYS_MMCSD_RAW_MODE depend > > on SPL_DM_MMC || SPL_MMC. With SPL_SYS_MMCSD_RAW_MODE unset, it is not > > possible to enable SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR, thus breaking > > the board's boot process. > > > > The patch once again allows SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR to be > > selected also for boards that do not use MMC, in this case on the i.MX8M > > platform. > > > > Why would you use SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if you don't have any > MMC? Shouldn't we rather fix the incorrect usage of this variable to be > something else (or better guarded?). It appears that arch/arm/mach-imx/spl_imx_romapi.c::spl_romapi_get_uboot_base() will use the value so that we (apparently) go ROM->U-Boot, or at least ROM->some series of prior stage loaders->ROM->U-Boot. I'm not sure I love overloading the value like this, but I can't say it's wrong. Perhaps the help needs to be updated too?
On 5/15/25 4:30 PM, Tom Rini wrote: > On Thu, May 15, 2025 at 03:26:18PM +0200, Quentin Schulz wrote: >> Hi Dario, >> >> On 5/15/25 3:12 PM, Dario Binacchi wrote: >>> Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") breaks >>> the boot of the BSH SMM S2 board. As stated in the commit itself, "Some >>> boards use this value even though MMC is not enabled in SPL, for example >>> imx8mn_bsh_smm_s2". The same commit makes SPL_SYS_MMCSD_RAW_MODE depend >>> on SPL_DM_MMC || SPL_MMC. With SPL_SYS_MMCSD_RAW_MODE unset, it is not >>> possible to enable SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR, thus breaking >>> the board's boot process. >>> >>> The patch once again allows SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR to be >>> selected also for boards that do not use MMC, in this case on the i.MX8M >>> platform. >>> >> >> Why would you use SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR if you don't have any >> MMC? Shouldn't we rather fix the incorrect usage of this variable to be >> something else (or better guarded?). > > It appears that arch/arm/mach-imx/spl_imx_romapi.c::spl_romapi_get_uboot_base() > will use the value so that we (apparently) go ROM->U-Boot, or at least > ROM->some series of prior stage loaders->ROM->U-Boot. I'm not sure I > love overloading the value like this, but I can't say it's wrong. > Perhaps the help needs to be updated too? > Isn't it rather U-Boot SPL asking the BootROM to load the image for it instead of doing it by itself? Some MMC is technically present then, just that because the BootROM handles it and not U-Boot, we need to specify the offset in the MMC even though we only return that value to the BootROM. If that is correct, then I'm not sure we want to use SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR considering it selects SPL_LOAD_BLOCK which I would assume to be useless if the BootROM is doing all the work for the SPL? Cheers, Quentin To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index aa3a85eea54d..77bb21e74cd6 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -542,7 +542,7 @@ config SPL_SYS_MMCSD_RAW_MODE help Support booting from an MMC without a filesystem. -if SPL_SYS_MMCSD_RAW_MODE +if SPL_SYS_MMCSD_RAW_MODE || ARCH_IMX8M choice prompt "Method for locating next phase of boot (e.g. U-Boot)"