diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2022-01-04 14:23:58 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-21 14:01:35 -0500 |
commit | 98150e7e8c78b851a7710e18b156f279f8485cbe (patch) | |
tree | 82c493969d61e48171c439e866148e96e7d8eb71 /common/update.c | |
parent | c8363b12b26d7ef990fe00ca92071c3a26f70396 (diff) | |
download | u-boot-98150e7e8c78b851a7710e18b156f279f8485cbe.tar.gz |
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 'common/update.c')
-rw-r--r-- | common/update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/update.c b/common/update.c index f5c8684f1b..b9ad475d9d 100644 --- a/common/update.c +++ b/common/update.c @@ -112,12 +112,12 @@ static int update_flash_protect(int prot, ulong addr_first, ulong addr_last) if (prot == 0) { saved_prot_info = - calloc(CONFIG_SYS_MAX_FLASH_BANKS * CONFIG_SYS_MAX_FLASH_SECT, 1); + calloc(CFI_FLASH_BANKS * CONFIG_SYS_MAX_FLASH_SECT, 1); if (!saved_prot_info) return 1; } - for (bank = 0; bank < CONFIG_SYS_MAX_FLASH_BANKS; ++bank) { + for (bank = 0; bank < CFI_FLASH_BANKS; ++bank) { cnt = 0; info = &flash_info[bank]; |