summaryrefslogtreecommitdiff
path: root/common/flash.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2022-01-04 14:23:58 +0100
committerTom Rini <trini@konsulko.com>2022-01-21 14:01:35 -0500
commit98150e7e8c78b851a7710e18b156f279f8485cbe (patch)
tree82c493969d61e48171c439e866148e96e7d8eb71 /common/flash.c
parentc8363b12b26d7ef990fe00ca92071c3a26f70396 (diff)
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/flash.c')
-rw-r--r--common/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/flash.c b/common/flash.c
index bb82385c1f7..f939c2f9e95 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -91,7 +91,7 @@ addr2info(ulong addr)
flash_info_t *info;
int i;
- for (i=0, info = &flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
+ for (i = 0, info = &flash_info[0]; i < CFI_FLASH_BANKS; ++i, ++info) {
if (info->flash_id != FLASH_UNKNOWN &&
addr >= info->start[0] &&
/* WARNING - The '- 1' is needed if the flash