svn commit: r265447 - head/sys/arm/freescale/imx

Ian Lepore ian at FreeBSD.org
Tue May 6 14:26:25 UTC 2014


Author: ian
Date: Tue May  6 14:26:24 2014
New Revision: 265447
URL: http://svnweb.freebsd.org/changeset/base/265447

Log:
  Enable PL310 power-saving modes and tune the cache ram latencies for imx6.

Modified:
  head/sys/arm/freescale/imx/imx6_pl310.c

Modified: head/sys/arm/freescale/imx/imx6_pl310.c
==============================================================================
--- head/sys/arm/freescale/imx/imx6_pl310.c	Tue May  6 14:19:54 2014	(r265446)
+++ head/sys/arm/freescale/imx/imx6_pl310.c	Tue May  6 14:26:24 2014	(r265447)
@@ -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


More information about the svn-src-head mailing list