summaryrefslogtreecommitdiff
path: root/include/system-constants.h
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2023-11-04 16:37:41 -0400
committerTom Rini <trini@konsulko.com>2023-11-16 12:43:48 -0500
commit601b8901e058e524a57c7590020dc68193c2f9aa (patch)
treef3aa9da534593db75cc0f1b929fd1f9bec38acd4 /include/system-constants.h
parent23c2ebe4d46722e42592808554c7a2f4ad52be2c (diff)
nand: Calculate SYS_NAND_BLOCK_PAGES (neé SYS_NAND_PAGE_COUNT) automatically
Contrary to what the help message says, this is the number of pages per block. Calculate it automatically based on SYS_NAND_BLOCK_SIZE and SYS_NAND_PAGE_SIZE. To better reflect its semantics, rename it to SYS_NAND_BLOCK_PAGES. Signed-off-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'include/system-constants.h')
-rw-r--r--include/system-constants.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/system-constants.h b/include/system-constants.h
index 59371568d1e..d688629f119 100644
--- a/include/system-constants.h
+++ b/include/system-constants.h
@@ -41,4 +41,8 @@
#define SPL_PAYLOAD_ARGS_ADDR 0
#endif
+/* Number of pages per block */
+#define SYS_NAND_BLOCK_PAGES \
+ (CONFIG_SYS_NAND_BLOCK_SIZE / CONFIG_SYS_NAND_PAGE_SIZE)
+
#endif