]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 22 Sep 2021 16:29:07 +0000 (18:29 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 28 Sep 2021 12:35:19 +0000 (08:35 -0400)
commitdbd0e0a1f4001c651ac0d4527a23cabf38b59f0d
tree7a152cb6009e5103551fd4be6eeb5122a0122982
parentda5883f09359ed28173dc8cb476595cb62660fcf
mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported

When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated,
CONFIG_SYS_MAX_FLASH_BANKS is replaced by cfi_flash_num_flash_banks,
but this variable is defined in drivers/mtd/cfi_flash.c, which is
compiled only when CONFIG_FLASH_CFI_DRIVER is activated, in U-Boot
or in SPL when CONFIG_SPL_MTD_SUPPORT is activated.

This patch deactivates this feature CONFIG_SYS_MAX_FLASH_BANKS_DETECT
when flash cfi driver is not activated to avoid compilation issue in
the next patch, when CONFIG_SYS_MAX_FLASH_BANKS is used in spi_nor_scan().

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
include/mtd/cfi_flash.h