public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/14] OMAP3: control/PRCM: move CONTROL_PADCONF_SYS_NIRQ save/restore to SCM code
Date: Mon, 06 Dec 2010 18:25:14 -0700	[thread overview]
Message-ID: <20101207012512.3708.64651.stgit@twilight.localdomain> (raw)
In-Reply-To: <20101207012242.3708.45451.stgit@twilight.localdomain>

For some reason, the PRCM context save/restore code also saves and
restores a single System Control Module register,
CONTROL_PADCONF_SYS_NIRQ.  This is probably just an error -- the
register should be handled by SCM code -- so this patch moves it
there.

If this register really does need to be saved and restored before the
rest of the PRCM registers, the code to do so should live in the SCM
code, and the PM code should call this separate function.  This
register pertains to devices with a stacked modem, so this patch is
unlikely to affect most OMAP devices out there.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/control.c |    5 +++++
 arch/arm/mach-omap2/prcm.c    |    5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 9fda3d7..b260e1b 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -134,6 +134,7 @@ struct omap3_control_regs {
 	u32 sramldo4;
 	u32 sramldo5;
 	u32 csi;
+	u32 padconf_sys_nirq;
 };
 
 static struct omap3_control_regs control_context;
@@ -447,6 +448,8 @@ void omap3_control_save_context(void)
 	control_context.sramldo4 = omap_ctrl_readl(OMAP343X_CONTROL_SRAMLDO4);
 	control_context.sramldo5 = omap_ctrl_readl(OMAP343X_CONTROL_SRAMLDO5);
 	control_context.csi = omap_ctrl_readl(OMAP343X_CONTROL_CSI);
+	control_context.padconf_sys_nirq =
+		omap_ctrl_readl(OMAP343X_CONTROL_PADCONF_SYSNIRQ);
 	return;
 }
 
@@ -503,6 +506,8 @@ void omap3_control_restore_context(void)
 	omap_ctrl_writel(control_context.sramldo4, OMAP343X_CONTROL_SRAMLDO4);
 	omap_ctrl_writel(control_context.sramldo5, OMAP343X_CONTROL_SRAMLDO5);
 	omap_ctrl_writel(control_context.csi, OMAP343X_CONTROL_CSI);
+	omap_ctrl_writel(control_context.padconf_sys_nirq,
+			 OMAP343X_CONTROL_PADCONF_SYSNIRQ);
 	return;
 }
 #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 2eca847..d27cdba 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -42,7 +42,6 @@ static void __iomem *cm2_base;
 #define MAX_MODULE_ENABLE_WAIT		100000
 
 struct omap3_prcm_regs {
-	u32 control_padconf_sys_nirq;
 	u32 iva2_cm_clksel1;
 	u32 iva2_cm_clksel2;
 	u32 cm_sysconfig;
@@ -312,8 +311,6 @@ void __init omap2_set_globals_prcm(struct omap_globals *omap2_globals)
 #ifdef CONFIG_ARCH_OMAP3
 void omap3_prcm_save_context(void)
 {
-	prcm_context.control_padconf_sys_nirq =
-			 omap_ctrl_readl(OMAP343X_CONTROL_PADCONF_SYSNIRQ);
 	prcm_context.iva2_cm_clksel1 =
 			 cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSEL1);
 	prcm_context.iva2_cm_clksel2 =
@@ -466,8 +463,6 @@ void omap3_prcm_save_context(void)
 
 void omap3_prcm_restore_context(void)
 {
-	omap_ctrl_writel(prcm_context.control_padconf_sys_nirq,
-					 OMAP343X_CONTROL_PADCONF_SYSNIRQ);
 	cm_write_mod_reg(prcm_context.iva2_cm_clksel1, OMAP3430_IVA2_MOD,
 					 CM_CLKSEL1);
 	cm_write_mod_reg(prcm_context.iva2_cm_clksel2, OMAP3430_IVA2_MOD,

  parent reply	other threads:[~2010-12-07  1:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07  1:24 [PATCH 00/14] OMAP: PRCM/powerdomain/clockdomain patches for 2.6.38, part one Paul Walmsley
2010-12-07  1:25 ` [PATCH 01/14] OMAP: powerdomain: Move static allocations from powerdomains.h to a .c file Paul Walmsley
2010-12-07  1:25 ` [PATCH 02/14] OMAP: powerdomain: Infrastructure to put arch specific code Paul Walmsley
2010-12-07  1:25 ` [PATCH 03/14] OMAP: powerdomain: Arch specific funcs for state control Paul Walmsley
2010-12-07  1:25 ` [PATCH 04/14] OMAP: powerdomain: Arch specific funcs for logic control Paul Walmsley
2010-12-07  1:25 ` [PATCH 05/14] OMAP: powerdomain: Arch specific funcs for mem control Paul Walmsley
2010-12-07  1:25 ` [PATCH 06/14] OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst Paul Walmsley
2010-12-07  1:25 ` [PATCH 07/14] OMAP2+: powerdomains: move powerdomain static data to .c files Paul Walmsley
2010-12-07  1:25 ` [PATCH 08/14] OMAP2+: clockdomains: move clockdomain " Paul Walmsley
2010-12-07  1:25 ` [PATCH 09/14] OMAP3: control/PRCM: add omap3_ctrl_write_boot_mode() Paul Walmsley
2010-12-07  1:25 ` Paul Walmsley [this message]
2010-12-07  1:25 ` [PATCH 11/14] OMAP4: PRCM: reorganize existing OMAP4 PRCM header files Paul Walmsley
2010-12-07  8:09   ` Cousson, Benoit
2010-12-08  6:47     ` Paul Walmsley
2010-12-09 22:31       ` Cousson, Benoit
2010-12-07 20:43   ` Cousson, Benoit
2010-12-08  6:40     ` Paul Walmsley
2010-12-08 20:57       ` Kevin Hilman
2010-12-07  1:25 ` [PATCH 12/14] OMAP4: PRCM: rename _MOD macros to _INST Paul Walmsley
2010-12-07  1:25 ` [PATCH 13/14] OMAP2/3: PRCM: split OMAP2/3-specific PRCM code into OMAP2/3-specific files Paul Walmsley
2010-12-07 13:37   ` Mark Brown
2010-12-15  4:50   ` Paul Walmsley
2010-12-15 12:23     ` Felipe Contreras
2010-12-22  3:51       ` Paul Walmsley
2010-12-15 16:39     ` Ramirez Luna, Omar
2010-12-22  4:10       ` Paul Walmsley
2010-12-07  1:25 ` [PATCH 14/14] OMAP3: PRM/CM: separate CM context save/restore; remove PRM context save/restore Paul Walmsley
2010-12-08  0:16 ` [PATCH 00/14] OMAP: PRCM/powerdomain/clockdomain patches for 2.6.38, part one Kevin Hilman
2010-12-08  6:20   ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101207012512.3708.64651.stgit@twilight.localdomain \
    --to=paul@pwsan.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox