diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2022-01-04 16:23:58 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-21 22:01:35 +0300 |
commit | 98150e7e8c78b851a7710e18b156f279f8485cbe (patch) | |
tree | 82c493969d61e48171c439e866148e96e7d8eb71 /drivers/mtd/cfi_flash.c | |
parent | c8363b12b26d7ef990fe00ca92071c3a26f70396 (diff) | |
download | u-boot-98150e7e8c78b851a7710e18b156f279f8485cbe.tar.xz |
mtd: cfi: introduce CFI_FLASH_BANKS
Replace CONFIG_SYS_MAX_FLASH_BANKS by CFI_FLASH_BANKS to prepare
Kconfig migration and avoid to redefine CONFIG_SYS_MAX_FLASH_BANKS
in cfi_flash.h.
After this patch CONFIG_SYS_MAX_FLASH_BANKS should be never used in
the cfi code: use CFI_MAX_FLASH_BANKS for struct size or CFI_FLASH_BANKS
for number of CFI banks which can be dynamic.
This patch modify all the files which include mtd/cfi_flash.h.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/cfi_flash.c')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 9c27fea5d8..71cefc125f 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -191,7 +191,7 @@ static flash_info_t *flash_get_info(ulong base) int i; flash_info_t *info; - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) { + for (i = 0; i < CFI_FLASH_BANKS; i++) { info = &flash_info[i]; if (info->size && info->start[0] <= base && base <= info->start[0] + info->size - 1) @@ -2419,7 +2419,7 @@ unsigned long flash_init(void) #endif /* Init: no FLASHes known */ - for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) { + for (i = 0; i < CFI_FLASH_BANKS; ++i) { flash_info[i].flash_id = FLASH_UNKNOWN; /* Optionally write flash configuration register */ |