diff options
author | ian <ian@FreeBSD.org> | 2014-05-17 20:22:22 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-17 20:22:22 +0000 |
commit | e111203de4ff2e5b910a02a32c680c216158afc6 (patch) | |
tree | 9e41be4459b39a47e9fd7b02a28cce35b7b0faaf /sys/arm | |
parent | 9f4d42e0d5ac9fd53ce7499b7ba78d5c2f392dcf (diff) | |
download | FreeBSD-src-e111203de4ff2e5b910a02a32c680c216158afc6.zip FreeBSD-src-e111203de4ff2e5b910a02a32c680c216158afc6.tar.gz |
MFC 264054, 264056
Switch imx6 to using the mpcore per-cpu event timers, but continue to use
the GPT timer, which is fixed-frequency, as a timecounter.
Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
be used in MI code.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/freescale/imx/files.imx6 | 1 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx6_anatop.c | 3 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx6_machdep.c | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/sys/arm/freescale/imx/files.imx6 b/sys/arm/freescale/imx/files.imx6 index cab333f..8697f6e 100644 --- a/sys/arm/freescale/imx/files.imx6 +++ b/sys/arm/freescale/imx/files.imx6 @@ -16,6 +16,7 @@ kern/kern_clocksource.c standard arm/arm/gic.c standard arm/arm/pl310.c standard arm/freescale/imx/bus_space.c standard +arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx_common.c standard diff --git a/sys/arm/freescale/imx/imx6_anatop.c b/sys/arm/freescale/imx/imx6_anatop.c index c713d8a..eb784ed 100644 --- a/sys/arm/freescale/imx/imx6_anatop.c +++ b/sys/arm/freescale/imx/imx6_anatop.c @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <machine/fdt.h> +#include <arm/arm/mpcore_timervar.h> #include <arm/freescale/fsl_ocotpreg.h> #include <arm/freescale/fsl_ocotpvar.h> #include <arm/freescale/imx/imx6_anatopreg.h> @@ -263,6 +264,8 @@ cpufreq_set_clock(struct imx6_anatop_softc * sc, uint32_t cpu_newhz) imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_ARM_CLR, IMX6_ANALOG_CCM_PLL_ARM_BYPASS); + + arm_tmr_change_frequency(sc->cpu_curhz / 2); } static void diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c index abca91f..c1074d0 100644 --- a/sys/arm/freescale/imx/imx6_machdep.c +++ b/sys/arm/freescale/imx/imx6_machdep.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include <machine/devmap.h> #include <machine/machdep.h> +#include <arm/arm/mpcore_timervar.h> #include <arm/freescale/imx/imx6_anatopreg.h> #include <arm/freescale/imx/imx6_anatopvar.h> #include <arm/freescale/imx/imx_machdep.h> @@ -55,6 +56,8 @@ void initarm_early_init(void) { + /* Inform the MPCore timer driver that its clock is variable. */ + arm_tmr_change_frequency(ARM_TMR_FREQUENCY_VARIES); } void |