Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2012 10:07:53 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240956 - head/sys/arm/lpc
Message-ID:  <201209261007.q8QA7rXu005107@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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, }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209261007.q8QA7rXu005107>