diff options
author | Ian Lepore <ian@FreeBSD.org> | 2014-05-06 14:26:24 +0000 |
---|---|---|
committer | Ian Lepore <ian@FreeBSD.org> | 2014-05-06 14:26:24 +0000 |
commit | 95da66135d1b25e13238ccc2bfe79aab109aaf47 (patch) | |
tree | 8c24bbcbafc934bfcc0f3594f88a5960d99d4664 | |
parent | 334b9c79c32bbeea2556a3a4f46b96f9e9178051 (diff) | |
download | src-95da66135d1b25e13238ccc2bfe79aab109aaf47.tar.gz src-95da66135d1b25e13238ccc2bfe79aab109aaf47.zip |
Enable PL310 power-saving modes and tune the cache ram latencies for imx6.
Notes
Notes:
svn path=/head/; revision=265447
-rw-r--r-- | sys/arm/freescale/imx/imx6_pl310.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/arm/freescale/imx/imx6_pl310.c b/sys/arm/freescale/imx/imx6_pl310.c index a4e383ea1bd6..9e0427faf4ed 100644 --- a/sys/arm/freescale/imx/imx6_pl310.c +++ b/sys/arm/freescale/imx/imx6_pl310.c @@ -44,6 +44,19 @@ __FBSDID("$FreeBSD$"); void platform_pl310_init(struct pl310_softc *sc) { + uint32_t reg; + + /* + * Enable power saving modes: + * - Dynamic Gating stops the clock when the controller is idle. + * - Standby stops the clock when the cores are in WFI mode. + */ + reg = pl310_read4(sc, PL310_POWER_CTRL); + reg |= POWER_CTRL_ENABLE_GATING | POWER_CTRL_ENABLE_STANDBY; + pl310_write4(sc, PL310_POWER_CTRL, reg); + + pl310_set_ram_latency(sc, PL310_TAG_RAM_CTRL, 4, 2, 3); + pl310_set_ram_latency(sc, PL310_DATA_RAM_CTRL, 4, 2, 3); } void |