m53menlo: Switch to deriving CONFIG_SYS_NAND_PAGE_COUNT
authorTom Rini <trini@konsulko.com>
Wed, 22 Sep 2021 18:50:27 +0000 (14:50 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 6 Oct 2021 13:15:14 +0000 (09:15 -0400)
Typically platforms will define CONFIG_SYS_NAND_PAGE_COUNT based on
CONFIG_SYS_NAND_BLOCK_SIZE / CONFIG_SYS_NAND_PAGE_SIZE.  Switch to this
in preparation for migrating CONFIG_SYS_NAND namespace to Kconfig.

Cc: Marek Vasut <marex@denx.de>
Cc: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
include/configs/m53menlo.h

index 813d326..11c8a87 100644 (file)
 #define CONFIG_SPL_STACK               0x70004000
 
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    CONFIG_SPL_PAD_TO
+#define CONFIG_SYS_NAND_BLOCK_SIZE     (128 * 1024)
 #define CONFIG_SYS_NAND_PAGE_SIZE      2048
 #define CONFIG_SYS_NAND_OOBSIZE                64
-#define CONFIG_SYS_NAND_PAGE_COUNT     64
+#define CONFIG_SYS_NAND_PAGE_COUNT     (CONFIG_SYS_NAND_BLOCK_SIZE / \
+                                        CONFIG_SYS_NAND_PAGE_SIZE)
 #define CONFIG_SYS_NAND_SIZE           (256 * 1024 * 1024)
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS  0