Skip to content

Commit

Permalink
imx: mangle addresses after adding the offset
Browse files Browse the repository at this point in the history
don't use

	IO_ADDRESS($base) + $offset

but

	IO_ADDRESS($base + $offset)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Rabin Vincent <rabin@rab.in>
Cc: "Agustín Ferrín Pozuelo" <gatoguan-os@yahoo.com>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Cc: Valentin Longchamp <valentin.longchamp@epfl.ch>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Dmitriy Taychenachev <dimichxp@gmail.com>
  • Loading branch information
Uwe Kleine-König committed Jan 8, 2010
1 parent 59e2608 commit a9b7a2d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-mx2/clock_imx21.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <asm/clkdev.h>
#include <asm/div64.h>

#define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR) + (off))
#define IO_ADDR_CCM(off) (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))

/* Register offsets */
#define CCM_CSCR IO_ADDR_CCM(0x0)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mx2/clock_imx27.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <mach/common.h>
#include <mach/hardware.h>

#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR) + (off))
#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))

/* Register offsets */
#define CCM_CSCR IO_ADDR_CCM(0x0)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mx3/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void __init mx31_read_cpu_rev(void)
u32 i, srev;

/* read SREV register from IIM module */
srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR) + MXC_IIMSREV);
srev = __raw_readl(IO_ADDRESS(IIM_BASE_ADDR + MXC_IIMSREV));

for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
if (srev == mx31_cpu_type[i].srev) {
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/plat-mxc/include/mach/mxc.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ extern unsigned int __mxc_cpu_type;
#endif

#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2)
#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10)
#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4)
#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8)
#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10))
#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x4))
#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR + n * 0x10 + 0x8))
#endif

#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231())
Expand Down

0 comments on commit a9b7a2d

Please sign in to comment.