From patchwork Thu Sep 23 12:34:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 201882 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8NCZIuG003585 for ; Thu, 23 Sep 2010 12:35:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755197Ab0IWMfQ (ORCPT ); Thu, 23 Sep 2010 08:35:16 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:50027 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755155Ab0IWMfC (ORCPT ); Thu, 23 Sep 2010 08:35:02 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8NCYvRh010047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Sep 2010 07:35:00 -0500 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8NCYsDt028415; Thu, 23 Sep 2010 18:04:54 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id o8NCYsHr026535; Thu, 23 Sep 2010 18:04:54 +0530 Received: (from a0131687@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o8NCYsqO026533; Thu, 23 Sep 2010 18:04:54 +0530 From: Rajendra Nayak To: linux-omap@vger.kernel.org Cc: paul@pwsan.com, khilman@deeprootsystems.com, b-cousson@ti.com, Santosh Shilimkar , Rajendra Nayak Subject: [RFC 7/8] omap4: powerdomain: add context_offset field Date: Thu, 23 Sep 2010 18:04:50 +0530 Message-Id: <1285245291-26442-8-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1285245291-26442-7-git-send-email-rnayak@ti.com> References: <1285245291-26442-1-git-send-email-rnayak@ti.com> <1285245291-26442-2-git-send-email-rnayak@ti.com> <1285245291-26442-3-git-send-email-rnayak@ti.com> <1285245291-26442-4-git-send-email-rnayak@ti.com> <1285245291-26442-5-git-send-email-rnayak@ti.com> <1285245291-26442-6-git-send-email-rnayak@ti.com> <1285245291-26442-7-git-send-email-rnayak@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Sep 2010 12:35:18 +0000 (UTC) diff --git a/arch/arm/mach-omap2/powerdomains44xx.h b/arch/arm/mach-omap2/powerdomains44xx.h index 9c01b55..65e919b 100644 --- a/arch/arm/mach-omap2/powerdomains44xx.h +++ b/arch/arm/mach-omap2/powerdomains44xx.h @@ -40,6 +40,7 @@ static struct powerdomain core_44xx_pwrdm = { .pwrsts = PWRSTS_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 5, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* core_nret_bank */ [1] = PWRSTS_OFF_RET, /* core_ocmram */ @@ -64,6 +65,7 @@ static struct powerdomain gfx_44xx_pwrdm = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .pwrsts = PWRSTS_OFF_ON, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* gfx_mem */ }, @@ -81,6 +83,7 @@ static struct powerdomain abe_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRDM_POWER_OFF, .banks = 2, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_RET, /* aessmem */ [1] = PWRDM_POWER_OFF, /* periphmem */ @@ -100,6 +103,7 @@ static struct powerdomain dss_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* dss_mem */ }, @@ -117,6 +121,7 @@ static struct powerdomain tesla_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 3, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_RET, /* tesla_edma */ [1] = PWRSTS_OFF_RET, /* tesla_l1 */ @@ -137,6 +142,7 @@ static struct powerdomain wkup_44xx_pwrdm = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .pwrsts = PWRSTS_ON, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* wkup_bank */ }, @@ -153,6 +159,7 @@ static struct powerdomain cpu0_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, + .context_offset = 0x18, .pwrsts_mem_ret = { [0] = PWRSTS_OFF_RET, /* cpu0_l1 */ }, @@ -169,6 +176,7 @@ static struct powerdomain cpu1_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, + .context_offset = 0x18, .pwrsts_mem_ret = { [0] = PWRSTS_OFF_RET, /* cpu1_l1 */ }, @@ -184,6 +192,7 @@ static struct powerdomain emu_44xx_pwrdm = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .pwrsts = PWRSTS_OFF_ON, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* emu_bank */ }, @@ -200,6 +209,7 @@ static struct powerdomain mpu_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 3, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRSTS_OFF_RET, /* mpu_l1 */ [1] = PWRSTS_OFF_RET, /* mpu_l2 */ @@ -220,6 +230,7 @@ static struct powerdomain ivahd_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRDM_POWER_OFF, .banks = 4, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* hwa_mem */ [1] = PWRSTS_OFF_RET, /* sl2_mem */ @@ -242,6 +253,7 @@ static struct powerdomain cam_44xx_pwrdm = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .pwrsts = PWRSTS_OFF_ON, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* cam_mem */ }, @@ -259,6 +271,7 @@ static struct powerdomain l3init_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* l3init_bank1 */ }, @@ -276,6 +289,7 @@ static struct powerdomain l4per_44xx_pwrdm = { .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 2, + .context_offset = 0x24, .pwrsts_mem_ret = { [0] = PWRDM_POWER_OFF, /* nonretained_bank */ [1] = PWRDM_POWER_RET, /* retained_bank */ diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index 18b722d..96bf746 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h @@ -85,6 +85,7 @@ struct powerdomain; * @pwrsts_logic_ret: Possible logic power states when pwrdm in RETENTION * @flags: Powerdomain flags * @banks: Number of software-controllable memory banks in this powerdomain + * @context_offset: Offset for the context register, used only on OMAP4 * @pwrsts_mem_ret: Possible memory bank pwrstates when pwrdm in RETENTION * @pwrsts_mem_on: Possible memory bank pwrstates when pwrdm in ON * @pwrdm_clkdms: Clockdomains in this powerdomain @@ -102,6 +103,7 @@ struct powerdomain { const u8 pwrsts_logic_ret; const u8 flags; const u8 banks; + const u8 context_offset; const u8 pwrsts_mem_ret[PWRDM_MAX_MEM_BANKS]; const u8 pwrsts_mem_on[PWRDM_MAX_MEM_BANKS]; struct clockdomain *pwrdm_clkdms[PWRDM_MAX_CLKDMS];