svn commit: r240956 - head/sys/arm/lpc
Andrew Turner
andrew at FreeBSD.org
Wed Sep 26 10:07:53 UTC 2012
Author: andrew
Date: Wed Sep 26 10:07:53 2012
New Revision: 240956
URL: http://svn.freebsd.org/changeset/base/240956
Log:
Create the new initarm_ functions to reduce the diff to the other FDT
versions of initarm
Modified:
head/sys/arm/lpc/lpc_machdep.c
Modified: head/sys/arm/lpc/lpc_machdep.c
==============================================================================
--- head/sys/arm/lpc/lpc_machdep.c Wed Sep 26 09:37:58 2012 (r240955)
+++ head/sys/arm/lpc/lpc_machdep.c Wed Sep 26 10:07:53 2012 (r240956)
@@ -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, }
More information about the svn-src-all
mailing list