summaryrefslogtreecommitdiff
path: root/board/armltd/integrator/integrator.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/armltd/integrator/integrator.c')
-rw-r--r--board/armltd/integrator/integrator.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 780218cbe9..dd83ca5c03 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -36,6 +36,7 @@
#include <common.h>
#include <netdev.h>
#include <asm/io.h>
+#include "arm-ebi.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -56,6 +57,8 @@ void show_boot_progress(int progress)
int board_init (void)
{
+ u32 val;
+
/* arch number of Integrator Board */
#ifdef CONFIG_ARCH_CINTEGRATOR
gd->bd->bi_arch_number = MACH_TYPE_CINTEGRATOR;
@@ -73,6 +76,18 @@ extern void cm_remap(void);
cm_remap(); /* remaps writeable memory to 0x00000000 */
#endif
+ /*
+ * The system comes up with the flash memory non-writable and
+ * configuration locked. If we want U-Boot to be used for flash
+ * access we cannot have the flash memory locked.
+ */
+ writel(EBI_UNLOCK_MAGIC, EBI_BASE + EBI_LOCK_REG);
+ val = readl(EBI_BASE + EBI_CSR1_REG);
+ val &= EBI_CSR_WREN_MASK;
+ val |= EBI_CSR_WREN_ENABLE;
+ writel(val, EBI_BASE + EBI_CSR1_REG);
+ writel(0, EBI_BASE + EBI_LOCK_REG);
+
icache_enable ();
return 0;