From d6b79434644f67d04d089061f449535675a640eb Mon Sep 17 00:00:00 2001
From: Bo Shen <voice.shen@atmel.com>
Date: Fri, 18 Jul 2014 16:43:08 +0800
Subject: [PATCH] ARM: atmel: sama5d3xek: enable NOR flash support
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
---
 include/configs/sama5d3xek.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index 56c2454dff..0104d5f90a 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -79,8 +79,19 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-/* No NOR flash */
+/* NOR flash */
+#define CONFIG_CMD_FLASH
+
+#ifdef CONFIG_CMD_FLASH
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_FLASH_BASE		0x10000000
+#define CONFIG_SYS_MAX_FLASH_SECT	131
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#else
 #define CONFIG_SYS_NO_FLASH
+#endif
 
 /*
  * Command line configuration.
-- 
2.39.5