diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2025-04-07 20:59:51 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-05-05 14:16:59 -0600 |
commit | 03fb08d4aef8c342b583e148d1b5c4d289c5572f (patch) | |
tree | bdc197033132b4e2cc1254129bab55b5a9084f04 /env/env.c | |
parent | f717d798becf2dffd5816484962c350808e98a18 (diff) |
env: Introduce support for MTD
Introduce support for env in generic MTD. Currently we only support SPI
flash based on the lagacy sf cmd that assume SPI flash are always NOR.
This is not the case as to SPI controller also NAND can be attached.
To support also these flash scenario, add support for storing and
reading ENV from generic MTD device by adding an env driver that
base entirely on the MTD api.
Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and
CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed
by mtd list.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'env/env.c')
-rw-r--r-- | env/env.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/env/env.c b/env/env.c index bcc189e14db..dbaeedc3c3b 100644 --- a/env/env.c +++ b/env/env.c @@ -58,6 +58,9 @@ static enum env_location env_locations[] = { #ifdef CONFIG_ENV_IS_IN_SPI_FLASH ENVL_SPI_FLASH, #endif +#ifdef CONFIG_ENV_IS_IN_MTD + ENVL_MTD, +#endif #ifdef CONFIG_ENV_IS_IN_UBI ENVL_UBI, #endif |