All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings"
@ 2010-10-08 16:49 Jean Pihet
  2010-10-08 17:53 ` Paul Walmsley
  2010-10-08 20:06 ` Kevin Hilman
  0 siblings, 2 replies; 6+ messages in thread
From: Jean Pihet @ 2010-10-08 16:49 UTC (permalink / raw)
  To: linux-omap, G, Manjunath Kondaiah; +Cc: Kevin Hilman

Hi,

This patch reverts commit 914bab936fe0388a529079679e2f137aa4ff548d, which
breaks the OFF mode on the OMAP3 platforms.
The details are here below.

The intent behind the original patch was to fix some compiler
warnings, which I do not have on my side. Is the problem dependent on
the setup and config used?

Jean

---
>From ec85bc90978cf0f257e73eaad593ffb774595863 Mon Sep 17 00:00:00 2001
From: Jean Pihet <jean.pihet@newoldbits.com>
Date: Fri, 8 Oct 2010 18:36:48 +0200
Subject: [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings"

This reverts commit 914bab936fe0388a529079679e2f137aa4ff548d, which
breaks the OFF mode on the OMAP3 platforms.

The use of a void* pointer for scratchpad_address confuses the
compiler which generates wrong offset for the access to the L4
address space. In that case an alignement fault is generated
during the wake-up from OFF mode.

The code that causes problem is:
__raw_readl(scratchpad_address + OMAP343X_TABLE_ADDRESS_OFFSET);

Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
 arch/arm/mach-omap2/control.c |    4 ++--
 arch/arm/mach-omap2/pm34xx.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 1fa3294..049bfb1 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -217,7 +217,7 @@ void omap4_ctrl_pad_writel(u32 val, u16 offset)
 void omap3_clear_scratchpad_contents(void)
 {
 	u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET;
-	void __iomem *v_addr;
+	u32 *v_addr;
 	u32 offset = 0;
 	v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM);
 	if (prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
@@ -233,7 +233,7 @@ void omap3_clear_scratchpad_contents(void)
 /* Populate the scratchpad structure with restore structure */
 void omap3_save_scratchpad_contents(void)
 {
-	void  __iomem *scratchpad_address;
+	void * __iomem scratchpad_address;
 	u32 arm_context_addr;
 	struct omap3_scratchpad scratchpad_contents;
 	struct omap3_scratchpad_prcm_block prcm_block_contents;
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 8c8f1ac..af752ae 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -310,7 +310,7 @@ static void restore_control_register(u32 val)
 /* Function to restore the table entry that was modified for enabling MMU */
 static void restore_table_entry(void)
 {
-	void __iomem *scratchpad_address;
+	u32 *scratchpad_address;
 	u32 previous_value, control_reg_value;
 	u32 *address;

-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-11  8:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 16:49 [PATCH] Revert "OMAP: mach-omap2: Fix incorrect assignment warnings" Jean Pihet
2010-10-08 17:53 ` Paul Walmsley
2010-10-08 20:06 ` Kevin Hilman
2010-10-08 22:47   ` Kevin Hilman
2010-10-09  6:55     ` Jean Pihet
2010-10-11  8:31       ` Jean Pihet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.