diff mbox

[17/24] ARM: OMAP: use __iomem pointers for MMIO

Message ID 1347658492-11608-18-git-send-email-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann Sept. 14, 2012, 9:34 p.m. UTC
ARM is moving to stricter checks on readl/write functions,
so we need to use the correct types everywhere.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/plat-omap/include/plat/hardware.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Tony Lindgren Sept. 15, 2012, 6:10 p.m. UTC | #1
* Arnd Bergmann <arnd@arndb.de> [120914 14:36]:
> ARM is moving to stricter checks on readl/write functions,
> so we need to use the correct types everywhere.
> 
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/plat-omap/include/plat/hardware.h |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h
> index ddbde38..2518f6c 100644
> --- a/arch/arm/plat-omap/include/plat/hardware.h
> +++ b/arch/arm/plat-omap/include/plat/hardware.h

With my patches, this is now all omap1 specific and
moved to arch/arm/mach-omap1/include/mach/hardware.h.
It's probably easiest to just update this patch on
top of the hardware.h changes I've done.

Regards,

Tony
Arnd Bergmann Sept. 15, 2012, 8:14 p.m. UTC | #2
On Saturday 15 September 2012, Tony Lindgren wrote:
> With my patches, this is now all omap1 specific and
> moved to arch/arm/mach-omap1/include/mach/hardware.h.
> It's probably easiest to just update this patch on
> top of the hardware.h changes I've done.

Yes, sounds good. Do you want to send a patch for that
and let me drop this one then?

	Arnd
Tony Lindgren Sept. 16, 2012, 8:38 p.m. UTC | #3
* Arnd Bergmann <arnd@arndb.de> [120915 13:15]:
> On Saturday 15 September 2012, Tony Lindgren wrote:
> > With my patches, this is now all omap1 specific and
> > moved to arch/arm/mach-omap1/include/mach/hardware.h.
> > It's probably easiest to just update this patch on
> > top of the hardware.h changes I've done.
> 
> Yes, sounds good. Do you want to send a patch for that
> and let me drop this one then?

Yes I can pick this one and update it against one of my
branches to avoid merge conflicts.

Regards,

Tony
Tony Lindgren Sept. 17, 2012, 9:25 p.m. UTC | #4
* Tony Lindgren <tony@atomide.com> [120916 13:39]:
> * Arnd Bergmann <arnd@arndb.de> [120915 13:15]:
> > On Saturday 15 September 2012, Tony Lindgren wrote:
> > > With my patches, this is now all omap1 specific and
> > > moved to arch/arm/mach-omap1/include/mach/hardware.h.
> > > It's probably easiest to just update this patch on
> > > top of the hardware.h changes I've done.
> > 
> > Yes, sounds good. Do you want to send a patch for that
> > and let me drop this one then?
> 
> Yes I can pick this one and update it against one of my
> branches to avoid merge conflicts.

This applies against mach-omap1/include/mach/hardware.h
with some fuzz so no issues there.

But I think we should not apply it as these are physical
addresses, not virtual addresses for omap1.

We have IOMEM already in use for omap_read/write because of:

#define OMAP1_IO_ADDRESS(pa)	IOMEM((pa) - OMAP1_IO_OFFSET)

I think the right solution is to eventually get rid of
omap_read/write for omap1 also and replace them with ioremap
+ readl/writel.

Or am I missing something?

Regards,

Tony
diff mbox

Patch

diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h
index ddbde38..2518f6c 100644
--- a/arch/arm/plat-omap/include/plat/hardware.h
+++ b/arch/arm/plat-omap/include/plat/hardware.h
@@ -56,9 +56,9 @@ 
  * Timers
  * ----------------------------------------------------------------------------
  */
-#define OMAP_MPU_TIMER1_BASE	(0xfffec500)
-#define OMAP_MPU_TIMER2_BASE	(0xfffec600)
-#define OMAP_MPU_TIMER3_BASE	(0xfffec700)
+#define OMAP_MPU_TIMER1_BASE	IOMEM(0xfffec500)
+#define OMAP_MPU_TIMER2_BASE	IOMEM(0xfffec600)
+#define OMAP_MPU_TIMER3_BASE	IOMEM(0xfffec700)
 #define MPU_TIMER_FREE		(1 << 6)
 #define MPU_TIMER_CLOCK_ENABLE	(1 << 5)
 #define MPU_TIMER_AR		(1 << 1)
@@ -69,7 +69,7 @@ 
  * Clocks
  * ----------------------------------------------------------------------------
  */
-#define CLKGEN_REG_BASE		(0xfffece00)
+#define CLKGEN_REG_BASE		IOMEM(0xfffece00)
 #define ARM_CKCTL		(CLKGEN_REG_BASE + 0x0)
 #define ARM_IDLECT1		(CLKGEN_REG_BASE + 0x4)
 #define ARM_IDLECT2		(CLKGEN_REG_BASE + 0x8)
@@ -86,7 +86,7 @@ 
 #define SETARM_IDLE_SHIFT
 
 /* DPLL control registers */
-#define DPLL_CTL		(0xfffecf00)
+#define DPLL_CTL		IOMEM(0xfffecf00)
 
 /* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
 #define DSP_CONFIG_REG_BASE     IOMEM(0xe1008000)
@@ -100,7 +100,7 @@ 
  * UPLD
  * ---------------------------------------------------------------------------
  */
-#define ULPD_REG_BASE		(0xfffe0800)
+#define ULPD_REG_BASE		IOMEM(0xfffe0800)
 #define ULPD_IT_STATUS		(ULPD_REG_BASE + 0x14)
 #define ULPD_SETUP_ANALOG_CELL_3	(ULPD_REG_BASE + 0x24)
 #define ULPD_CLOCK_CTRL		(ULPD_REG_BASE + 0x30)
@@ -131,7 +131,7 @@ 
  */
 
 /* Watchdog timer within the OMAP3.2 gigacell */
-#define OMAP_MPU_WATCHDOG_BASE	(0xfffec800)
+#define OMAP_MPU_WATCHDOG_BASE	IOMEM(0xfffec800)
 #define OMAP_WDT_TIMER		(OMAP_MPU_WATCHDOG_BASE + 0x0)
 #define OMAP_WDT_LOAD_TIM	(OMAP_MPU_WATCHDOG_BASE + 0x4)
 #define OMAP_WDT_READ_TIM	(OMAP_MPU_WATCHDOG_BASE + 0x4)
@@ -149,8 +149,8 @@ 
  * or something similar.. -- PFM.
  */
 
-#define OMAP_IH1_BASE		0xfffecb00
-#define OMAP_IH2_BASE		0xfffe0000
+#define OMAP_IH1_BASE		IOMEM(0xfffecb00)
+#define OMAP_IH2_BASE		IOMEM(0xfffe0000)
 
 #define OMAP_IH1_ITR		(OMAP_IH1_BASE + 0x00)
 #define OMAP_IH1_MIR		(OMAP_IH1_BASE + 0x04)