aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-29 17:02:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-29 17:02:16 -0400
commitbe15cd72d256e5eb3261a781b8507fac83ab33f6 (patch)
tree1a8f95a9960e03149d27d935da25b768878feb3e /include
parente9d52234e35b27ea4ea5f2ab64ca47b1a0c740ab (diff)
parent37d07b72ef58f2d5ec7701ab75084fbeee0e503e (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-aaec2000/memory.h2
-rw-r--r--include/asm-arm/arch-cl7500/memory.h2
-rw-r--r--include/asm-arm/arch-clps711x/memory.h2
-rw-r--r--include/asm-arm/arch-ebsa110/memory.h2
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h10
-rw-r--r--include/asm-arm/arch-epxa10db/memory.h2
-rw-r--r--include/asm-arm/arch-h720x/memory.h2
-rw-r--r--include/asm-arm/arch-imx/memory.h2
-rw-r--r--include/asm-arm/arch-integrator/memory.h4
-rw-r--r--include/asm-arm/arch-iop3xx/memory.h4
-rw-r--r--include/asm-arm/arch-ixp2000/memory.h2
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h50
-rw-r--r--include/asm-arm/arch-ixp4xx/ixp4xx-regs.h75
-rw-r--r--include/asm-arm/arch-ixp4xx/memory.h2
-rw-r--r--include/asm-arm/arch-l7200/memory.h2
-rw-r--r--include/asm-arm/arch-lh7a40x/memory.h2
-rw-r--r--include/asm-arm/arch-omap/memory.h6
-rw-r--r--include/asm-arm/arch-pxa/memory.h2
-rw-r--r--include/asm-arm/arch-rpc/memory.h2
-rw-r--r--include/asm-arm/arch-s3c2410/memory.h4
-rw-r--r--include/asm-arm/arch-sa1100/memory.h2
-rw-r--r--include/asm-arm/arch-shark/memory.h2
-rw-r--r--include/asm-arm/arch-versatile/memory.h2
-rw-r--r--include/asm-arm/mach/arch.h1
-rw-r--r--include/asm-arm/mach/flash.h2
-rw-r--r--include/asm-arm/mach/map.h4
-rw-r--r--include/asm-arm/memory.h25
27 files changed, 130 insertions, 87 deletions
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h
index 79c90813bc3e..d8209f8911d6 100644
--- a/include/asm-arm/arch-aaec2000/memory.h
+++ b/include/asm-arm/arch-aaec2000/memory.h
@@ -13,7 +13,7 @@
13 13
14#include <linux/config.h> 14#include <linux/config.h>
15 15
16#define PHYS_OFFSET (0xf0000000UL) 16#define PHYS_OFFSET UL(0xf0000000)
17 17
18#define __virt_to_bus(x) __virt_to_phys(x) 18#define __virt_to_bus(x) __virt_to_phys(x)
19#define __bus_to_virt(x) __phys_to_virt(x) 19#define __bus_to_virt(x) __phys_to_virt(x)
diff --git a/include/asm-arm/arch-cl7500/memory.h b/include/asm-arm/arch-cl7500/memory.h
index 9776bba8e585..34f40a6cec30 100644
--- a/include/asm-arm/arch-cl7500/memory.h
+++ b/include/asm-arm/arch-cl7500/memory.h
@@ -17,7 +17,7 @@
17/* 17/*
18 * Physical DRAM offset. 18 * Physical DRAM offset.
19 */ 19 */
20#define PHYS_OFFSET (0x10000000UL) 20#define PHYS_OFFSET UL(0x10000000)
21 21
22/* 22/*
23 * These are exactly the same on the RiscPC as the 23 * These are exactly the same on the RiscPC as the
diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h
index bd978947db42..61d8717406ce 100644
--- a/include/asm-arm/arch-clps711x/memory.h
+++ b/include/asm-arm/arch-clps711x/memory.h
@@ -25,7 +25,7 @@
25/* 25/*
26 * Physical DRAM offset. 26 * Physical DRAM offset.
27 */ 27 */
28#define PHYS_OFFSET (0xc0000000UL) 28#define PHYS_OFFSET UL(0xc0000000)
29 29
30/* 30/*
31 * Virtual view <-> DMA view memory address translations 31 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h
index 5a9493e12275..02f144520c10 100644
--- a/include/asm-arm/arch-ebsa110/memory.h
+++ b/include/asm-arm/arch-ebsa110/memory.h
@@ -19,7 +19,7 @@
19/* 19/*
20 * Physical DRAM offset. 20 * Physical DRAM offset.
21 */ 21 */
22#define PHYS_OFFSET (0x00000000UL) 22#define PHYS_OFFSET UL(0x00000000)
23 23
24/* 24/*
25 * We keep this 1:1 so that we don't interfere 25 * We keep this 1:1 so that we don't interfere
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
index d0466f9987d3..09e335cd687d 100644
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ b/include/asm-arm/arch-ebsa285/memory.h
@@ -46,14 +46,14 @@ extern unsigned long __bus_to_virt(unsigned long);
46#if defined(CONFIG_ARCH_FOOTBRIDGE) 46#if defined(CONFIG_ARCH_FOOTBRIDGE)
47 47
48/* Task size and page offset at 3GB */ 48/* Task size and page offset at 3GB */
49#define TASK_SIZE (0xbf000000UL) 49#define TASK_SIZE UL(0xbf000000)
50#define PAGE_OFFSET (0xc0000000UL) 50#define PAGE_OFFSET UL(0xc0000000)
51 51
52#elif defined(CONFIG_ARCH_CO285) 52#elif defined(CONFIG_ARCH_CO285)
53 53
54/* Task size and page offset at 1.5GB */ 54/* Task size and page offset at 1.5GB */
55#define TASK_SIZE (0x5f000000UL) 55#define TASK_SIZE UL(0x5f000000)
56#define PAGE_OFFSET (0x60000000UL) 56#define PAGE_OFFSET UL(0x60000000)
57 57
58#else 58#else
59 59
@@ -64,7 +64,7 @@ extern unsigned long __bus_to_virt(unsigned long);
64/* 64/*
65 * Physical DRAM offset. 65 * Physical DRAM offset.
66 */ 66 */
67#define PHYS_OFFSET (0x00000000UL) 67#define PHYS_OFFSET UL(0x00000000)
68 68
69/* 69/*
70 * This decides where the kernel will search for a free chunk of vm 70 * This decides where the kernel will search for a free chunk of vm
diff --git a/include/asm-arm/arch-epxa10db/memory.h b/include/asm-arm/arch-epxa10db/memory.h
index 3f86bf7f67f0..999541b6a9f5 100644
--- a/include/asm-arm/arch-epxa10db/memory.h
+++ b/include/asm-arm/arch-epxa10db/memory.h
@@ -23,7 +23,7 @@
23/* 23/*
24 * Physical DRAM offset. 24 * Physical DRAM offset.
25 */ 25 */
26#define PHYS_OFFSET (0x00000000UL) 26#define PHYS_OFFSET UL(0x00000000)
27 27
28/* 28/*
29 * Virtual view <-> DMA view memory address translations 29 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h
index 5633447af268..4a1bfd78a0fe 100644
--- a/include/asm-arm/arch-h720x/memory.h
+++ b/include/asm-arm/arch-h720x/memory.h
@@ -11,7 +11,7 @@
11 * Page offset: 11 * Page offset:
12 * ( 0xc0000000UL ) 12 * ( 0xc0000000UL )
13 */ 13 */
14#define PHYS_OFFSET (0x40000000UL) 14#define PHYS_OFFSET UL(0x40000000)
15 15
16/* 16/*
17 * Virtual view <-> DMA view memory address translations 17 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-imx/memory.h b/include/asm-arm/arch-imx/memory.h
index 116a91fa14f1..d09ae32cd2f4 100644
--- a/include/asm-arm/arch-imx/memory.h
+++ b/include/asm-arm/arch-imx/memory.h
@@ -21,7 +21,7 @@
21#ifndef __ASM_ARCH_MMU_H 21#ifndef __ASM_ARCH_MMU_H
22#define __ASM_ARCH_MMU_H 22#define __ASM_ARCH_MMU_H
23 23
24#define PHYS_OFFSET (0x08000000UL) 24#define PHYS_OFFSET UL(0x08000000)
25 25
26/* 26/*
27 * Virtual view <-> DMA view memory address translations 27 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-integrator/memory.h b/include/asm-arm/arch-integrator/memory.h
index 2087ea7d28a9..1ab56d783e7c 100644
--- a/include/asm-arm/arch-integrator/memory.h
+++ b/include/asm-arm/arch-integrator/memory.h
@@ -23,8 +23,8 @@
23/* 23/*
24 * Physical DRAM offset. 24 * Physical DRAM offset.
25 */ 25 */
26#define PHYS_OFFSET (0x00000000UL) 26#define PHYS_OFFSET UL(0x00000000)
27#define BUS_OFFSET (0x80000000UL) 27#define BUS_OFFSET UL(0x80000000)
28 28
29/* 29/*
30 * Virtual view <-> DMA view memory address translations 30 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h
index 45351f5cd904..bc62f4b13235 100644
--- a/include/asm-arm/arch-iop3xx/memory.h
+++ b/include/asm-arm/arch-iop3xx/memory.h
@@ -12,9 +12,9 @@
12 * Physical DRAM offset. 12 * Physical DRAM offset.
13 */ 13 */
14#ifndef CONFIG_ARCH_IOP331 14#ifndef CONFIG_ARCH_IOP331
15#define PHYS_OFFSET (0xa0000000UL) 15#define PHYS_OFFSET UL(0xa0000000)
16#else 16#else
17#define PHYS_OFFSET (0x00000000UL) 17#define PHYS_OFFSET UL(0x00000000)
18#endif 18#endif
19 19
20/* 20/*
diff --git a/include/asm-arm/arch-ixp2000/memory.h b/include/asm-arm/arch-ixp2000/memory.h
index d0f415c6dae9..21e1de51e3f6 100644
--- a/include/asm-arm/arch-ixp2000/memory.h
+++ b/include/asm-arm/arch-ixp2000/memory.h
@@ -13,7 +13,7 @@
13#ifndef __ASM_ARCH_MEMORY_H 13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H 14#define __ASM_ARCH_MEMORY_H
15 15
16#define PHYS_OFFSET (0x00000000UL) 16#define PHYS_OFFSET UL(0x00000000)
17 17
18/* 18/*
19 * Virtual view <-> DMA view memory address translations 19 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
index abdcf51bd283..a66317ab2071 100644
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ b/include/asm-arm/arch-ixp2000/platform.h
@@ -15,40 +15,40 @@
15 15
16#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
17 17
18static inline unsigned long ixp2000_reg_read(volatile void *reg)
19{
20 return *((volatile unsigned long *)reg);
21}
22
23static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
24{
25 *((volatile unsigned long *)reg) = val;
26}
27
18/* 28/*
19 * The IXP2400 B0 silicon contains an erratum (#66) that causes writes 29 * On the IXP2400, we can't use XCB=000 due to chip bugs. We use
20 * to on-chip I/O register to not complete fully. What this means is 30 * XCB=101 instead, but that makes all I/O accesses bufferable. This
21 * that if you have a write to on-chip I/O followed by a back-to-back 31 * is not a problem in general, but we do have to be slightly more
22 * read or write, the first write will happen twice. OR...if it's 32 * careful because I/O writes are no longer automatically flushed out
23 * not a back-to-back transaction, the read or write will generate 33 * of the write buffer.
24 * incorrect data.
25 *
26 * The official work around for this is to set the on-chip I/O regions
27 * as XCB=101 and then force a read-back from the register.
28 * 34 *
35 * In cases where we want to make sure that a write has been flushed
36 * out of the write buffer before we proceed, for example when masking
37 * a device interrupt before re-enabling IRQs in CPSR, we can use this
38 * function, ixp2000_reg_wrb, which performs a write, a readback, and
39 * issues a dummy instruction dependent on the value of the readback
40 * (mov rX, rX) to make sure that the readback has completed before we
41 * continue.
29 */ 42 */
30#if defined(CONFIG_ARCH_ENP2611) || defined(CONFIG_ARCH_IXDP2400) || defined(CONFIG_ARCH_IXDP2401) 43static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
31
32#include <asm/system.h> /* Pickup local_irq_ functions */
33
34static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
35{ 44{
36 unsigned long dummy; 45 unsigned long dummy;
37 unsigned long flags;
38 46
39 local_irq_save(flags);
40 *((volatile unsigned long *)reg) = val; 47 *((volatile unsigned long *)reg) = val;
41 barrier(); 48
42 dummy = *((volatile unsigned long *)reg); 49 dummy = *((volatile unsigned long *)reg);
43 local_irq_restore(flags); 50 __asm__ __volatile__("mov %0, %0" : "+r" (dummy));
44}
45#else
46static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
47{
48 *((volatile unsigned long *)reg) = val;
49} 51}
50#endif /* IXDP2400 || IXDP2401 */
51#define ixp2000_reg_read(reg) (*((volatile unsigned long *)reg))
52 52
53/* 53/*
54 * Boards may multiplex different devices on the 2nd channel of 54 * Boards may multiplex different devices on the 2nd channel of
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
index 004696a95bdb..2b149ed59149 100644
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
@@ -36,11 +36,11 @@
36 * 36 *
37 * 0x6000000 0x00004000 ioremap'd QMgr 37 * 0x6000000 0x00004000 ioremap'd QMgr
38 * 38 *
39 * 0xC0000000 0x00001000 0xffbfe000 PCI CFG 39 * 0xC0000000 0x00001000 0xffbff000 PCI CFG
40 * 40 *
41 * 0xC4000000 0x00001000 0xffbfd000 EXP CFG 41 * 0xC4000000 0x00001000 0xffbfe000 EXP CFG
42 * 42 *
43 * 0xC8000000 0x0000C000 0xffbf2000 On-Chip Peripherals 43 * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals
44 */ 44 */
45 45
46/* 46/*
@@ -52,22 +52,22 @@
52 * Expansion BUS Configuration registers 52 * Expansion BUS Configuration registers
53 */ 53 */
54#define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000) 54#define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000)
55#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFD000) 55#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFE000)
56#define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000) 56#define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000)
57 57
58/* 58/*
59 * PCI Config registers 59 * PCI Config registers
60 */ 60 */
61#define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000) 61#define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000)
62#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFE000) 62#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFF000)
63#define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000) 63#define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000)
64 64
65/* 65/*
66 * Peripheral space 66 * Peripheral space
67 */ 67 */
68#define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000) 68#define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000)
69#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBF2000) 69#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBEB000)
70#define IXP4XX_PERIPHERAL_REGION_SIZE (0x0000C000) 70#define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000)
71 71
72/* 72/*
73 * Debug UART 73 * Debug UART
@@ -115,25 +115,48 @@
115/* 115/*
116 * Peripheral Space Register Region Base Addresses 116 * Peripheral Space Register Region Base Addresses
117 */ 117 */
118#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000) 118#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000)
119#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000) 119#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000)
120#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000) 120#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000)
121#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000) 121#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
122#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000) 122#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
123#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000) 123#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
124#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) 124#define IXP4XX_NPEA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
125#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) 125#define IXP4XX_NPEB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
126#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000) 126#define IXP4XX_NPEC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
127 127#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
128#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000) 128#define IXP4XX_EthC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
129#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000) 129#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
130#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000) 130/* ixp46X only */
131#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 131#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
132#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 132#define IXP4XX_EthB1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000)
133#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 133#define IXP4XX_EthB2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000)
134#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 134#define IXP4XX_EthB3_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000)
135#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 135#define IXP4XX_TIMESYNC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000)
136#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000) 136#define IXP4XX_I2C_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000)
137#define IXP4XX_SSP_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000)
138
139
140#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
141#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
142#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
143#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
144#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
145#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
146#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
147#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
148#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
149#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
150#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
151#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
152/* ixp46X only */
153#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xC000)
154#define IXP4XX_EthB1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xD000)
155#define IXP4XX_EthB2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xE000)
156#define IXP4XX_EthB3_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xF000)
157#define IXP4XX_TIMESYNC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x10000)
158#define IXP4XX_I2C_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x11000)
159#define IXP4XX_SSP_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x12000)
137 160
138/* 161/*
139 * Constants to make it easy to access Interrupt Controller registers 162 * Constants to make it easy to access Interrupt Controller registers
diff --git a/include/asm-arm/arch-ixp4xx/memory.h b/include/asm-arm/arch-ixp4xx/memory.h
index d348548b592b..e024d0a1a669 100644
--- a/include/asm-arm/arch-ixp4xx/memory.h
+++ b/include/asm-arm/arch-ixp4xx/memory.h
@@ -12,7 +12,7 @@
12/* 12/*
13 * Physical DRAM offset. 13 * Physical DRAM offset.
14 */ 14 */
15#define PHYS_OFFSET (0x00000000UL) 15#define PHYS_OFFSET UL(0x00000000)
16 16
17#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
18 18
diff --git a/include/asm-arm/arch-l7200/memory.h b/include/asm-arm/arch-l7200/memory.h
index c5b9608cb137..9e50a171f78a 100644
--- a/include/asm-arm/arch-l7200/memory.h
+++ b/include/asm-arm/arch-l7200/memory.h
@@ -15,7 +15,7 @@
15/* 15/*
16 * Physical DRAM offset on the L7200 SDB. 16 * Physical DRAM offset on the L7200 SDB.
17 */ 17 */
18#define PHYS_OFFSET (0xf0000000UL) 18#define PHYS_OFFSET UL(0xf0000000)
19 19
20#define __virt_to_bus(x) __virt_to_phys(x) 20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x) 21#define __bus_to_virt(x) __phys_to_virt(x)
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h
index c650e6feb9d5..c92bcb837629 100644
--- a/include/asm-arm/arch-lh7a40x/memory.h
+++ b/include/asm-arm/arch-lh7a40x/memory.h
@@ -17,7 +17,7 @@
17/* 17/*
18 * Physical DRAM offset. 18 * Physical DRAM offset.
19 */ 19 */
20#define PHYS_OFFSET (0xc0000000UL) 20#define PHYS_OFFSET UL(0xc0000000)
21 21
22/* 22/*
23 * Virtual view <-> DMA view memory address translations 23 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h
index ef32d61eec7a..bf545b6e0a26 100644
--- a/include/asm-arm/arch-omap/memory.h
+++ b/include/asm-arm/arch-omap/memory.h
@@ -37,9 +37,9 @@
37 * Physical DRAM offset. 37 * Physical DRAM offset.
38 */ 38 */
39#if defined(CONFIG_ARCH_OMAP1) 39#if defined(CONFIG_ARCH_OMAP1)
40#define PHYS_OFFSET (0x10000000UL) 40#define PHYS_OFFSET UL(0x10000000)
41#elif defined(CONFIG_ARCH_OMAP2) 41#elif defined(CONFIG_ARCH_OMAP2)
42#define PHYS_OFFSET (0x80000000UL) 42#define PHYS_OFFSET UL(0x80000000)
43#endif 43#endif
44 44
45/* 45/*
@@ -66,7 +66,7 @@
66/* 66/*
67 * OMAP-1510 Local Bus address offset 67 * OMAP-1510 Local Bus address offset
68 */ 68 */
69#define OMAP1510_LB_OFFSET (0x30000000UL) 69#define OMAP1510_LB_OFFSET UL(0x30000000)
70 70
71#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) 71#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
72#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) 72#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h
index 58bad9748b5c..eaf6d43939e9 100644
--- a/include/asm-arm/arch-pxa/memory.h
+++ b/include/asm-arm/arch-pxa/memory.h
@@ -15,7 +15,7 @@
15/* 15/*
16 * Physical DRAM offset. 16 * Physical DRAM offset.
17 */ 17 */
18#define PHYS_OFFSET (0xa0000000UL) 18#define PHYS_OFFSET UL(0xa0000000)
19 19
20/* 20/*
21 * Virtual view <-> DMA view memory address translations 21 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h
index 33fc75cdead0..0592cb3f0c74 100644
--- a/include/asm-arm/arch-rpc/memory.h
+++ b/include/asm-arm/arch-rpc/memory.h
@@ -21,7 +21,7 @@
21/* 21/*
22 * Physical DRAM offset. 22 * Physical DRAM offset.
23 */ 23 */
24#define PHYS_OFFSET (0x10000000UL) 24#define PHYS_OFFSET UL(0x10000000)
25 25
26/* 26/*
27 * These are exactly the same on the RiscPC as the 27 * These are exactly the same on the RiscPC as the
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h
index 3380ab1d0749..6ab834a14c8e 100644
--- a/include/asm-arm/arch-s3c2410/memory.h
+++ b/include/asm-arm/arch-s3c2410/memory.h
@@ -28,9 +28,9 @@
28 * and at 0x0C000000 for S3C2400 28 * and at 0x0C000000 for S3C2400
29 */ 29 */
30#ifdef CONFIG_CPU_S3C2400 30#ifdef CONFIG_CPU_S3C2400
31#define PHYS_OFFSET (0x0C000000UL) 31#define PHYS_OFFSET UL(0x0C000000)
32#else 32#else
33#define PHYS_OFFSET (0x30000000UL) 33#define PHYS_OFFSET UL(0x30000000)
34#endif 34#endif
35 35
36/* 36/*
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
index 8743ff5c1b23..0fc555b4c912 100644
--- a/include/asm-arm/arch-sa1100/memory.h
+++ b/include/asm-arm/arch-sa1100/memory.h
@@ -13,7 +13,7 @@
13/* 13/*
14 * Physical DRAM offset is 0xc0000000 on the SA1100 14 * Physical DRAM offset is 0xc0000000 on the SA1100
15 */ 15 */
16#define PHYS_OFFSET (0xc0000000UL) 16#define PHYS_OFFSET UL(0xc0000000)
17 17
18#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
19 19
diff --git a/include/asm-arm/arch-shark/memory.h b/include/asm-arm/arch-shark/memory.h
index 8ff956d25463..95a29b4bc5d0 100644
--- a/include/asm-arm/arch-shark/memory.h
+++ b/include/asm-arm/arch-shark/memory.h
@@ -15,7 +15,7 @@
15/* 15/*
16 * Physical DRAM offset. 16 * Physical DRAM offset.
17 */ 17 */
18#define PHYS_OFFSET (0x08000000UL) 18#define PHYS_OFFSET UL(0x08000000)
19 19
20#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
21 21
diff --git a/include/asm-arm/arch-versatile/memory.h b/include/asm-arm/arch-versatile/memory.h
index 7b8b7cc422fa..a9370976cc5e 100644
--- a/include/asm-arm/arch-versatile/memory.h
+++ b/include/asm-arm/arch-versatile/memory.h
@@ -23,7 +23,7 @@
23/* 23/*
24 * Physical DRAM offset. 24 * Physical DRAM offset.
25 */ 25 */
26#define PHYS_OFFSET (0x00000000UL) 26#define PHYS_OFFSET UL(0x00000000)
27 27
28/* 28/*
29 * Virtual view <-> DMA view memory address translations 29 * Virtual view <-> DMA view memory address translations
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
index 7273c6fd95b5..eb262e078c46 100644
--- a/include/asm-arm/mach/arch.h
+++ b/include/asm-arm/mach/arch.h
@@ -50,6 +50,7 @@ struct machine_desc {
50 */ 50 */
51#define MACHINE_START(_type,_name) \ 51#define MACHINE_START(_type,_name) \
52static const struct machine_desc __mach_desc_##_type \ 52static const struct machine_desc __mach_desc_##_type \
53 __attribute_used__ \
53 __attribute__((__section__(".arch.info.init"))) = { \ 54 __attribute__((__section__(".arch.info.init"))) = { \
54 .nr = MACH_TYPE_##_type, \ 55 .nr = MACH_TYPE_##_type, \
55 .name = _name, 56 .name = _name,
diff --git a/include/asm-arm/mach/flash.h b/include/asm-arm/mach/flash.h
index a92887d4b2cb..cd57436d9874 100644
--- a/include/asm-arm/mach/flash.h
+++ b/include/asm-arm/mach/flash.h
@@ -14,6 +14,7 @@ struct mtd_partition;
14 14
15/* 15/*
16 * map_name: the map probe function name 16 * map_name: the map probe function name
17 * name: flash device name (eg, as used with mtdparts=)
17 * width: width of mapped device 18 * width: width of mapped device
18 * init: method called at driver/device initialisation 19 * init: method called at driver/device initialisation
19 * exit: method called at driver/device removal 20 * exit: method called at driver/device removal
@@ -23,6 +24,7 @@ struct mtd_partition;
23 */ 24 */
24struct flash_platform_data { 25struct flash_platform_data {
25 const char *map_name; 26 const char *map_name;
27 const char *name;
26 unsigned int width; 28 unsigned int width;
27 int (*init)(void); 29 int (*init)(void);
28 void (*exit)(void); 30 void (*exit)(void);
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index 0619522bd926..b338936bde4f 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -27,8 +27,8 @@ struct meminfo;
27#define MT_ROM 6 27#define MT_ROM 6
28#define MT_IXP2000_DEVICE 7 28#define MT_IXP2000_DEVICE 7
29 29
30#define __phys_to_pfn(paddr) (paddr >> PAGE_SHIFT) 30#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
31#define __pfn_to_phys(pfn) (pfn << PAGE_SHIFT) 31#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
32 32
33extern void create_memmap_holes(struct meminfo *); 33extern void create_memmap_holes(struct meminfo *);
34extern void memtable_init(struct meminfo *); 34extern void memtable_init(struct meminfo *);
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index a8a933a775db..a547ee598c6c 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -12,6 +12,16 @@
12#ifndef __ASM_ARM_MEMORY_H 12#ifndef __ASM_ARM_MEMORY_H
13#define __ASM_ARM_MEMORY_H 13#define __ASM_ARM_MEMORY_H
14 14
15/*
16 * Allow for constants defined here to be used from assembly code
17 * by prepending the UL suffix only with actual C code compilation.
18 */
19#ifndef __ASSEMBLY__
20#define UL(x) (x##UL)
21#else
22#define UL(x) (x)
23#endif
24
15#include <linux/config.h> 25#include <linux/config.h>
16#include <linux/compiler.h> 26#include <linux/compiler.h>
17#include <asm/arch/memory.h> 27#include <asm/arch/memory.h>
@@ -21,20 +31,20 @@
21 * TASK_SIZE - the maximum size of a user space task. 31 * TASK_SIZE - the maximum size of a user space task.
22 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area 32 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
23 */ 33 */
24#define TASK_SIZE (0xbf000000UL) 34#define TASK_SIZE UL(0xbf000000)
25#define TASK_UNMAPPED_BASE (0x40000000UL) 35#define TASK_UNMAPPED_BASE UL(0x40000000)
26#endif 36#endif
27 37
28/* 38/*
29 * The maximum size of a 26-bit user space task. 39 * The maximum size of a 26-bit user space task.
30 */ 40 */
31#define TASK_SIZE_26 (0x04000000UL) 41#define TASK_SIZE_26 UL(0x04000000)
32 42
33/* 43/*
34 * Page offset: 3GB 44 * Page offset: 3GB
35 */ 45 */
36#ifndef PAGE_OFFSET 46#ifndef PAGE_OFFSET
37#define PAGE_OFFSET (0xc0000000UL) 47#define PAGE_OFFSET UL(0xc0000000)
38#endif 48#endif
39 49
40/* 50/*
@@ -58,6 +68,13 @@
58#error Top of user space clashes with start of module space 68#error Top of user space clashes with start of module space
59#endif 69#endif
60 70
71/*
72 * The XIP kernel gets mapped at the bottom of the module vm area.
73 * Since we use sections to map it, this macro replaces the physical address
74 * with its virtual address while keeping offset from the base section.
75 */
76#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff))
77
61#ifndef __ASSEMBLY__ 78#ifndef __ASSEMBLY__
62 79
63/* 80/*