From patchwork Tue Jul 2 11:28:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Bedia X-Patchwork-Id: 2812471 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 97CB49F3EB for ; Tue, 2 Jul 2013 11:29:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D46F6201E3 for ; Tue, 2 Jul 2013 11:29:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19683201E7 for ; Tue, 2 Jul 2013 11:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752196Ab3GBL3U (ORCPT ); Tue, 2 Jul 2013 07:29:20 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:36367 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602Ab3GBL3U (ORCPT ); Tue, 2 Jul 2013 07:29:20 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r62BSsuZ012100; Tue, 2 Jul 2013 06:28:54 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r62BSsw6025344; Tue, 2 Jul 2013 06:28:54 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Tue, 2 Jul 2013 06:28:53 -0500 Received: from psplinux063.india.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r62BSdwB030121; Tue, 2 Jul 2013 06:28:52 -0500 From: Vaibhav Bedia To: , CC: , , , Vaibhav Bedia Subject: [RFC 5/9] ARM: OMAP4: Add offsets for pwrstctrl and pwrstst Date: Tue, 2 Jul 2013 16:58:14 +0530 Message-ID: <1372764498-32503-6-git-send-email-vaibhav.bedia@ti.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1372764498-32503-1-git-send-email-vaibhav.bedia@ti.com> References: <1372764498-32503-1-git-send-email-vaibhav.bedia@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP OMAP4 powerdomains have a consistent register layout and so far the pwrstctrl and pwrstst offsets were hardcoded in the lowlevel APIs. AM335x powerdomains don't have a consistent register layout and hence the offsets used in the lowlevel APIs need to be removed. As part of the AM335x work two additional fields pwrstctrl_offs and pwrstst_offs were introduced in the pwrdomain data structure. To enable consolidation of AM335x and OMAP4 lowlevel APIs add in the appropriate offsets to the OMAP4 pwrdomains. Signed-off-by: Vaibhav Bedia --- arch/arm/mach-omap2/powerdomains44xx_data.c | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c index 704664c..ed53787 100644 --- a/arch/arm/mach-omap2/powerdomains44xx_data.c +++ b/arch/arm/mach-omap2/powerdomains44xx_data.c @@ -36,6 +36,8 @@ static struct powerdomain core_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_CORE_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 5, @@ -62,6 +64,8 @@ static struct powerdomain gfx_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_GFX_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_ON, .banks = 1, .pwrsts_mem_ret = { @@ -79,6 +83,8 @@ static struct powerdomain abe_44xx_pwrdm = { .voltdm = { .name = "iva" }, .prcm_offs = OMAP4430_PRM_ABE_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF, .banks = 2, @@ -99,6 +105,8 @@ static struct powerdomain dss_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_DSS_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF, .banks = 1, @@ -117,6 +125,8 @@ static struct powerdomain tesla_44xx_pwrdm = { .voltdm = { .name = "iva" }, .prcm_offs = OMAP4430_PRM_TESLA_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 3, @@ -139,6 +149,8 @@ static struct powerdomain wkup_44xx_pwrdm = { .voltdm = { .name = "wakeup" }, .prcm_offs = OMAP4430_PRM_WKUP_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_ON, .banks = 1, .pwrsts_mem_ret = { @@ -155,6 +167,8 @@ static struct powerdomain cpu0_44xx_pwrdm = { .voltdm = { .name = "mpu" }, .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST, .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, @@ -172,6 +186,8 @@ static struct powerdomain cpu1_44xx_pwrdm = { .voltdm = { .name = "mpu" }, .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST, .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, @@ -189,6 +205,8 @@ static struct powerdomain emu_44xx_pwrdm = { .voltdm = { .name = "wakeup" }, .prcm_offs = OMAP4430_PRM_EMU_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_ON, .banks = 1, .pwrsts_mem_ret = { @@ -205,6 +223,8 @@ static struct powerdomain mpu_44xx_pwrdm = { .voltdm = { .name = "mpu" }, .prcm_offs = OMAP4430_PRM_MPU_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 3, @@ -226,6 +246,8 @@ static struct powerdomain ivahd_44xx_pwrdm = { .voltdm = { .name = "iva" }, .prcm_offs = OMAP4430_PRM_IVAHD_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF, .banks = 4, @@ -250,6 +272,8 @@ static struct powerdomain cam_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_CAM_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_ON, .banks = 1, .pwrsts_mem_ret = { @@ -267,6 +291,8 @@ static struct powerdomain l3init_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_L3INIT_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 1, @@ -285,6 +311,8 @@ static struct powerdomain l4per_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_L4PER_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_RET_ON, .pwrsts_logic_ret = PWRSTS_OFF_RET, .banks = 2, @@ -308,6 +336,8 @@ static struct powerdomain always_on_core_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_ON, }; @@ -317,6 +347,8 @@ static struct powerdomain cefuse_44xx_pwrdm = { .voltdm = { .name = "core" }, .prcm_offs = OMAP4430_PRM_CEFUSE_INST, .prcm_partition = OMAP4430_PRM_PARTITION, + .pwrstctrl_offs = OMAP4_PM_PWSTCTRL, + .pwrstst_offs = OMAP4_PM_PWSTST, .pwrsts = PWRSTS_OFF_ON, .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, };