Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2014 01:20:13 +0000 (UTC)
From:      Ganbold Tsagaankhuu <ganbold@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265207 - head/sys/arm/rockchip
Message-ID:  <201405020120.s421KDhD052863@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ganbold
Date: Fri May  2 01:20:13 2014
New Revision: 265207
URL: http://svnweb.freebsd.org/changeset/base/265207

Log:
  Switch to use arm_devmap_add_entry() to setup static device mapping.
  
  Approved by:	stas (mentor)

Modified:
  head/sys/arm/rockchip/rk30xx_machdep.c

Modified: head/sys/arm/rockchip/rk30xx_machdep.c
==============================================================================
--- head/sys/arm/rockchip/rk30xx_machdep.c	Fri May  2 00:52:13 2014	(r265206)
+++ head/sys/arm/rockchip/rk30xx_machdep.c	Fri May  2 01:20:13 2014	(r265207)
@@ -51,14 +51,11 @@ __FBSDID("$FreeBSD$");
 
 #include <arm/rockchip/rk30xx_wdog.h>
 
-/* Start of address space used for bootstrap map */
-#define DEVMAP_BOOTSTRAP_MAP_START	0xF0000000
-
 vm_offset_t
 initarm_lastaddr(void)
 {
 
-	return (DEVMAP_BOOTSTRAP_MAP_START);
+	return (arm_devmap_lastaddr());
 }
 
 void
@@ -81,27 +78,14 @@ initarm_late_init(void)
 	    CPU_CONTROL_DC_ENABLE|CPU_CONTROL_IC_ENABLE);
 }
 
-#define FDT_DEVMAP_MAX		(1 + 2 + 1 + 1)
-static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
-	{ 0, 0, 0, 0, 0, }
-};
-
 /*
- * Construct pmap_devmap[] with DT-derived config data.
+ * Set up static device mappings.
  */
 int
 initarm_devmap_init(void)
 {
-	int i = 0;
-
-	fdt_devmap[i].pd_va = 0xF0000000;
-	fdt_devmap[i].pd_pa = 0x20000000;
-	fdt_devmap[i].pd_size = 0x100000;
-	fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
-	fdt_devmap[i].pd_cache = PTE_DEVICE;
-	i++;
 
-	arm_devmap_register_table(&fdt_devmap[0]);
+	arm_devmap_add_entry(0x20000000, 0x00100000);
 	
 	return (0);
 }



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