diff options
author | br <br@FreeBSD.org> | 2016-04-26 11:53:37 +0000 |
---|---|---|
committer | br <br@FreeBSD.org> | 2016-04-26 11:53:37 +0000 |
commit | 778cc5a8110efa54481c3c539aab11ad44e1efad (patch) | |
tree | 97a3c2543ae513e2b876f0ecd1746036805b5285 /sys/arm/freescale | |
parent | 392b4907a4ffb8e699201d053a85e4a32b845a6a (diff) | |
download | FreeBSD-src-778cc5a8110efa54481c3c539aab11ad44e1efad.zip FreeBSD-src-778cc5a8110efa54481c3c539aab11ad44e1efad.tar.gz |
Move arm's devmap to some generic place, so it can be used
by other architectures.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D6091
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Diffstat (limited to 'sys/arm/freescale')
-rw-r--r-- | sys/arm/freescale/fsl_ocotp.c | 2 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx51_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx53_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx6_machdep.c | 12 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx_machdep.c | 6 | ||||
-rw-r--r-- | sys/arm/freescale/vybrid/vf_machdep.c | 6 |
6 files changed, 23 insertions, 23 deletions
diff --git a/sys/arm/freescale/fsl_ocotp.c b/sys/arm/freescale/fsl_ocotp.c index d3fb35b..09210c5 100644 --- a/sys/arm/freescale/fsl_ocotp.c +++ b/sys/arm/freescale/fsl_ocotp.c @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm.h> #include <vm/pmap.h> #include <dev/fdt/fdt_common.h> -#include <machine/devmap.h> +#include <sys/devmap.h> static uint32_t *ocotp_regs; static vm_size_t ocotp_size; diff --git a/sys/arm/freescale/imx/imx51_machdep.c b/sys/arm/freescale/imx/imx51_machdep.c index 5d8f380..c498bff 100644 --- a/sys/arm/freescale/imx/imx51_machdep.c +++ b/sys/arm/freescale/imx/imx51_machdep.c @@ -33,11 +33,11 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> #include <sys/reboot.h> +#include <sys/devmap.h> #include <vm/vm.h> #include <machine/bus.h> -#include <machine/devmap.h> #include <machine/machdep.h> #include <machine/platformvar.h> @@ -49,7 +49,7 @@ static vm_offset_t imx51_lastaddr(platform_t plat) { - return (arm_devmap_lastaddr()); + return (devmap_lastaddr()); } static int @@ -74,9 +74,9 @@ static int imx51_devmap_init(platform_t plat) { - arm_devmap_add_entry(0x70000000, 0x00100000); - arm_devmap_add_entry(0x73f00000, 0x00100000); - arm_devmap_add_entry(0x83f00000, 0x00100000); + devmap_add_entry(0x70000000, 0x00100000); + devmap_add_entry(0x73f00000, 0x00100000); + devmap_add_entry(0x83f00000, 0x00100000); return (0); } diff --git a/sys/arm/freescale/imx/imx53_machdep.c b/sys/arm/freescale/imx/imx53_machdep.c index 92b59e4..63dd949 100644 --- a/sys/arm/freescale/imx/imx53_machdep.c +++ b/sys/arm/freescale/imx/imx53_machdep.c @@ -33,11 +33,11 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> #include <sys/reboot.h> +#include <sys/devmap.h> #include <vm/vm.h> #include <machine/bus.h> -#include <machine/devmap.h> #include <machine/machdep.h> #include <machine/platformvar.h> @@ -49,7 +49,7 @@ static vm_offset_t imx53_lastaddr(platform_t plat) { - return (arm_devmap_lastaddr()); + return (devmap_lastaddr()); } static int @@ -74,9 +74,9 @@ static int imx53_devmap_init(platform_t plat) { - arm_devmap_add_entry(0x50000000, 0x00100000); - arm_devmap_add_entry(0x53f00000, 0x00100000); - arm_devmap_add_entry(0x63f00000, 0x00100000); + devmap_add_entry(0x50000000, 0x00100000); + devmap_add_entry(0x53f00000, 0x00100000); + devmap_add_entry(0x63f00000, 0x00100000); return (0); } diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c index d5417c2..8c767e1 100644 --- a/sys/arm/freescale/imx/imx6_machdep.c +++ b/sys/arm/freescale/imx/imx6_machdep.c @@ -33,11 +33,11 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> #include <sys/reboot.h> +#include <sys/devmap.h> #include <vm/vm.h> #include <machine/bus.h> -#include <machine/devmap.h> #include <machine/intr.h> #include <machine/machdep.h> #include <machine/platformvar.h> @@ -166,7 +166,7 @@ static vm_offset_t imx6_lastaddr(platform_t plat) { - return (arm_devmap_lastaddr()); + return (devmap_lastaddr()); } static int @@ -220,9 +220,9 @@ imx6_devmap_init(platform_t plat) const uint32_t IMX6_AIPS2_PHYS = 0x02100000; const uint32_t IMX6_AIPS2_SIZE = 0x00100000; - arm_devmap_add_entry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); - arm_devmap_add_entry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); - arm_devmap_add_entry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); + devmap_add_entry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); + devmap_add_entry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); + devmap_add_entry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); return (0); } @@ -287,7 +287,7 @@ u_int imx_soc_type() IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT; /*printf("digprog = 0x%08x\n", digprog);*/ if (hwsoc == HWSOC_MX6DL) { - pcr = arm_devmap_ptov(SCU_CONFIG_PHYSADDR, 4); + pcr = devmap_ptov(SCU_CONFIG_PHYSADDR, 4); if (pcr != NULL) { /*printf("scu config = 0x%08x\n", *pcr);*/ if ((*pcr & 0x03) == 0) { diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c index 002651a..6ef44a4 100644 --- a/sys/arm/freescale/imx/imx_machdep.c +++ b/sys/arm/freescale/imx/imx_machdep.c @@ -33,13 +33,13 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/reboot.h> +#include <sys/devmap.h> #include <vm/vm.h> #include <vm/pmap.h> #include <machine/armreg.h> #include <machine/bus.h> -#include <machine/devmap.h> #include <machine/machdep.h> #include <arm/freescale/imx/imx_machdep.h> @@ -85,7 +85,7 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr) * control register. The reset happens on the next cycle of the wdog * 32KHz clock, so hang out in a spin loop until the reset takes effect. */ - if ((pcr = arm_devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) { + if ((pcr = devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) { printf("cpu_reset() can't find its control register... locking up now."); } else { *pcr &= ~WDOG_CR_SRS; @@ -99,7 +99,7 @@ imx_wdog_init_last_reset(vm_offset_t wdsr_phys) { volatile uint16_t * psr; - if ((psr = arm_devmap_ptov(wdsr_phys, sizeof(*psr))) == NULL) + if ((psr = devmap_ptov(wdsr_phys, sizeof(*psr))) == NULL) return; last_reset_status = *psr; if (last_reset_status & WDOG_RSR_SFTW) { diff --git a/sys/arm/freescale/vybrid/vf_machdep.c b/sys/arm/freescale/vybrid/vf_machdep.c index 76018dd..d32ba0d 100644 --- a/sys/arm/freescale/vybrid/vf_machdep.c +++ b/sys/arm/freescale/vybrid/vf_machdep.c @@ -34,12 +34,12 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> +#include <sys/devmap.h> #include <vm/vm.h> #include <machine/armreg.h> #include <machine/bus.h> -#include <machine/devmap.h> #include <machine/machdep.h> #include <machine/platform.h> @@ -49,7 +49,7 @@ vm_offset_t platform_lastaddr(void) { - return (arm_devmap_lastaddr()); + return (devmap_lastaddr()); } void @@ -74,7 +74,7 @@ int platform_devmap_init(void) { - arm_devmap_add_entry(0x40000000, 0x100000); + devmap_add_entry(0x40000000, 0x100000); return (0); } |