aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2011-10-18 11:06:25 +0100
committerJohn Rigby <john.rigby@linaro.org>2012-12-04 13:07:20 -0700
commit201a007057797eb4967966e54d0dbcce619b1cf3 (patch)
tree1e683b2c13dc71ae29fd9529604a80bf11234663 /board
parent06287fc4f3fed0044cc5e1d5506a81c9903f7de7 (diff)
ARM: vexpress: create A5 specific board config
This patch creates a new config for the A5 dual core tile that includes the generic config for the Versatile Express platform. The generic config has been modified to provide support for the Extended Memory Map, as used on the A5 core tile. A5 does not support the legacy memory map. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Diffstat (limited to 'board')
-rw-r--r--board/armltd/vexpress/vexpress_common.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index d5e109ec0..369b06f8f 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -45,8 +45,7 @@
static ulong timestamp;
static ulong lastdec;
-static struct wdt *wdt_base = (struct wdt *)WDT_BASE;
-static struct systimer *systimer_base = (struct systimer *)SYSTIMER_BASE;
+static struct systimer *systimer_base = (struct systimer *)V2M_TIMER01;
static struct sysctrl *sysctrl_base = (struct sysctrl *)SCTL_BASE;
static void flash__init(void);
@@ -173,13 +172,31 @@ static void vexpress_timer_init(void)
reset_timer_masked();
}
+int v2m_cfg_write(u32 devfn, u32 data)
+{
+ /* Configuration interface broken? */
+ u32 val;
+
+ devfn |= SYS_CFG_START | SYS_CFG_WRITE;
+
+ val = readl(V2M_SYS_CFGSTAT);
+ writel(val & ~SYS_CFG_COMPLETE, V2M_SYS_CFGSTAT);
+
+ writel(data, V2M_SYS_CFGDATA);
+ writel(devfn, V2M_SYS_CFGCTRL);
+
+ do {
+ val = readl(V2M_SYS_CFGSTAT);
+ } while (val == 0);
+
+ return !!(val & SYS_CFG_ERR);
+}
+
/* Use the ARM Watchdog System to cause reset */
void reset_cpu(ulong addr)
{
- writeb(WDT_EN, &wdt_base->wdogcontrol);
- writel(WDT_RESET_LOAD, &wdt_base->wdogload);
- while (1)
- ;
+ if (v2m_cfg_write(SYS_CFG_REBOOT | SYS_CFG_SITE_MB, 0))
+ printf("Unable to reboot\n");
}
/*