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 #include +#include #include #include @@ -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 #include #include -#include #include #include @@ -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)); }