diff mbox series

[02/14] m53menlo: Switch to deriving CONFIG_SYS_NAND_PAGE_COUNT

Message ID 20210922185039.30707-2-trini@konsulko.com
State Accepted
Commit d73b9e67ed49be21fd51a26b830a6543dcffdbc0
Delegated to: Tom Rini
Headers show
Series [01/14] rk3308: Remove unused NAND defines | expand

Commit Message

Tom Rini Sept. 22, 2021, 6:50 p.m. UTC
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tom Rini Oct. 6, 2021, 5:47 p.m. UTC | #1
On Wed, Sep 22, 2021 at 02:50:27PM -0400, Tom Rini wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 813d326cdaf5..11c8a87c95ad 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -140,9 +140,11 @@ 
 #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