diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-11-13 14:55:35 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-11-13 14:55:53 -0500 |
commit | 2290c0d06d82faee87b1ab2d9d4f7bf81ef64379 (patch) | |
tree | e075e4d5534193f28e6059904f61e5ca03958d3c /arch/arm/mach-pxa/include/mach/hardware.h | |
parent | 4da669a2e3e5bc70b30a0465f3641528681b5f77 (diff) | |
parent | 52e4c2a05256cb83cda12f3c2137ab1533344edb (diff) |
Merge branch 'master' into for-next
Sync with Linus tree to have 157550ff ("mtd: add GPMI-NAND driver
in the config and Makefile") as I have patch depending on that one.
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/hardware.h')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/hardware.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index de63ca3016b..8184669dde2 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -36,22 +36,23 @@ | |||
36 | * Note that not all PXA2xx chips implement all those addresses, and the | 36 | * Note that not all PXA2xx chips implement all those addresses, and the |
37 | * kernel only maps the minimum needed range of this mapping. | 37 | * kernel only maps the minimum needed range of this mapping. |
38 | */ | 38 | */ |
39 | #define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) | ||
40 | #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1)) | 39 | #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1)) |
40 | #define io_p2v(x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1)) | ||
41 | 41 | ||
42 | #ifndef __ASSEMBLY__ | 42 | #ifndef __ASSEMBLY__ |
43 | 43 | # define IOMEM(x) ((void __iomem *)(x)) | |
44 | # define __REG(x) (*((volatile u32 *)io_p2v(x))) | 44 | # define __REG(x) (*((volatile u32 __iomem *)io_p2v(x))) |
45 | 45 | ||
46 | /* With indexed regs we don't want to feed the index through io_p2v() | 46 | /* With indexed regs we don't want to feed the index through io_p2v() |
47 | especially if it is a variable, otherwise horrible code will result. */ | 47 | especially if it is a variable, otherwise horrible code will result. */ |
48 | # define __REG2(x,y) \ | 48 | # define __REG2(x,y) \ |
49 | (*(volatile u32 *)((u32)&__REG(x) + (y))) | 49 | (*(volatile u32 __iomem*)((u32)&__REG(x) + (y))) |
50 | 50 | ||
51 | # define __PREG(x) (io_v2p((u32)&(x))) | 51 | # define __PREG(x) (io_v2p((u32)&(x))) |
52 | 52 | ||
53 | #else | 53 | #else |
54 | 54 | ||
55 | # define IOMEM(x) x | ||
55 | # define __REG(x) io_p2v(x) | 56 | # define __REG(x) io_p2v(x) |
56 | # define __PREG(x) io_v2p(x) | 57 | # define __PREG(x) io_v2p(x) |
57 | 58 | ||