summaryrefslogtreecommitdiffstats
path: root/sys/arm/lpc
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2012-09-26 10:07:53 +0000
committerandrew <andrew@FreeBSD.org>2012-09-26 10:07:53 +0000
commitc9cd6f0dffbf82db96743a9cce5dbaae0eacfcd6 (patch)
tree6b45bcfbb30f944611a5bbb133c868449373724b /sys/arm/lpc
parente0125673c3366f5bcd214cc0ce608d4a18cfd401 (diff)
downloadFreeBSD-src-c9cd6f0dffbf82db96743a9cce5dbaae0eacfcd6.zip
FreeBSD-src-c9cd6f0dffbf82db96743a9cce5dbaae0eacfcd6.tar.gz
Create the new initarm_ functions to reduce the diff to the other FDT
versions of initarm
Diffstat (limited to 'sys/arm/lpc')
-rw-r--r--sys/arm/lpc/lpc_machdep.c36
1 files changed, 25 insertions, 11 deletions
diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c
index ee3bb5c..191fbf3 100644
--- a/sys/arm/lpc/lpc_machdep.c
+++ b/sys/arm/lpc/lpc_machdep.c
@@ -344,11 +344,8 @@ initarm(struct arm_boot_params *abp)
&memsize) != 0)
while(1);
- if (fdt_immr_addr(LPC_DEV_BASE) != 0)
- while (1);
-
/* Platform-specific initialisation */
- pmap_bootstrap_lastaddr = fdt_immr_va - ARM_NOCACHE_KVA_SIZE;
+ pmap_bootstrap_lastaddr = initarm_lastaddr();
pcpu0_init();
@@ -482,13 +479,7 @@ initarm(struct arm_boot_params *abp)
*/
OF_interpret("perform-fixup", 0);
-#if 0
- /*
- * Initialize GPIO as early as possible.
- */
- if (platform_gpio_init() != 0)
- while (1);
-#endif
+ initarm_gpio_init();
cninit();
@@ -505,6 +496,8 @@ initarm(struct arm_boot_params *abp)
printf("WARNING: could not fully configure devmap, error=%d\n",
err_devmap);
+ initarm_late_init();
+
/*
* Pages were allocated during the secondary bootstrap for the
* stacks for different CPU modes.
@@ -562,6 +555,27 @@ initarm(struct arm_boot_params *abp)
sizeof(struct pcb)));
}
+vm_offset_t
+initarm_lastaddr(void)
+{
+
+ if (fdt_immr_addr(LPC_DEV_BASE) != 0)
+ while (1);
+
+ /* Platform-specific initialisation */
+ return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE);
+}
+
+void
+initarm_gpio_init(void)
+{
+}
+
+void
+initarm_late_init(void)
+{
+}
+
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
OpenPOWER on IntegriCloud