From: Purna Chandra Mandal <purna.mandal@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 09/18] board: pic32mzdask: add flash support for environments.
Date: Thu, 17 Dec 2015 23:01:16 +0530 [thread overview]
Message-ID: <5672F164.6020105@microchip.com> (raw)
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
reply other threads:[~2015-12-17 17:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5672F164.6020105@microchip.com \
--to=purna.mandal@microchip.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.