* [U-Boot] [PATCH v1 09/18] board: pic32mzdask: add flash support for environments.
@ 2015-12-17 17:31 Purna Chandra Mandal
0 siblings, 0 replies; only message in thread
From: Purna Chandra Mandal @ 2015-12-17 17:31 UTC (permalink / raw)
To: u-boot
Add flash chip information and environment location (for environment in flash).
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
---
include/configs/pic32mzdask.h | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
index 9f867ed..89925f6 100644
--- a/include/configs/pic32mzdask.h
+++ b/include/configs/pic32mzdask.h
@@ -75,7 +75,19 @@
/*-------------------------------------------------
* FLASH configuration
*/
-#define CONFIG_SYS_NO_FLASH
+#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */
+#define CONFIG_SYS_MAX_FLASH_SECT 64 /* max number of sectors */
+#define CONFIG_SYS_FLASH_SIZE (1 << 20) /* 1M, size of one bank */
+#define PHYS_FLASH_1 0x1D000000 /* Flash Bank #1 */
+#define PHYS_FLASH_2 0x1D100000 /* Flash Bank #2 */
+#define CONFIG_SYS_FLASH_BANKS_LIST {PHYS_FLASH_1, PHYS_FLASH_2}
+#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
+#define PHYS_FLASH_SECT_SIZE \
+ (CONFIG_SYS_FLASH_SIZE / CONFIG_SYS_MAX_FLASH_SECT)
+
+/* FLASH erase/programming timeout (in ticks) */
+#define CONFIG_SYS_FLASH_ERASE_TOUT (2 * CONFIG_SYS_HZ)
+#define CONFIG_SYS_FLASH_WRITE_TOUT (25 * CONFIG_SYS_HZ)
/*------------------------------------------------------------
* Console Configuration
@@ -96,8 +108,10 @@
/* -------------------------------------------------
* Environment
*/
-#define CONFIG_ENV_IS_NOWHERE 1
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_SECT_SIZE 0x4000 /* 16K(one sector) for env */
#define CONFIG_ENV_SIZE 0x4000
+#define CONFIG_ENV_ADDR 0x9d0fc000 /* Last sector from Bank 0 */
/* ---------------------------------------------------------------------
* Board boot configuration
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-17 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17 17:31 [U-Boot] [PATCH v1 09/18] board: pic32mzdask: add flash support for environments Purna Chandra Mandal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.