diff options
Diffstat (limited to 'sys/arm/freescale')
-rw-r--r-- | sys/arm/freescale/imx/imx6_machdep.c | 12 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx_machdep.c | 13 |
2 files changed, 12 insertions, 13 deletions
diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c index a1bbf4a..d009adc 100644 --- a/sys/arm/freescale/imx/imx6_machdep.c +++ b/sys/arm/freescale/imx/imx6_machdep.c @@ -34,9 +34,12 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/reboot.h> -#include <machine/bus.h> #include <vm/vm.h> #include <vm/pmap.h> + +#include <machine/bus.h> +#include <machine/devmap.h> + #include <arm/freescale/imx/imx6_anatopreg.h> #include <arm/freescale/imx/imx6_anatopvar.h> #include <arm/freescale/imx/imx_machdep.h> @@ -112,7 +115,6 @@ cpu_reset(void) */ u_int imx_soc_type() { - const struct pmap_devmap *pd; uint32_t digprog, hwsoc; uint32_t *pcr; const uint32_t HWSOC_MX6SL = 0x60; @@ -131,10 +133,8 @@ u_int imx_soc_type() IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT; /*printf("digprog = 0x%08x\n", digprog);*/ if (hwsoc == HWSOC_MX6DL) { - pd = pmap_devmap_find_pa(SCU_CONFIG_PHYSADDR, 4); - if (pd != NULL) { - pcr = (uint32_t *)(pd->pd_va + - (SCU_CONFIG_PHYSADDR - pd->pd_pa)); + pcr = arm_devmap_ptov(SCU_CONFIG_PHYSADDR, 4); + if (pcr != NULL) { /*printf("scu config = 0x%08x\n", *pcr);*/ if ((*pcr & 0x03) == 0) { hwsoc = HWSOC_MX6SOLO; diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c index 8226849..de0eb68 100644 --- a/sys/arm/freescale/imx/imx_machdep.c +++ b/sys/arm/freescale/imx/imx_machdep.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include <machine/armreg.h> #include <machine/bus.h> +#include <machine/devmap.h> #include <machine/machdep.h> #include <arm/freescale/imx/imx_machdep.h> @@ -46,14 +47,14 @@ __FBSDID("$FreeBSD$"); #define IMX_MAX_DEVMAP_ENTRIES 8 -static struct pmap_devmap devmap_entries[IMX_MAX_DEVMAP_ENTRIES]; +static struct arm_devmap_entry devmap_entries[IMX_MAX_DEVMAP_ENTRIES]; static u_int devmap_idx; static vm_offset_t devmap_vaddr = ARM_VECTORS_HIGH; void imx_devmap_addentry(vm_paddr_t pa, vm_size_t sz) { - struct pmap_devmap *m; + struct arm_devmap_entry *m; /* * The last table entry is the all-zeroes end-of-table marker. If we're @@ -102,7 +103,7 @@ initarm_lastaddr(void) */ imx_devmap_init(); - pmap_devmap_bootstrap_table = devmap_entries; + arm_devmap_register_table(devmap_entries); return (devmap_vaddr); } @@ -127,7 +128,7 @@ initarm_gpio_init(void) void initarm_late_init(void) { - struct pmap_devmap *m; + struct arm_devmap_entry *m; /* * We did the static devmap setup earlier, during initarm_lastaddr(), @@ -168,7 +169,6 @@ bus_dma_get_range_nb(void) void imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr) { - const struct pmap_devmap *pd; volatile uint16_t * pcr; /* @@ -178,10 +178,9 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr) * reset) bit being set in the watchdog status register after the reset. * This is how software can distinguish a reset from a wdog timeout. */ - if ((pd = pmap_devmap_find_pa(wdcr_physaddr, 2)) == NULL) { + if ((pcr = arm_devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) { printf("cpu_reset() can't find its control register... locking up now."); } else { - pcr = (uint16_t *)(pd->pd_va + (wdcr_physaddr - pd->pd_pa)); *pcr = WDOG_CR_WDE; } for (;;) |