summaryrefslogtreecommitdiff
path: root/board/omap1610inn/omap1610innovator.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-06-09 15:25:53 +0000
committerwdenk <wdenk>2004-06-09 15:25:53 +0000
commit3ff02c27d52c995c327a883e24d11126c6f2dfdf (patch)
treebe761b3c316771f8a600cb0927e5f41c0fbe6d0a /board/omap1610inn/omap1610innovator.c
parent70f05ac34ee02fe37d8bdcb45301104a4fa35e19 (diff)
* Patch by Imre Deak, 26 May 2004:
On OMAP1610 platforms check if booting from RAM(CS0) or flash(CS3). Set flash base accordingly, and decide whether to do or skip board specific setup steps. * Patch by Josef Baumgartner, 26 May 2004: Add missing define in include/asm-m68k/global_data.h
Diffstat (limited to 'board/omap1610inn/omap1610innovator.c')
-rw-r--r--board/omap1610inn/omap1610innovator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/omap1610inn/omap1610innovator.c b/board/omap1610inn/omap1610innovator.c
index 521eee34c3..ab1dabeb9f 100644
--- a/board/omap1610inn/omap1610innovator.c
+++ b/board/omap1610inn/omap1610innovator.c
@@ -36,6 +36,10 @@
#include <./configs/omap1510.h>
#endif
+#ifdef CONFIG_CS_AUTOBOOT
+unsigned long omap_flash_base;
+#endif
+
void flash__init (void);
void ether__init (void);
void set_muxconf_regs (void);
@@ -95,6 +99,12 @@ void flash__init (void)
{
#define EMIFS_GlB_Config_REG 0xfffecc0c
unsigned int regval;
+
+#ifdef CONFIG_CS_AUTOBOOT
+ /* Check swapping of CS0 and CS3, set flash base accordingly */
+ omap_flash_base = ((*((u32 *)OMAP_EMIFS_CONFIG_REG) & 0x02) == 0) ?
+ PHYS_FLASH_1_BM0 : PHYS_FLASH_1_BM1;
+#endif
regval = *((volatile unsigned int *) EMIFS_GlB_Config_REG);
/* Turn off write protection for flash devices. */
regval = regval | 0x0001;