From owner-svn-src-all@FreeBSD.ORG Tue May 6 14:26:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E431BEB6; Tue, 6 May 2014 14:26:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1BDD86A; Tue, 6 May 2014 14:26:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46EQO72041309; Tue, 6 May 2014 14:26:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46EQOEb041308; Tue, 6 May 2014 14:26:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405061426.s46EQOEb041308@svn.freebsd.org> From: Ian Lepore Date: Tue, 6 May 2014 14:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265447 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 14:26:25 -0000 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