From: Johan Jonker <jbx6244@gmail.com>
To: kever.yang@rock-chips.com
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu,
dario.binacchi@amarulasolutions.com,
michael@amarulasolutions.com, u-boot@lists.denx.de
Subject: [PATCH v4 1/8] mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN option
Date: Mon, 16 Oct 2023 00:32:28 +0200 [thread overview]
Message-ID: <540e564d-030b-fee2-b95a-fae322300b20@gmail.com> (raw)
In-Reply-To: <8c0f5bb6-0110-b7b5-3c40-2d8d98a94dfa@gmail.com>
On Rockchip SoCs the first boot stages are written on NAND
with help of manufacturer software that uses a different format
then the MTD framework. Skip the automatic BBT scan with the
NAND_SKIP_BBTSCAN option to be able to pass the driver probe
function and to let the original data unchanged.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/mtd/nand/raw/Kconfig | 9 +++++++++
drivers/mtd/nand/raw/rockchip_nfc.c | 3 +++
2 files changed, 12 insertions(+)
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index d624589a892b..72547f00fbec 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -611,6 +611,15 @@ config ROCKCHIP_NAND
NFC v800: RK3308, RV1108
NFC v900: PX30, RK3326
+config ROCKCHIP_NAND_SKIP_BBTSCAN
+ bool "Skip the automatic BBT scan with Rockchip NAND controllers"
+ depends on ROCKCHIP_NAND
+ default n
+ help
+ Skip the automatic BBT scan with the NAND_SKIP_BBTSCAN
+ option when data content is not in MTD format or
+ must remain unchanged.
+
config TEGRA_NAND
bool "Support for NAND controller on Tegra SoCs"
depends on ARCH_TEGRA
diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c
index 6ad51df4acff..df6742c2f9bb 100644
--- a/drivers/mtd/nand/raw/rockchip_nfc.c
+++ b/drivers/mtd/nand/raw/rockchip_nfc.c
@@ -981,6 +981,9 @@ static int rk_nfc_nand_chip_init(ofnode node, struct rk_nfc *nfc, int devnum)
chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
chip->options |= NAND_NO_SUBPAGE_WRITE | NAND_USE_BOUNCE_BUFFER;
+ if (IS_ENABLED(CONFIG_ROCKCHIP_NAND_SKIP_BBTSCAN))
+ chip->options |= NAND_SKIP_BBTSCAN;
+
rk_nfc_hw_init(nfc);
ret = nand_scan_ident(mtd, nsels, NULL);
if (ret)
--
2.39.2
next prev parent reply other threads:[~2023-10-15 22:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-15 22:30 [PATCH v4 0/8] Add rkmtd command Johan Jonker
2023-10-15 22:32 ` Johan Jonker [this message]
2023-10-15 22:32 ` [PATCH v4 2/8] rockchip: dm: prepare rkmtd UCLASS Johan Jonker
2023-10-16 21:54 ` Simon Glass
2023-10-15 22:33 ` [PATCH v4 3/8] rockchip: block: add rkmtd class and drivers Johan Jonker
2023-10-15 22:33 ` [PATCH v4 4/8] rockchip: block: blk-uclass: disable bounce buffer support for rkmtd Johan Jonker
2023-10-16 21:54 ` Simon Glass
2023-10-17 12:44 ` Johan Jonker
2023-10-18 3:31 ` Simon Glass
2023-10-15 22:33 ` [PATCH v4 5/8] rockchip: cmd: add rkmtd command Johan Jonker
2023-10-15 22:33 ` [PATCH v4 6/8] rockchip: test: dm: add rkmtd test Johan Jonker
2023-10-15 22:33 ` [PATCH v4 7/8] rockchip: doc: add rkmtd.rst Johan Jonker
2023-10-15 22:34 ` [PATCH v4 8/8] rockchip: configs: sandbox: enable rkmtd command Johan Jonker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=540e564d-030b-fee2-b95a-fae322300b20@gmail.com \
--to=jbx6244@gmail.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=kever.yang@rock-chips.com \
--cc=michael@amarulasolutions.com \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox