Page MenuHomeFreeBSD

D50014.id154265.diff
No OneTemporary

D50014.id154265.diff

diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c
--- a/sys/arm/freescale/imx/imx6_machdep.c
+++ b/sys/arm/freescale/imx/imx6_machdep.c
@@ -35,6 +35,7 @@
#include <sys/devmap.h>
#include <vm/vm.h>
+#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/intr.h>
@@ -310,12 +311,13 @@
IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT;
/*printf("digprog = 0x%08x\n", digprog);*/
if (hwsoc == HWSOC_MX6DL) {
- pcr = devmap_ptov(SCU_CONFIG_PHYSADDR, 4);
+ pcr = pmap_mapdev(SCU_CONFIG_PHYSADDR, 4);
if (pcr != NULL) {
/*printf("scu config = 0x%08x\n", *pcr);*/
if ((*pcr & 0x03) == 0) {
hwsoc = HWSOC_MX6SOLO;
}
+ pmap_unmapdev(pcr, 4);
}
}
}
diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c
--- a/sys/arm/freescale/imx/imx_machdep.c
+++ b/sys/arm/freescale/imx/imx_machdep.c
@@ -31,7 +31,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/reboot.h>
-#include <sys/devmap.h>
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -66,7 +65,7 @@
{
volatile uint16_t cr, *pcr;
- if ((pcr = devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) {
+ if ((pcr = pmap_mapdev(wdcr_physaddr, sizeof(*pcr))) == NULL) {
printf("imx_wdog_cpu_reset(): "
"cannot find control register... locking up now.");
for (;;)
@@ -116,7 +115,7 @@
{
volatile uint16_t * psr;
- if ((psr = devmap_ptov(wdsr_phys, sizeof(*psr))) == NULL)
+ if ((psr = pmap_mapdev(wdsr_phys, sizeof(*psr))) == NULL)
return;
last_reset_status = *psr;
if (last_reset_status & WDOG_RSR_SFTW) {
@@ -126,4 +125,5 @@
} else if (last_reset_status & WDOG_RSR_POR) {
sysctl___hw_imx_last_reset_reason.oid_arg1 = "PowerOnReset";
}
+ pmap_unmapdev((void *)(uintptr_t)psr, sizeof(*psr));
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 27, 8:06 AM (14 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17813535
Default Alt Text
D50014.id154265.diff (1 KB)

Event Timeline