diff options
Diffstat (limited to 'include/asm-arm')
90 files changed, 1460 insertions, 202 deletions
diff --git a/include/asm-arm/arch-aaec2000/aaec2000.h b/include/asm-arm/arch-aaec2000/aaec2000.h index 0e9b7e18af05..002227924b9f 100644 --- a/include/asm-arm/arch-aaec2000/aaec2000.h +++ b/include/asm-arm/arch-aaec2000/aaec2000.h | |||
@@ -17,6 +17,16 @@ | |||
17 | #error You must include hardware.h not this file | 17 | #error You must include hardware.h not this file |
18 | #endif /* __ASM_ARCH_HARDWARE_H */ | 18 | #endif /* __ASM_ARCH_HARDWARE_H */ |
19 | 19 | ||
20 | /* Chip selects */ | ||
21 | #define AAEC_CS0 0x00000000 | ||
22 | #define AAEC_CS1 0x10000000 | ||
23 | #define AAEC_CS2 0x20000000 | ||
24 | #define AAEC_CS3 0x30000000 | ||
25 | |||
26 | /* Flash */ | ||
27 | #define AAEC_FLASH_BASE AAEC_CS0 | ||
28 | #define AAEC_FLASH_SIZE SZ_64M | ||
29 | |||
20 | /* Interrupt controller */ | 30 | /* Interrupt controller */ |
21 | #define IRQ_BASE __REG(0x80000500) | 31 | #define IRQ_BASE __REG(0x80000500) |
22 | #define IRQ_INTSR __REG(0x80000500) /* Int Status Register */ | 32 | #define IRQ_INTSR __REG(0x80000500) /* Int Status Register */ |
@@ -148,4 +158,50 @@ | |||
148 | #define POWER_STFCLR __REG(0x8000041c) /* NbFlg, RSTFlg, PFFlg, CLDFlg Clear */ | 158 | #define POWER_STFCLR __REG(0x8000041c) /* NbFlg, RSTFlg, PFFlg, CLDFlg Clear */ |
149 | #define POWER_CLKSET __REG(0x80000420) /* Clock Speed Control */ | 159 | #define POWER_CLKSET __REG(0x80000420) /* Clock Speed Control */ |
150 | 160 | ||
161 | /* GPIO Registers */ | ||
162 | #define AAEC_GPIO_PHYS 0x80000e00 | ||
163 | |||
164 | #define AAEC_GPIO_PADR __REG(AAEC_GPIO_PHYS + 0x00) | ||
165 | #define AAEC_GPIO_PBDR __REG(AAEC_GPIO_PHYS + 0x04) | ||
166 | #define AAEC_GPIO_PCDR __REG(AAEC_GPIO_PHYS + 0x08) | ||
167 | #define AAEC_GPIO_PDDR __REG(AAEC_GPIO_PHYS + 0x0c) | ||
168 | #define AAEC_GPIO_PADDR __REG(AAEC_GPIO_PHYS + 0x10) | ||
169 | #define AAEC_GPIO_PBDDR __REG(AAEC_GPIO_PHYS + 0x14) | ||
170 | #define AAEC_GPIO_PCDDR __REG(AAEC_GPIO_PHYS + 0x18) | ||
171 | #define AAEC_GPIO_PDDDR __REG(AAEC_GPIO_PHYS + 0x1c) | ||
172 | #define AAEC_GPIO_PEDR __REG(AAEC_GPIO_PHYS + 0x20) | ||
173 | #define AAEC_GPIO_PEDDR __REG(AAEC_GPIO_PHYS + 0x24) | ||
174 | #define AAEC_GPIO_KSCAN __REG(AAEC_GPIO_PHYS + 0x28) | ||
175 | #define AAEC_GPIO_PINMUX __REG(AAEC_GPIO_PHYS + 0x2c) | ||
176 | #define AAEC_GPIO_PFDR __REG(AAEC_GPIO_PHYS + 0x30) | ||
177 | #define AAEC_GPIO_PFDDR __REG(AAEC_GPIO_PHYS + 0x34) | ||
178 | #define AAEC_GPIO_PGDR __REG(AAEC_GPIO_PHYS + 0x38) | ||
179 | #define AAEC_GPIO_PGDDR __REG(AAEC_GPIO_PHYS + 0x3c) | ||
180 | #define AAEC_GPIO_PHDR __REG(AAEC_GPIO_PHYS + 0x40) | ||
181 | #define AAEC_GPIO_PHDDR __REG(AAEC_GPIO_PHYS + 0x44) | ||
182 | #define AAEC_GPIO_RAZ __REG(AAEC_GPIO_PHYS + 0x48) | ||
183 | #define AAEC_GPIO_INTTYPE1 __REG(AAEC_GPIO_PHYS + 0x4c) | ||
184 | #define AAEC_GPIO_INTTYPE2 __REG(AAEC_GPIO_PHYS + 0x50) | ||
185 | #define AAEC_GPIO_FEOI __REG(AAEC_GPIO_PHYS + 0x54) | ||
186 | #define AAEC_GPIO_INTEN __REG(AAEC_GPIO_PHYS + 0x58) | ||
187 | #define AAEC_GPIO_INTSTATUS __REG(AAEC_GPIO_PHYS + 0x5c) | ||
188 | #define AAEC_GPIO_RAWINTSTATUS __REG(AAEC_GPIO_PHYS + 0x60) | ||
189 | #define AAEC_GPIO_DB __REG(AAEC_GPIO_PHYS + 0x64) | ||
190 | #define AAEC_GPIO_PAPINDR __REG(AAEC_GPIO_PHYS + 0x68) | ||
191 | #define AAEC_GPIO_PBPINDR __REG(AAEC_GPIO_PHYS + 0x6c) | ||
192 | #define AAEC_GPIO_PCPINDR __REG(AAEC_GPIO_PHYS + 0x70) | ||
193 | #define AAEC_GPIO_PDPINDR __REG(AAEC_GPIO_PHYS + 0x74) | ||
194 | #define AAEC_GPIO_PEPINDR __REG(AAEC_GPIO_PHYS + 0x78) | ||
195 | #define AAEC_GPIO_PFPINDR __REG(AAEC_GPIO_PHYS + 0x7c) | ||
196 | #define AAEC_GPIO_PGPINDR __REG(AAEC_GPIO_PHYS + 0x80) | ||
197 | #define AAEC_GPIO_PHPINDR __REG(AAEC_GPIO_PHYS + 0x84) | ||
198 | |||
199 | #define AAEC_GPIO_PINMUX_PE0CON (1 << 0) | ||
200 | #define AAEC_GPIO_PINMUX_PD0CON (1 << 1) | ||
201 | #define AAEC_GPIO_PINMUX_CODECON (1 << 2) | ||
202 | #define AAEC_GPIO_PINMUX_UART3CON (1 << 3) | ||
203 | |||
204 | /* LCD Controller */ | ||
205 | #define AAEC_CLCD_PHYS 0x80003000 | ||
206 | |||
151 | #endif /* __ARM_ARCH_AAEC2000_H */ | 207 | #endif /* __ARM_ARCH_AAEC2000_H */ |
diff --git a/include/asm-arm/arch-aaec2000/aaed2000.h b/include/asm-arm/arch-aaec2000/aaed2000.h new file mode 100644 index 000000000000..bc76d2badb91 --- /dev/null +++ b/include/asm-arm/arch-aaec2000/aaed2000.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-aaec2000/aaed2000.h | ||
3 | * | ||
4 | * AAED-2000 specific bits definition | ||
5 | * | ||
6 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_AAED2000_H | ||
14 | #define __ASM_ARCH_AAED2000_H | ||
15 | |||
16 | /* External GPIOs. */ | ||
17 | |||
18 | #define EXT_GPIO_PBASE AAEC_CS3 | ||
19 | #define EXT_GPIO_VBASE 0xf8100000 | ||
20 | #define EXT_GPIO_LENGTH 0x00001000 | ||
21 | |||
22 | #define __ext_gpio_p2v(x) ((x) - EXT_GPIO_PBASE + EXT_GPIO_VBASE) | ||
23 | #define __ext_gpio_v2p(x) ((x) + EXT_GPIO_PBASE - EXT_GPIO_VBASE) | ||
24 | |||
25 | #define __EXT_GPIO_REG(x) (*((volatile u32 *)__ext_gpio_p2v(x))) | ||
26 | #define __EXT_GPIO_PREG(x) (__ext_gpio_v2p((u32)&(x))) | ||
27 | |||
28 | #define AAED_EXT_GPIO __EXT_GPIO_REG(EXT_GPIO_PBASE) | ||
29 | |||
30 | #define AAED_EGPIO_KBD_SCAN 0x00003fff /* Keyboard scan data */ | ||
31 | #define AAED_EGPIO_PWR_INT 0x00008fff /* Smart battery charger interrupt */ | ||
32 | #define AAED_EGPIO_SWITCHED 0x000f0000 /* DIP Switches */ | ||
33 | #define AAED_EGPIO_USB_VBUS 0x00400000 /* USB Vbus sense */ | ||
34 | #define AAED_EGPIO_LCD_PWR_EN 0x02000000 /* LCD and backlight PWR enable */ | ||
35 | #define AAED_EGPIO_nLED0 0x20000000 /* LED 0 */ | ||
36 | #define AAED_EGPIO_nLED1 0x20000000 /* LED 1 */ | ||
37 | #define AAED_EGPIO_nLED2 0x20000000 /* LED 2 */ | ||
38 | |||
39 | |||
40 | #endif /* __ARM_ARCH_AAED2000_H */ | ||
diff --git a/include/asm-arm/arch-aaec2000/hardware.h b/include/asm-arm/arch-aaec2000/hardware.h index 4c37219e030e..153506fd06ed 100644 --- a/include/asm-arm/arch-aaec2000/hardware.h +++ b/include/asm-arm/arch-aaec2000/hardware.h | |||
@@ -11,7 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_HARDWARE_H | 11 | #ifndef __ASM_ARCH_HARDWARE_H |
12 | #define __ASM_ARCH_HARDWARE_H | 12 | #define __ASM_ARCH_HARDWARE_H |
13 | 13 | ||
14 | #include <linux/config.h> | 14 | #include <asm/sizes.h> |
15 | #include <asm/arch/aaec2000.h> | ||
15 | 16 | ||
16 | /* The kernel is loaded at physical address 0xf8000000. | 17 | /* The kernel is loaded at physical address 0xf8000000. |
17 | * We map the IO space a bit after | 18 | * We map the IO space a bit after |
diff --git a/include/asm-arm/arch-aaec2000/io.h b/include/asm-arm/arch-aaec2000/io.h index c58a8d10425a..8d67907fd4f0 100644 --- a/include/asm-arm/arch-aaec2000/io.h +++ b/include/asm-arm/arch-aaec2000/io.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __ASM_ARM_ARCH_IO_H | 6 | #ifndef __ASM_ARM_ARCH_IO_H |
7 | #define __ASM_ARM_ARCH_IO_H | 7 | #define __ASM_ARM_ARCH_IO_H |
8 | 8 | ||
9 | #include <asm/hardware.h> | ||
10 | |||
9 | #define IO_SPACE_LIMIT 0xffffffff | 11 | #define IO_SPACE_LIMIT 0xffffffff |
10 | 12 | ||
11 | /* | 13 | /* |
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/io.h b/include/asm-arm/arch-cl7500/io.h index f0113bc75630..89a33287f4fe 100644 --- a/include/asm-arm/arch-cl7500/io.h +++ b/include/asm-arm/arch-cl7500/io.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #include <asm/hardware.h> | ||
14 | |||
13 | #define IO_SPACE_LIMIT 0xffffffff | 15 | #define IO_SPACE_LIMIT 0xffffffff |
14 | 16 | ||
15 | /* | 17 | /* |
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/io.h b/include/asm-arm/arch-clps711x/io.h index 14d7e8da5453..62613b0e2d96 100644 --- a/include/asm-arm/arch-clps711x/io.h +++ b/include/asm-arm/arch-clps711x/io.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #include <asm/hardware.h> | ||
24 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | 25 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 26 | ||
25 | #define __io(a) ((void __iomem *)(a)) | 27 | #define __io(a) ((void __iomem *)(a)) |
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/io.h b/include/asm-arm/arch-ebsa285/io.h index 70576b17f922..776f9d377057 100644 --- a/include/asm-arm/arch-ebsa285/io.h +++ b/include/asm-arm/arch-ebsa285/io.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef __ASM_ARM_ARCH_IO_H | 14 | #ifndef __ASM_ARM_ARCH_IO_H |
15 | #define __ASM_ARM_ARCH_IO_H | 15 | #define __ASM_ARM_ARCH_IO_H |
16 | 16 | ||
17 | #include <asm/hardware.h> | ||
18 | |||
17 | #define IO_SPACE_LIMIT 0xffff | 19 | #define IO_SPACE_LIMIT 0xffff |
18 | 20 | ||
19 | /* | 21 | /* |
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/io.h b/include/asm-arm/arch-epxa10db/io.h index 1f0afa257621..9fe100c9d6be 100644 --- a/include/asm-arm/arch-epxa10db/io.h +++ b/include/asm-arm/arch-epxa10db/io.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #include <asm/hardware.h> | ||
24 | |||
23 | #define IO_SPACE_LIMIT 0xffff | 25 | #define IO_SPACE_LIMIT 0xffff |
24 | 26 | ||
25 | 27 | ||
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/io.h b/include/asm-arm/arch-h720x/io.h index 68814828c9a7..d3ccfd8172b7 100644 --- a/include/asm-arm/arch-h720x/io.h +++ b/include/asm-arm/arch-h720x/io.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __ASM_ARM_ARCH_IO_H | 14 | #ifndef __ASM_ARM_ARCH_IO_H |
15 | #define __ASM_ARM_ARCH_IO_H | 15 | #define __ASM_ARM_ARCH_IO_H |
16 | 16 | ||
17 | #include <asm/arch/hardware.h> | 17 | #include <asm/hardware.h> |
18 | 18 | ||
19 | #define IO_SPACE_LIMIT 0xffffffff | 19 | #define IO_SPACE_LIMIT 0xffffffff |
20 | 20 | ||
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/io.h b/include/asm-arm/arch-imx/io.h index 28a4cca6a4cb..b191cdd05576 100644 --- a/include/asm-arm/arch-imx/io.h +++ b/include/asm-arm/arch-imx/io.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #include <asm/hardware.h> | ||
24 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | 25 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 26 | ||
25 | #define __io(a) ((void __iomem *)(a)) | 27 | #define __io(a) ((void __iomem *)(a)) |
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/hardware.h b/include/asm-arm/arch-integrator/hardware.h index be2716eeaa02..6f0947bc500d 100644 --- a/include/asm-arm/arch-integrator/hardware.h +++ b/include/asm-arm/arch-integrator/hardware.h | |||
@@ -33,15 +33,6 @@ | |||
33 | #define IO_SIZE 0x0B000000 // How much? | 33 | #define IO_SIZE 0x0B000000 // How much? |
34 | #define IO_START INTEGRATOR_HDR_BASE // PA of IO | 34 | #define IO_START INTEGRATOR_HDR_BASE // PA of IO |
35 | 35 | ||
36 | /* | ||
37 | * Similar to above, but for PCI addresses (memory, IO, Config and the | ||
38 | * V3 chip itself). WARNING: this has to mirror definitions in platform.h | ||
39 | */ | ||
40 | #define PCI_MEMORY_VADDR 0xe8000000 | ||
41 | #define PCI_CONFIG_VADDR 0xec000000 | ||
42 | #define PCI_V3_VADDR 0xed000000 | ||
43 | #define PCI_IO_VADDR 0xee000000 | ||
44 | |||
45 | #define PCIO_BASE PCI_IO_VADDR | 36 | #define PCIO_BASE PCI_IO_VADDR |
46 | #define PCIMEM_BASE PCI_MEMORY_VADDR | 37 | #define PCIMEM_BASE PCI_MEMORY_VADDR |
47 | 38 | ||
diff --git a/include/asm-arm/arch-integrator/io.h b/include/asm-arm/arch-integrator/io.h index fbea8be67d26..31f2deab51b0 100644 --- a/include/asm-arm/arch-integrator/io.h +++ b/include/asm-arm/arch-integrator/io.h | |||
@@ -22,6 +22,14 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffff | 23 | #define IO_SPACE_LIMIT 0xffff |
24 | 24 | ||
25 | /* | ||
26 | * WARNING: this has to mirror definitions in platform.h | ||
27 | */ | ||
28 | #define PCI_MEMORY_VADDR 0xe8000000 | ||
29 | #define PCI_CONFIG_VADDR 0xec000000 | ||
30 | #define PCI_V3_VADDR 0xed000000 | ||
31 | #define PCI_IO_VADDR 0xee000000 | ||
32 | |||
25 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) | 33 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) |
26 | #define __mem_pci(a) (a) | 34 | #define __mem_pci(a) (a) |
27 | #define __mem_isa(a) ((a) + PCI_MEMORY_VADDR) | 35 | #define __mem_isa(a) ((a) + PCI_MEMORY_VADDR) |
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/io.h b/include/asm-arm/arch-iop3xx/io.h index 2761dfd8694d..f39046a6ab14 100644 --- a/include/asm-arm/arch-iop3xx/io.h +++ b/include/asm-arm/arch-iop3xx/io.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARM_ARCH_IO_H | 11 | #ifndef __ASM_ARM_ARCH_IO_H |
12 | #define __ASM_ARM_ARCH_IO_H | 12 | #define __ASM_ARM_ARCH_IO_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | ||
15 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
15 | 17 | ||
16 | #define __io(p) ((void __iomem *)(p)) | 18 | #define __io(p) ((void __iomem *)(p)) |
diff --git a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop3xx/iop321.h index 200621ff3690..f8df778a356f 100644 --- a/include/asm-arm/arch-iop3xx/iop321.h +++ b/include/asm-arm/arch-iop3xx/iop321.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define IOP321_PCI_UPPER_IO_BA (IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_WINDOW_SIZE - 1) | 40 | #define IOP321_PCI_UPPER_IO_BA (IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_WINDOW_SIZE - 1) |
41 | #define IOP321_PCI_IO_OFFSET (IOP321_PCI_LOWER_IO_VA - IOP321_PCI_LOWER_IO_BA) | 41 | #define IOP321_PCI_IO_OFFSET (IOP321_PCI_LOWER_IO_VA - IOP321_PCI_LOWER_IO_BA) |
42 | 42 | ||
43 | //#define IOP321_PCI_MEM_WINDOW_SIZE (~*IOP321_IALR1 + 1) | 43 | /* #define IOP321_PCI_MEM_WINDOW_SIZE (~*IOP321_IALR1 + 1) */ |
44 | #define IOP321_PCI_MEM_WINDOW_SIZE 0x04000000 /* 64M outbound window */ | 44 | #define IOP321_PCI_MEM_WINDOW_SIZE 0x04000000 /* 64M outbound window */ |
45 | #define IOP321_PCI_LOWER_MEM_PA 0x80000000 | 45 | #define IOP321_PCI_LOWER_MEM_PA 0x80000000 |
46 | #define IOP321_PCI_LOWER_MEM_BA (*IOP321_OMWTVR0) | 46 | #define IOP321_PCI_LOWER_MEM_BA (*IOP321_OMWTVR0) |
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/enp2611.h b/include/asm-arm/arch-ixp2000/enp2611.h index 31ae88674968..95128d9f5026 100644 --- a/include/asm-arm/arch-ixp2000/enp2611.h +++ b/include/asm-arm/arch-ixp2000/enp2611.h | |||
@@ -21,8 +21,20 @@ | |||
21 | #ifndef __ENP2611_H | 21 | #ifndef __ENP2611_H |
22 | #define __ENP2611_H | 22 | #define __ENP2611_H |
23 | 23 | ||
24 | #define ENP2611_GPIO_SCL 0x07 | 24 | #define ENP2611_CALEB_PHYS_BASE 0xc5000000 |
25 | #define ENP2611_GPIO_SDA 0x06 | 25 | #define ENP2611_CALEB_VIRT_BASE 0xfe000000 |
26 | #define ENP2611_CALEB_SIZE 0x00100000 | ||
27 | |||
28 | #define ENP2611_PM3386_0_PHYS_BASE 0xc6000000 | ||
29 | #define ENP2611_PM3386_0_VIRT_BASE 0xfe100000 | ||
30 | #define ENP2611_PM3386_0_SIZE 0x00100000 | ||
31 | |||
32 | #define ENP2611_PM3386_1_PHYS_BASE 0xc6400000 | ||
33 | #define ENP2611_PM3386_1_VIRT_BASE 0xfe200000 | ||
34 | #define ENP2611_PM3386_1_SIZE 0x00100000 | ||
35 | |||
36 | #define ENP2611_GPIO_SCL 7 | ||
37 | #define ENP2611_GPIO_SDA 6 | ||
26 | 38 | ||
27 | 39 | ||
28 | #endif | 40 | #endif |
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h index 3241cd6f0778..7fbcdf9931ee 100644 --- a/include/asm-arm/arch-ixp2000/io.h +++ b/include/asm-arm/arch-ixp2000/io.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 15 | #ifndef __ASM_ARM_ARCH_IO_H |
16 | #define __ASM_ARM_ARCH_IO_H | 16 | #define __ASM_ARM_ARCH_IO_H |
17 | 17 | ||
18 | #include <asm/hardware.h> | ||
19 | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | 20 | #define IO_SPACE_LIMIT 0xffffffff |
19 | #define __mem_pci(a) (a) | 21 | #define __mem_pci(a) (a) |
20 | 22 | ||
diff --git a/include/asm-arm/arch-ixp2000/irqs.h b/include/asm-arm/arch-ixp2000/irqs.h index 0deb96c12adb..62f09c7ff420 100644 --- a/include/asm-arm/arch-ixp2000/irqs.h +++ b/include/asm-arm/arch-ixp2000/irqs.h | |||
@@ -67,12 +67,45 @@ | |||
67 | #define IRQ_IXP2000_PCIA 40 | 67 | #define IRQ_IXP2000_PCIA 40 |
68 | #define IRQ_IXP2000_PCIB 41 | 68 | #define IRQ_IXP2000_PCIB 41 |
69 | 69 | ||
70 | #define NR_IXP2000_IRQS 42 | 70 | /* Int sources from IRQ_ERROR_STATUS */ |
71 | #define IRQ_IXP2000_DRAM0_MIN_ERR 42 | ||
72 | #define IRQ_IXP2000_DRAM0_MAJ_ERR 43 | ||
73 | #define IRQ_IXP2000_DRAM1_MIN_ERR 44 | ||
74 | #define IRQ_IXP2000_DRAM1_MAJ_ERR 45 | ||
75 | #define IRQ_IXP2000_DRAM2_MIN_ERR 46 | ||
76 | #define IRQ_IXP2000_DRAM2_MAJ_ERR 47 | ||
77 | /* 48-57 reserved */ | ||
78 | #define IRQ_IXP2000_SRAM0_ERR 58 | ||
79 | #define IRQ_IXP2000_SRAM1_ERR 59 | ||
80 | #define IRQ_IXP2000_SRAM2_ERR 60 | ||
81 | #define IRQ_IXP2000_SRAM3_ERR 61 | ||
82 | /* 62-65 reserved */ | ||
83 | #define IRQ_IXP2000_MEDIA_ERR 66 | ||
84 | #define IRQ_IXP2000_PCI_ERR 67 | ||
85 | #define IRQ_IXP2000_SP_INT 68 | ||
86 | |||
87 | #define NR_IXP2000_IRQS 69 | ||
71 | 88 | ||
72 | #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) | 89 | #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) |
73 | 90 | ||
74 | #define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS)) | 91 | #define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS)) |
75 | 92 | ||
93 | #define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) | ||
94 | #define IXP2000_VALID_ERR_IRQ_MASK (\ | ||
95 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \ | ||
96 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \ | ||
97 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \ | ||
98 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \ | ||
99 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \ | ||
100 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \ | ||
101 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \ | ||
102 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \ | ||
103 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \ | ||
104 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \ | ||
105 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \ | ||
106 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \ | ||
107 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) ) | ||
108 | |||
76 | /* | 109 | /* |
77 | * This allows for all the on-chip sources plus up to 32 CPLD based | 110 | * This allows for all the on-chip sources plus up to 32 CPLD based |
78 | * IRQs. Should be more than enough. | 111 | * IRQs. Should be more than enough. |
diff --git a/include/asm-arm/arch-ixp2000/ixdp2x01.h b/include/asm-arm/arch-ixp2000/ixdp2x01.h index b768009c3a51..c6d51426e98f 100644 --- a/include/asm-arm/arch-ixp2000/ixdp2x01.h +++ b/include/asm-arm/arch-ixp2000/ixdp2x01.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define IXDP2X01_CPLD_REGION_SIZE 0x00100000 | 22 | #define IXDP2X01_CPLD_REGION_SIZE 0x00100000 |
23 | 23 | ||
24 | #define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg) | 24 | #define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg) |
25 | #define IXDP2X01_CPLD_PHYS_REG(reg) (volatile u32*)(IXDP2X01_PHYS_CPLD_BASE | reg) | 25 | #define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg) |
26 | 26 | ||
27 | #define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40) | 27 | #define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40) |
28 | #define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40) | 28 | #define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40) |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index 32aece069869..fc5ac6aec4f2 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
@@ -59,14 +59,15 @@ | |||
59 | #define IXP2000_CAP_SIZE 0x00100000 | 59 | #define IXP2000_CAP_SIZE 0x00100000 |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Addresses for specific on-chip peripherals | 62 | * Addresses for specific on-chip peripherals. |
63 | */ | 63 | */ |
64 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 | 64 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 |
65 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 | 65 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 |
66 | #define IXP2000_UART_PHYS_BASE 0xc0030000 | 66 | #define IXP2000_UART_PHYS_BASE 0xc0030000 |
67 | #define IXP2000_UART_VIRT_BASE 0xfef30000 | 67 | #define IXP2000_UART_VIRT_BASE 0xfef30000 |
68 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 | 68 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 |
69 | #define IXP2000_GPIO_VIRT_BASE 0Xfef10000 | 69 | #define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000 |
70 | #define IXP2000_GPIO_VIRT_BASE 0xfef10000 | ||
70 | 71 | ||
71 | /* | 72 | /* |
72 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual | 73 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual |
@@ -252,7 +253,7 @@ | |||
252 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) | 253 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) |
253 | 254 | ||
254 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ | 255 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ |
255 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Centrolfunction bit */ | 256 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */ |
256 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ | 257 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ |
257 | 258 | ||
258 | /* These are from the IRQ register in the PCI ISR register */ | 259 | /* These are from the IRQ register in the PCI ISR register */ |
@@ -392,4 +393,47 @@ | |||
392 | #define WDT_RESET_ENABLE 0x01000000 | 393 | #define WDT_RESET_ENABLE 0x01000000 |
393 | 394 | ||
394 | 395 | ||
396 | /* | ||
397 | * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF | ||
398 | * units, but the registers that differ between the two don't overlap, | ||
399 | * so we can have one register list for both. | ||
400 | */ | ||
401 | #define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x))) | ||
402 | #define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000) | ||
403 | #define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004) | ||
404 | #define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008) | ||
405 | #define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c) | ||
406 | #define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010) | ||
407 | #define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014) | ||
408 | #define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018) | ||
409 | #define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024) | ||
410 | #define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028) | ||
411 | #define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c) | ||
412 | #define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040) | ||
413 | #define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044) | ||
414 | #define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048) | ||
415 | #define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048) | ||
416 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050) | ||
417 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054) | ||
418 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058) | ||
419 | #define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060) | ||
420 | #define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064) | ||
421 | #define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068) | ||
422 | #define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070) | ||
423 | #define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070) | ||
424 | #define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080) | ||
425 | #define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084) | ||
426 | #define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088) | ||
427 | #define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c) | ||
428 | #define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090) | ||
429 | #define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094) | ||
430 | #define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098) | ||
431 | #define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c) | ||
432 | #define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0) | ||
433 | #define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4) | ||
434 | #define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8) | ||
435 | #define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000) | ||
436 | #define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400) | ||
437 | |||
438 | |||
395 | #endif /* _IXP2000_H_ */ | 439 | #endif /* _IXP2000_H_ */ |
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 | ||
18 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
19 | { | ||
20 | return *((volatile unsigned long *)reg); | ||
21 | } | ||
22 | |||
23 | static 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) | 43 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) |
31 | |||
32 | #include <asm/system.h> /* Pickup local_irq_ functions */ | ||
33 | |||
34 | static 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 | ||
46 | static 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-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index 4f489cc0dfa5..ddbbb34b5f95 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h | |||
@@ -26,29 +26,24 @@ static inline void arch_reset(char mode) | |||
26 | * RedBoot bank. | 26 | * RedBoot bank. |
27 | */ | 27 | */ |
28 | if (machine_is_ixdp2401()) { | 28 | if (machine_is_ixdp2401()) { |
29 | *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | 29 | ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, |
30 | | IXDP2X01_CPLD_FLASH_INTERN); | 30 | ((0 >> IXDP2X01_FLASH_WINDOW_BITS) |
31 | *IXDP2X01_CPLD_RESET_REG = 0xffffffff; | 31 | | IXDP2X01_CPLD_FLASH_INTERN)); |
32 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff); | ||
32 | } | 33 | } |
33 | 34 | ||
34 | /* | 35 | /* |
35 | * On IXDP2801 we need to write this magic sequence to the CPLD | 36 | * On IXDP2801 we need to write this magic sequence to the CPLD |
36 | * to cause a complete reset of the CPU and all external devices | 37 | * to cause a complete reset of the CPU and all external devices |
37 | * and moves the flash bank register back to 0. | 38 | * and move the flash bank register back to 0. |
38 | */ | 39 | */ |
39 | if (machine_is_ixdp2801()) { | 40 | if (machine_is_ixdp2801()) { |
40 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | 41 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; |
42 | |||
41 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | 43 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); |
42 | *IXDP2X01_CPLD_RESET_REG = reset_reg; | 44 | ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg); |
43 | mb(); | 45 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000); |
44 | *IXDP2X01_CPLD_RESET_REG = 0x80000000; | ||
45 | } | 46 | } |
46 | 47 | ||
47 | /* | 48 | ixp2000_reg_wrb(IXP2000_RESET0, RSTALL); |
48 | * We do a reset all if we are PCI master. We could be a slave and we | ||
49 | * don't want to do anything funky on the PCI bus. | ||
50 | */ | ||
51 | if (*IXP2000_STRAP_OPTIONS & CFG_PCI_BOOT_HOST) { | ||
52 | *(IXP2000_RESET0) |= (RSTALL); | ||
53 | } | ||
54 | } | 49 | } |
diff --git a/include/asm-arm/arch-ixp2000/uengine.h b/include/asm-arm/arch-ixp2000/uengine.h new file mode 100644 index 000000000000..b442d65c6593 --- /dev/null +++ b/include/asm-arm/arch-ixp2000/uengine.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Generic library functions for the microengines found on the Intel | ||
3 | * IXP2000 series of network processors. | ||
4 | * | ||
5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * Dedicated to Marija Kulikova. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU Lesser General Public License as | ||
10 | * published by the Free Software Foundation; either version 2.1 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef __IXP2000_UENGINE_H | ||
15 | #define __IXP2000_UENGINE_H | ||
16 | |||
17 | extern u32 ixp2000_uengine_mask; | ||
18 | |||
19 | struct ixp2000_uengine_code | ||
20 | { | ||
21 | u32 cpu_model_bitmask; | ||
22 | u8 cpu_min_revision; | ||
23 | u8 cpu_max_revision; | ||
24 | |||
25 | u32 uengine_parameters; | ||
26 | |||
27 | struct ixp2000_reg_value { | ||
28 | int reg; | ||
29 | u32 value; | ||
30 | } *initial_reg_values; | ||
31 | |||
32 | int num_insns; | ||
33 | u8 *insns; | ||
34 | }; | ||
35 | |||
36 | u32 ixp2000_uengine_csr_read(int uengine, int offset); | ||
37 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value); | ||
38 | void ixp2000_uengine_reset(u32 uengine_mask); | ||
39 | void ixp2000_uengine_set_mode(int uengine, u32 mode); | ||
40 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns); | ||
41 | void ixp2000_uengine_init_context(int uengine, int context, int pc); | ||
42 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask); | ||
43 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask); | ||
44 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c); | ||
45 | |||
46 | #define IXP2000_UENGINE_8_CONTEXTS 0x00000000 | ||
47 | #define IXP2000_UENGINE_4_CONTEXTS 0x80000000 | ||
48 | #define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000 | ||
49 | #define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000 | ||
50 | #define IXP2000_UENGINE_NN_FROM_SELF 0x00100000 | ||
51 | #define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000 | ||
52 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000 | ||
53 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000 | ||
54 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000 | ||
55 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000 | ||
56 | #define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000 | ||
57 | #define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000 | ||
58 | #define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000 | ||
59 | #define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000 | ||
60 | |||
61 | |||
62 | #endif | ||
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index e350dcb544e8..688f7f90d93e 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -80,9 +80,9 @@ __ixp4xx_iounmap(void __iomem *addr) | |||
80 | #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x) | 80 | #define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x) |
81 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) | 81 | #define __arch_iounmap(a) __ixp4xx_iounmap(a) |
82 | 82 | ||
83 | #define writeb(p, v) __ixp4xx_writeb(p, v) | 83 | #define writeb(v, p) __ixp4xx_writeb(v, p) |
84 | #define writew(p, v) __ixp4xx_writew(p, v) | 84 | #define writew(v, p) __ixp4xx_writew(v, p) |
85 | #define writel(p, v) __ixp4xx_writel(p, v) | 85 | #define writel(v, p) __ixp4xx_writel(v, p) |
86 | 86 | ||
87 | #define writesb(p, v, l) __ixp4xx_writesb(p, v, l) | 87 | #define writesb(p, v, l) __ixp4xx_writesb(p, v, l) |
88 | #define writesw(p, v, l) __ixp4xx_writesw(p, v, l) | 88 | #define writesw(p, v, l) __ixp4xx_writesw(p, v, l) |
@@ -97,8 +97,9 @@ __ixp4xx_iounmap(void __iomem *addr) | |||
97 | #define readsl(p, v, l) __ixp4xx_readsl(p, v, l) | 97 | #define readsl(p, v, l) __ixp4xx_readsl(p, v, l) |
98 | 98 | ||
99 | static inline void | 99 | static inline void |
100 | __ixp4xx_writeb(u8 value, u32 addr) | 100 | __ixp4xx_writeb(u8 value, volatile void __iomem *p) |
101 | { | 101 | { |
102 | u32 addr = (u32)p; | ||
102 | u32 n, byte_enables, data; | 103 | u32 n, byte_enables, data; |
103 | 104 | ||
104 | if (addr >= VMALLOC_START) { | 105 | if (addr >= VMALLOC_START) { |
@@ -113,15 +114,16 @@ __ixp4xx_writeb(u8 value, u32 addr) | |||
113 | } | 114 | } |
114 | 115 | ||
115 | static inline void | 116 | static inline void |
116 | __ixp4xx_writesb(u32 bus_addr, u8 *vaddr, int count) | 117 | __ixp4xx_writesb(volatile void __iomem *bus_addr, const u8 *vaddr, int count) |
117 | { | 118 | { |
118 | while (count--) | 119 | while (count--) |
119 | writeb(*vaddr++, bus_addr); | 120 | writeb(*vaddr++, bus_addr); |
120 | } | 121 | } |
121 | 122 | ||
122 | static inline void | 123 | static inline void |
123 | __ixp4xx_writew(u16 value, u32 addr) | 124 | __ixp4xx_writew(u16 value, volatile void __iomem *p) |
124 | { | 125 | { |
126 | u32 addr = (u32)p; | ||
125 | u32 n, byte_enables, data; | 127 | u32 n, byte_enables, data; |
126 | 128 | ||
127 | if (addr >= VMALLOC_START) { | 129 | if (addr >= VMALLOC_START) { |
@@ -136,15 +138,16 @@ __ixp4xx_writew(u16 value, u32 addr) | |||
136 | } | 138 | } |
137 | 139 | ||
138 | static inline void | 140 | static inline void |
139 | __ixp4xx_writesw(u32 bus_addr, u16 *vaddr, int count) | 141 | __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) |
140 | { | 142 | { |
141 | while (count--) | 143 | while (count--) |
142 | writew(*vaddr++, bus_addr); | 144 | writew(*vaddr++, bus_addr); |
143 | } | 145 | } |
144 | 146 | ||
145 | static inline void | 147 | static inline void |
146 | __ixp4xx_writel(u32 value, u32 addr) | 148 | __ixp4xx_writel(u32 value, volatile void __iomem *p) |
147 | { | 149 | { |
150 | u32 addr = (u32)p; | ||
148 | if (addr >= VMALLOC_START) { | 151 | if (addr >= VMALLOC_START) { |
149 | __raw_writel(value, addr); | 152 | __raw_writel(value, addr); |
150 | return; | 153 | return; |
@@ -154,15 +157,16 @@ __ixp4xx_writel(u32 value, u32 addr) | |||
154 | } | 157 | } |
155 | 158 | ||
156 | static inline void | 159 | static inline void |
157 | __ixp4xx_writesl(u32 bus_addr, u32 *vaddr, int count) | 160 | __ixp4xx_writesl(volatile void __iomem *bus_addr, const u32 *vaddr, int count) |
158 | { | 161 | { |
159 | while (count--) | 162 | while (count--) |
160 | writel(*vaddr++, bus_addr); | 163 | writel(*vaddr++, bus_addr); |
161 | } | 164 | } |
162 | 165 | ||
163 | static inline unsigned char | 166 | static inline unsigned char |
164 | __ixp4xx_readb(u32 addr) | 167 | __ixp4xx_readb(const volatile void __iomem *p) |
165 | { | 168 | { |
169 | u32 addr = (u32)p; | ||
166 | u32 n, byte_enables, data; | 170 | u32 n, byte_enables, data; |
167 | 171 | ||
168 | if (addr >= VMALLOC_START) | 172 | if (addr >= VMALLOC_START) |
@@ -177,15 +181,16 @@ __ixp4xx_readb(u32 addr) | |||
177 | } | 181 | } |
178 | 182 | ||
179 | static inline void | 183 | static inline void |
180 | __ixp4xx_readsb(u32 bus_addr, u8 *vaddr, u32 count) | 184 | __ixp4xx_readsb(const volatile void __iomem *bus_addr, u8 *vaddr, u32 count) |
181 | { | 185 | { |
182 | while (count--) | 186 | while (count--) |
183 | *vaddr++ = readb(bus_addr); | 187 | *vaddr++ = readb(bus_addr); |
184 | } | 188 | } |
185 | 189 | ||
186 | static inline unsigned short | 190 | static inline unsigned short |
187 | __ixp4xx_readw(u32 addr) | 191 | __ixp4xx_readw(const volatile void __iomem *p) |
188 | { | 192 | { |
193 | u32 addr = (u32)p; | ||
189 | u32 n, byte_enables, data; | 194 | u32 n, byte_enables, data; |
190 | 195 | ||
191 | if (addr >= VMALLOC_START) | 196 | if (addr >= VMALLOC_START) |
@@ -200,15 +205,16 @@ __ixp4xx_readw(u32 addr) | |||
200 | } | 205 | } |
201 | 206 | ||
202 | static inline void | 207 | static inline void |
203 | __ixp4xx_readsw(u32 bus_addr, u16 *vaddr, u32 count) | 208 | __ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) |
204 | { | 209 | { |
205 | while (count--) | 210 | while (count--) |
206 | *vaddr++ = readw(bus_addr); | 211 | *vaddr++ = readw(bus_addr); |
207 | } | 212 | } |
208 | 213 | ||
209 | static inline unsigned long | 214 | static inline unsigned long |
210 | __ixp4xx_readl(u32 addr) | 215 | __ixp4xx_readl(const volatile void __iomem *p) |
211 | { | 216 | { |
217 | u32 addr = (u32)p; | ||
212 | u32 data; | 218 | u32 data; |
213 | 219 | ||
214 | if (addr >= VMALLOC_START) | 220 | if (addr >= VMALLOC_START) |
@@ -221,7 +227,7 @@ __ixp4xx_readl(u32 addr) | |||
221 | } | 227 | } |
222 | 228 | ||
223 | static inline void | 229 | static inline void |
224 | __ixp4xx_readsl(u32 bus_addr, u32 *vaddr, u32 count) | 230 | __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) |
225 | { | 231 | { |
226 | while (count--) | 232 | while (count--) |
227 | *vaddr++ = readl(bus_addr); | 233 | *vaddr++ = readl(bus_addr); |
@@ -239,7 +245,7 @@ __ixp4xx_readsl(u32 bus_addr, u32 *vaddr, u32 count) | |||
239 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | 245 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) |
240 | 246 | ||
241 | static inline int | 247 | static inline int |
242 | check_signature(unsigned long bus_addr, const unsigned char *signature, | 248 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, |
243 | int length) | 249 | int length) |
244 | { | 250 | { |
245 | int retval = 0; | 251 | int retval = 0; |
@@ -389,7 +395,7 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) | |||
389 | #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ | 395 | #define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ |
390 | ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) | 396 | ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) |
391 | static inline unsigned int | 397 | static inline unsigned int |
392 | __ixp4xx_ioread8(void __iomem *addr) | 398 | __ixp4xx_ioread8(const void __iomem *addr) |
393 | { | 399 | { |
394 | unsigned long port = (unsigned long __force)addr; | 400 | unsigned long port = (unsigned long __force)addr; |
395 | if (__is_io_address(port)) | 401 | if (__is_io_address(port)) |
@@ -398,12 +404,12 @@ __ixp4xx_ioread8(void __iomem *addr) | |||
398 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 404 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
399 | return (unsigned int)__raw_readb(port); | 405 | return (unsigned int)__raw_readb(port); |
400 | #else | 406 | #else |
401 | return (unsigned int)__ixp4xx_readb(port); | 407 | return (unsigned int)__ixp4xx_readb(addr); |
402 | #endif | 408 | #endif |
403 | } | 409 | } |
404 | 410 | ||
405 | static inline void | 411 | static inline void |
406 | __ixp4xx_ioread8_rep(void __iomem *addr, void *vaddr, u32 count) | 412 | __ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count) |
407 | { | 413 | { |
408 | unsigned long port = (unsigned long __force)addr; | 414 | unsigned long port = (unsigned long __force)addr; |
409 | if (__is_io_address(port)) | 415 | if (__is_io_address(port)) |
@@ -412,12 +418,12 @@ __ixp4xx_ioread8_rep(void __iomem *addr, void *vaddr, u32 count) | |||
412 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 418 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
413 | __raw_readsb(addr, vaddr, count); | 419 | __raw_readsb(addr, vaddr, count); |
414 | #else | 420 | #else |
415 | __ixp4xx_readsb(port, vaddr, count); | 421 | __ixp4xx_readsb(addr, vaddr, count); |
416 | #endif | 422 | #endif |
417 | } | 423 | } |
418 | 424 | ||
419 | static inline unsigned int | 425 | static inline unsigned int |
420 | __ixp4xx_ioread16(void __iomem *addr) | 426 | __ixp4xx_ioread16(const void __iomem *addr) |
421 | { | 427 | { |
422 | unsigned long port = (unsigned long __force)addr; | 428 | unsigned long port = (unsigned long __force)addr; |
423 | if (__is_io_address(port)) | 429 | if (__is_io_address(port)) |
@@ -426,12 +432,12 @@ __ixp4xx_ioread16(void __iomem *addr) | |||
426 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 432 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
427 | return le16_to_cpu(__raw_readw((u32)port)); | 433 | return le16_to_cpu(__raw_readw((u32)port)); |
428 | #else | 434 | #else |
429 | return (unsigned int)__ixp4xx_readw((u32)port); | 435 | return (unsigned int)__ixp4xx_readw(addr); |
430 | #endif | 436 | #endif |
431 | } | 437 | } |
432 | 438 | ||
433 | static inline void | 439 | static inline void |
434 | __ixp4xx_ioread16_rep(void __iomem *addr, void *vaddr, u32 count) | 440 | __ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count) |
435 | { | 441 | { |
436 | unsigned long port = (unsigned long __force)addr; | 442 | unsigned long port = (unsigned long __force)addr; |
437 | if (__is_io_address(port)) | 443 | if (__is_io_address(port)) |
@@ -440,12 +446,12 @@ __ixp4xx_ioread16_rep(void __iomem *addr, void *vaddr, u32 count) | |||
440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 446 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
441 | __raw_readsw(addr, vaddr, count); | 447 | __raw_readsw(addr, vaddr, count); |
442 | #else | 448 | #else |
443 | __ixp4xx_readsw(port, vaddr, count); | 449 | __ixp4xx_readsw(addr, vaddr, count); |
444 | #endif | 450 | #endif |
445 | } | 451 | } |
446 | 452 | ||
447 | static inline unsigned int | 453 | static inline unsigned int |
448 | __ixp4xx_ioread32(void __iomem *addr) | 454 | __ixp4xx_ioread32(const void __iomem *addr) |
449 | { | 455 | { |
450 | unsigned long port = (unsigned long __force)addr; | 456 | unsigned long port = (unsigned long __force)addr; |
451 | if (__is_io_address(port)) | 457 | if (__is_io_address(port)) |
@@ -454,13 +460,13 @@ __ixp4xx_ioread32(void __iomem *addr) | |||
454 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 460 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
455 | return le32_to_cpu(__raw_readl((u32)port)); | 461 | return le32_to_cpu(__raw_readl((u32)port)); |
456 | #else | 462 | #else |
457 | return (unsigned int)__ixp4xx_readl((u32)port); | 463 | return (unsigned int)__ixp4xx_readl(addr); |
458 | #endif | 464 | #endif |
459 | } | 465 | } |
460 | } | 466 | } |
461 | 467 | ||
462 | static inline void | 468 | static inline void |
463 | __ixp4xx_ioread32_rep(void __iomem *addr, void *vaddr, u32 count) | 469 | __ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count) |
464 | { | 470 | { |
465 | unsigned long port = (unsigned long __force)addr; | 471 | unsigned long port = (unsigned long __force)addr; |
466 | if (__is_io_address(port)) | 472 | if (__is_io_address(port)) |
@@ -469,7 +475,7 @@ __ixp4xx_ioread32_rep(void __iomem *addr, void *vaddr, u32 count) | |||
469 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 475 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
470 | __raw_readsl(addr, vaddr, count); | 476 | __raw_readsl(addr, vaddr, count); |
471 | #else | 477 | #else |
472 | __ixp4xx_readsl(port, vaddr, count); | 478 | __ixp4xx_readsl(addr, vaddr, count); |
473 | #endif | 479 | #endif |
474 | } | 480 | } |
475 | 481 | ||
@@ -483,7 +489,7 @@ __ixp4xx_iowrite8(u8 value, void __iomem *addr) | |||
483 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 489 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
484 | __raw_writeb(value, port); | 490 | __raw_writeb(value, port); |
485 | #else | 491 | #else |
486 | __ixp4xx_writeb(value, port); | 492 | __ixp4xx_writeb(value, addr); |
487 | #endif | 493 | #endif |
488 | } | 494 | } |
489 | 495 | ||
@@ -497,7 +503,7 @@ __ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
497 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 503 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
498 | __raw_writesb(addr, vaddr, count); | 504 | __raw_writesb(addr, vaddr, count); |
499 | #else | 505 | #else |
500 | __ixp4xx_writesb(port, vaddr, count); | 506 | __ixp4xx_writesb(addr, vaddr, count); |
501 | #endif | 507 | #endif |
502 | } | 508 | } |
503 | 509 | ||
@@ -511,7 +517,7 @@ __ixp4xx_iowrite16(u16 value, void __iomem *addr) | |||
511 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 517 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
512 | __raw_writew(cpu_to_le16(value), addr); | 518 | __raw_writew(cpu_to_le16(value), addr); |
513 | #else | 519 | #else |
514 | __ixp4xx_writew(value, port); | 520 | __ixp4xx_writew(value, addr); |
515 | #endif | 521 | #endif |
516 | } | 522 | } |
517 | 523 | ||
@@ -525,7 +531,7 @@ __ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 531 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
526 | __raw_writesw(addr, vaddr, count); | 532 | __raw_writesw(addr, vaddr, count); |
527 | #else | 533 | #else |
528 | __ixp4xx_writesw(port, vaddr, count); | 534 | __ixp4xx_writesw(addr, vaddr, count); |
529 | #endif | 535 | #endif |
530 | } | 536 | } |
531 | 537 | ||
@@ -539,7 +545,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr) | |||
539 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 545 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
540 | __raw_writel(cpu_to_le32(value), port); | 546 | __raw_writel(cpu_to_le32(value), port); |
541 | #else | 547 | #else |
542 | __ixp4xx_writel(value, port); | 548 | __ixp4xx_writel(value, addr); |
543 | #endif | 549 | #endif |
544 | } | 550 | } |
545 | 551 | ||
@@ -553,7 +559,7 @@ __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count) | |||
553 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 559 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
554 | __raw_writesl(addr, vaddr, count); | 560 | __raw_writesl(addr, vaddr, count); |
555 | #else | 561 | #else |
556 | __ixp4xx_writesl(port, vaddr, count); | 562 | __ixp4xx_writesl(addr, vaddr, count); |
557 | #endif | 563 | #endif |
558 | } | 564 | } |
559 | 565 | ||
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/io.h b/include/asm-arm/arch-l7200/io.h index fc012a39e2cb..cab8ad0adf09 100644 --- a/include/asm-arm/arch-l7200/io.h +++ b/include/asm-arm/arch-l7200/io.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #include <asm/arch/hardware.h> | 13 | #include <asm/hardware.h> |
14 | 14 | ||
15 | #define IO_SPACE_LIMIT 0xffffffff | 15 | #define IO_SPACE_LIMIT 0xffffffff |
16 | 16 | ||
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/io.h b/include/asm-arm/arch-lh7a40x/io.h index c13bdd9add92..bbcd4335f441 100644 --- a/include/asm-arm/arch-lh7a40x/io.h +++ b/include/asm-arm/arch-lh7a40x/io.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARCH_IO_H | 11 | #ifndef __ASM_ARCH_IO_H |
12 | #define __ASM_ARCH_IO_H | 12 | #define __ASM_ARCH_IO_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | ||
15 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
15 | 17 | ||
16 | /* No ISA or PCI bus on this machine. */ | 18 | /* No ISA or PCI bus on this machine. */ |
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/io.h b/include/asm-arm/arch-omap/io.h index 11fbf629bf75..3d5bcd545082 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -34,6 +34,8 @@ | |||
34 | #ifndef __ASM_ARM_ARCH_IO_H | 34 | #ifndef __ASM_ARM_ARCH_IO_H |
35 | #define __ASM_ARM_ARCH_IO_H | 35 | #define __ASM_ARM_ARCH_IO_H |
36 | 36 | ||
37 | #include <asm/hardware.h> | ||
38 | |||
37 | #define IO_SPACE_LIMIT 0xffffffff | 39 | #define IO_SPACE_LIMIT 0xffffffff |
38 | 40 | ||
39 | /* | 41 | /* |
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/hardware.h b/include/asm-arm/arch-pxa/hardware.h index cf35721cfa45..3e70bd95472c 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -44,12 +44,12 @@ | |||
44 | 44 | ||
45 | #ifndef __ASSEMBLY__ | 45 | #ifndef __ASSEMBLY__ |
46 | 46 | ||
47 | # define __REG(x) (*((volatile unsigned long *)io_p2v(x))) | 47 | # define __REG(x) (*((volatile u32 *)io_p2v(x))) |
48 | 48 | ||
49 | /* With indexed regs we don't want to feed the index through io_p2v() | 49 | /* With indexed regs we don't want to feed the index through io_p2v() |
50 | especially if it is a variable, otherwise horrible code will result. */ | 50 | especially if it is a variable, otherwise horrible code will result. */ |
51 | # define __REG2(x,y) \ | 51 | # define __REG2(x,y) \ |
52 | (*(volatile unsigned long *)((unsigned long)&__REG(x) + (y))) | 52 | (*(volatile u32 *)((u32)&__REG(x) + (y))) |
53 | 53 | ||
54 | # define __PREG(x) (io_v2p((u32)&(x))) | 54 | # define __PREG(x) (io_v2p((u32)&(x))) |
55 | 55 | ||
diff --git a/include/asm-arm/arch-pxa/io.h b/include/asm-arm/arch-pxa/io.h index c3bdbe44e21f..eb2dd58d397f 100644 --- a/include/asm-arm/arch-pxa/io.h +++ b/include/asm-arm/arch-pxa/io.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __ASM_ARM_ARCH_IO_H | 6 | #ifndef __ASM_ARM_ARCH_IO_H |
7 | #define __ASM_ARM_ARCH_IO_H | 7 | #define __ASM_ARM_ARCH_IO_H |
8 | 8 | ||
9 | #include <asm/hardware.h> | ||
10 | |||
9 | #define IO_SPACE_LIMIT 0xffffffff | 11 | #define IO_SPACE_LIMIT 0xffffffff |
10 | 12 | ||
11 | /* | 13 | /* |
diff --git a/include/asm-arm/arch-pxa/irda.h b/include/asm-arm/arch-pxa/irda.h new file mode 100644 index 000000000000..748406f384c2 --- /dev/null +++ b/include/asm-arm/arch-pxa/irda.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef ASMARM_ARCH_IRDA_H | ||
2 | #define ASMARM_ARCH_IRDA_H | ||
3 | |||
4 | /* board specific transceiver capabilities */ | ||
5 | |||
6 | #define IR_OFF 1 | ||
7 | #define IR_SIRMODE 2 | ||
8 | #define IR_FIRMODE 4 | ||
9 | |||
10 | struct pxaficp_platform_data { | ||
11 | int transceiver_cap; | ||
12 | void (*transceiver_mode)(struct device *dev, int mode); | ||
13 | }; | ||
14 | |||
15 | extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); | ||
16 | |||
17 | #endif | ||
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-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 3af7165ab0d7..a75a2470f4f5 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -326,6 +326,25 @@ | |||
326 | #define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | 326 | #define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ |
327 | #define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | 327 | #define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ |
328 | 328 | ||
329 | /* Hardware UART (HWUART) */ | ||
330 | #define HWUART HWRBR | ||
331 | #define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */ | ||
332 | #define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */ | ||
333 | #define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */ | ||
334 | #define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */ | ||
335 | #define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */ | ||
336 | #define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */ | ||
337 | #define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */ | ||
338 | #define HWLSR __REG(0x41600014) /* Line Status Register (read only) */ | ||
339 | #define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */ | ||
340 | #define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */ | ||
341 | #define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */ | ||
342 | #define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */ | ||
343 | #define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */ | ||
344 | #define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */ | ||
345 | #define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
346 | #define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
347 | |||
329 | #define IER_DMAE (1 << 7) /* DMA Requests Enable */ | 348 | #define IER_DMAE (1 << 7) /* DMA Requests Enable */ |
330 | #define IER_UUE (1 << 6) /* UART Unit Enable */ | 349 | #define IER_UUE (1 << 6) /* UART Unit Enable */ |
331 | #define IER_NRZE (1 << 5) /* NRZ coding Enable */ | 350 | #define IER_NRZE (1 << 5) /* NRZ coding Enable */ |
@@ -1013,14 +1032,12 @@ | |||
1013 | #define ICCR0_LBM (1 << 1) /* Loopback mode */ | 1032 | #define ICCR0_LBM (1 << 1) /* Loopback mode */ |
1014 | #define ICCR0_ITR (1 << 0) /* IrDA transmission */ | 1033 | #define ICCR0_ITR (1 << 0) /* IrDA transmission */ |
1015 | 1034 | ||
1016 | #ifdef CONFIG_PXA27x | ||
1017 | #define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */ | 1035 | #define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */ |
1018 | #define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */ | 1036 | #define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */ |
1019 | #define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */ | 1037 | #define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */ |
1020 | #define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */ | 1038 | #define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */ |
1021 | #define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */ | 1039 | #define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */ |
1022 | #define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */ | 1040 | #define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */ |
1023 | #endif | ||
1024 | 1041 | ||
1025 | #ifdef CONFIG_PXA27x | 1042 | #ifdef CONFIG_PXA27x |
1026 | #define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */ | 1043 | #define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */ |
@@ -1250,9 +1267,13 @@ | |||
1250 | #define GPIO40_FFDTR 40 /* FFUART data terminal Ready */ | 1267 | #define GPIO40_FFDTR 40 /* FFUART data terminal Ready */ |
1251 | #define GPIO41_FFRTS 41 /* FFUART request to send */ | 1268 | #define GPIO41_FFRTS 41 /* FFUART request to send */ |
1252 | #define GPIO42_BTRXD 42 /* BTUART receive data */ | 1269 | #define GPIO42_BTRXD 42 /* BTUART receive data */ |
1270 | #define GPIO42_HWRXD 42 /* HWUART receive data */ | ||
1253 | #define GPIO43_BTTXD 43 /* BTUART transmit data */ | 1271 | #define GPIO43_BTTXD 43 /* BTUART transmit data */ |
1272 | #define GPIO43_HWTXD 43 /* HWUART transmit data */ | ||
1254 | #define GPIO44_BTCTS 44 /* BTUART clear to send */ | 1273 | #define GPIO44_BTCTS 44 /* BTUART clear to send */ |
1274 | #define GPIO44_HWCTS 44 /* HWUART clear to send */ | ||
1255 | #define GPIO45_BTRTS 45 /* BTUART request to send */ | 1275 | #define GPIO45_BTRTS 45 /* BTUART request to send */ |
1276 | #define GPIO45_HWRTS 45 /* HWUART request to send */ | ||
1256 | #define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */ | 1277 | #define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */ |
1257 | #define GPIO46_ICPRXD 46 /* ICP receive data */ | 1278 | #define GPIO46_ICPRXD 46 /* ICP receive data */ |
1258 | #define GPIO46_STRXD 46 /* STD_UART receive data */ | 1279 | #define GPIO46_STRXD 46 /* STD_UART receive data */ |
@@ -1378,17 +1399,26 @@ | |||
1378 | #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) | 1399 | #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) |
1379 | #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) | 1400 | #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) |
1380 | #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) | 1401 | #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) |
1402 | #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) | ||
1381 | #define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT) | 1403 | #define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT) |
1404 | #define GPIO43_HWTXD_MD (43 | GPIO_ALT_FN_3_OUT) | ||
1382 | #define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN) | 1405 | #define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN) |
1406 | #define GPIO44_HWCTS_MD (44 | GPIO_ALT_FN_3_IN) | ||
1383 | #define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT) | 1407 | #define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT) |
1408 | #define GPIO45_HWRTS_MD (45 | GPIO_ALT_FN_3_OUT) | ||
1384 | #define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT) | 1409 | #define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT) |
1385 | #define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN) | 1410 | #define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN) |
1386 | #define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN) | 1411 | #define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN) |
1387 | #define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT) | 1412 | #define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT) |
1388 | #define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT) | 1413 | #define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT) |
1389 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | 1414 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) |
1415 | #define GPIO48_HWTXD_MD (48 | GPIO_ALT_FN_1_OUT) | ||
1416 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | ||
1417 | #define GPIO49_HWRXD_MD (49 | GPIO_ALT_FN_1_IN) | ||
1390 | #define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT) | 1418 | #define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT) |
1391 | #define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT) | 1419 | #define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT) |
1420 | #define GPIO50_HWCTS_MD (50 | GPIO_ALT_FN_1_IN) | ||
1421 | #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) | ||
1392 | #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) | 1422 | #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) |
1393 | #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) | 1423 | #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) |
1394 | #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) | 1424 | #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) |
@@ -1763,6 +1793,7 @@ | |||
1763 | #define CKEN7_BTUART (1 << 7) /* BTUART Unit Clock Enable */ | 1793 | #define CKEN7_BTUART (1 << 7) /* BTUART Unit Clock Enable */ |
1764 | #define CKEN6_FFUART (1 << 6) /* FFUART Unit Clock Enable */ | 1794 | #define CKEN6_FFUART (1 << 6) /* FFUART Unit Clock Enable */ |
1765 | #define CKEN5_STUART (1 << 5) /* STUART Unit Clock Enable */ | 1795 | #define CKEN5_STUART (1 << 5) /* STUART Unit Clock Enable */ |
1796 | #define CKEN4_HWUART (1 << 4) /* HWUART Unit Clock Enable */ | ||
1766 | #define CKEN4_SSP3 (1 << 4) /* SSP3 Unit Clock Enable */ | 1797 | #define CKEN4_SSP3 (1 << 4) /* SSP3 Unit Clock Enable */ |
1767 | #define CKEN3_SSP (1 << 3) /* SSP Unit Clock Enable */ | 1798 | #define CKEN3_SSP (1 << 3) /* SSP Unit Clock Enable */ |
1768 | #define CKEN3_SSP2 (1 << 3) /* SSP2 Unit Clock Enable */ | 1799 | #define CKEN3_SSP2 (1 << 3) /* SSP2 Unit Clock Enable */ |
@@ -2282,4 +2313,11 @@ | |||
2282 | 2313 | ||
2283 | #endif | 2314 | #endif |
2284 | 2315 | ||
2316 | /* PWRMODE register M field values */ | ||
2317 | |||
2318 | #define PWRMODE_IDLE 0x1 | ||
2319 | #define PWRMODE_STANDBY 0x2 | ||
2320 | #define PWRMODE_SLEEP 0x3 | ||
2321 | #define PWRMODE_DEEPSLEEP 0x7 | ||
2322 | |||
2285 | #endif | 2323 | #endif |
diff --git a/include/asm-arm/arch-pxa/uncompress.h b/include/asm-arm/arch-pxa/uncompress.h index 4428d3eb7432..fe38090444e0 100644 --- a/include/asm-arm/arch-pxa/uncompress.h +++ b/include/asm-arm/arch-pxa/uncompress.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define FFUART ((volatile unsigned long *)0x40100000) | 12 | #define FFUART ((volatile unsigned long *)0x40100000) |
13 | #define BTUART ((volatile unsigned long *)0x40200000) | 13 | #define BTUART ((volatile unsigned long *)0x40200000) |
14 | #define STUART ((volatile unsigned long *)0x40700000) | 14 | #define STUART ((volatile unsigned long *)0x40700000) |
15 | #define HWUART ((volatile unsigned long *)0x41600000) | ||
15 | 16 | ||
16 | #define UART FFUART | 17 | #define UART FFUART |
17 | 18 | ||
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S new file mode 100644 index 000000000000..ed28bd012236 --- /dev/null +++ b/include/asm-arm/arch-realview/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* linux/include/asm-arm/arch-realview/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <asm/hardware/amba_serial.h> | ||
15 | |||
16 | .macro addruart,rx | ||
17 | mrc p15, 0, \rx, c1, c0 | ||
18 | tst \rx, #1 @ MMU enabled? | ||
19 | moveq \rx, #0x10000000 | ||
20 | movne \rx, #0xf1000000 @ virtual base | ||
21 | orr \rx, \rx, #0x00009000 | ||
22 | .endm | ||
23 | |||
24 | .macro senduart,rd,rx | ||
25 | strb \rd, [\rx, #UART01x_DR] | ||
26 | .endm | ||
27 | |||
28 | .macro waituart,rd,rx | ||
29 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
30 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
31 | bne 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
36 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
37 | bne 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-realview/dma.h b/include/asm-arm/arch-realview/dma.h new file mode 100644 index 000000000000..744491a74bd9 --- /dev/null +++ b/include/asm-arm/arch-realview/dma.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited. | ||
5 | * Copyright (C) 1997,1998 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_DMA_H | ||
22 | #define __ASM_ARCH_DMA_H | ||
23 | |||
24 | #define MAX_DMA_ADDRESS 0xffffffff | ||
25 | #define MAX_DMA_CHANNELS 0 | ||
26 | |||
27 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S new file mode 100644 index 000000000000..2712ba77bb3a --- /dev/null +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-realview/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for RealView platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/hardware/gic.h> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | /* | ||
17 | * The interrupt numbering scheme is defined in the | ||
18 | * interrupt controller spec. To wit: | ||
19 | * | ||
20 | * Interrupts 0-15 are IPI | ||
21 | * 16-28 are reserved | ||
22 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
23 | * 32-1020 are global | ||
24 | * 1021-1022 are reserved | ||
25 | * 1023 is "spurious" (no interrupt) | ||
26 | * | ||
27 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
28 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
29 | * | ||
30 | * A simple read from the controller will tell us the number of the highest | ||
31 | * priority enabled interrupt. We then just need to check whether it is in the | ||
32 | * valid range for an IRQ (30-1020 inclusive). | ||
33 | */ | ||
34 | |||
35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
36 | |||
37 | ldr \base, =IO_ADDRESS(REALVIEW_GIC_CPU_BASE) | ||
38 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
39 | |||
40 | ldr \tmp, =1021 | ||
41 | |||
42 | bic \irqnr, \irqstat, #0x1c00 | ||
43 | |||
44 | cmp \irqnr, #29 | ||
45 | cmpcc \irqnr, \irqnr | ||
46 | cmpne \irqnr, \tmp | ||
47 | cmpcs \irqnr, \irqnr | ||
48 | |||
49 | .endm | ||
diff --git a/include/asm-arm/arch-realview/hardware.h b/include/asm-arm/arch-realview/hardware.h new file mode 100644 index 000000000000..67879cdb6ef2 --- /dev/null +++ b/include/asm-arm/arch-realview/hardware.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/hardware.h | ||
3 | * | ||
4 | * This file contains the hardware definitions of the RealView boards. | ||
5 | * | ||
6 | * Copyright (C) 2003 ARM Limited. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | #ifndef __ASM_ARCH_HARDWARE_H | ||
23 | #define __ASM_ARCH_HARDWARE_H | ||
24 | |||
25 | #include <asm/sizes.h> | ||
26 | #include <asm/arch/platform.h> | ||
27 | |||
28 | /* macro to get at IO space when running virtually */ | ||
29 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) | ||
30 | |||
31 | #endif | ||
diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h new file mode 100644 index 000000000000..d444a68ac330 --- /dev/null +++ b/include/asm-arm/arch-realview/io.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/io.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | static inline void __iomem *__io(unsigned long addr) | ||
26 | { | ||
27 | return (void __iomem *)addr; | ||
28 | } | ||
29 | |||
30 | #define __io(a) __io(a) | ||
31 | #define __mem_pci(a) (a) | ||
32 | #define __mem_isa(a) (a) | ||
33 | |||
34 | #endif | ||
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h new file mode 100644 index 000000000000..ff376494e5b1 --- /dev/null +++ b/include/asm-arm/arch-realview/irqs.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <asm/arch/platform.h> | ||
23 | |||
24 | /* | ||
25 | * IRQ interrupts definitions are the same the INT definitions | ||
26 | * held within platform.h | ||
27 | */ | ||
28 | #define IRQ_GIC_START 32 | ||
29 | #define IRQ_WDOGINT (IRQ_GIC_START + INT_WDOGINT) | ||
30 | #define IRQ_SOFTINT (IRQ_GIC_START + INT_SOFTINT) | ||
31 | #define IRQ_COMMRx (IRQ_GIC_START + INT_COMMRx) | ||
32 | #define IRQ_COMMTx (IRQ_GIC_START + INT_COMMTx) | ||
33 | #define IRQ_TIMERINT0_1 (IRQ_GIC_START + INT_TIMERINT0_1) | ||
34 | #define IRQ_TIMERINT2_3 (IRQ_GIC_START + INT_TIMERINT2_3) | ||
35 | #define IRQ_GPIOINT0 (IRQ_GIC_START + INT_GPIOINT0) | ||
36 | #define IRQ_GPIOINT1 (IRQ_GIC_START + INT_GPIOINT1) | ||
37 | #define IRQ_GPIOINT2 (IRQ_GIC_START + INT_GPIOINT2) | ||
38 | #define IRQ_GPIOINT3 (IRQ_GIC_START + INT_GPIOINT3) | ||
39 | #define IRQ_RTCINT (IRQ_GIC_START + INT_RTCINT) | ||
40 | #define IRQ_SSPINT (IRQ_GIC_START + INT_SSPINT) | ||
41 | #define IRQ_UARTINT0 (IRQ_GIC_START + INT_UARTINT0) | ||
42 | #define IRQ_UARTINT1 (IRQ_GIC_START + INT_UARTINT1) | ||
43 | #define IRQ_UARTINT2 (IRQ_GIC_START + INT_UARTINT2) | ||
44 | #define IRQ_UART3 (IRQ_GIC_START + INT_UARTINT3) | ||
45 | #define IRQ_SCIINT (IRQ_GIC_START + INT_SCIINT) | ||
46 | #define IRQ_CLCDINT (IRQ_GIC_START + INT_CLCDINT) | ||
47 | #define IRQ_DMAINT (IRQ_GIC_START + INT_DMAINT) | ||
48 | #define IRQ_PWRFAILINT (IRQ_GIC_START + INT_PWRFAILINT) | ||
49 | #define IRQ_MBXINT (IRQ_GIC_START + INT_MBXINT) | ||
50 | #define IRQ_GNDINT (IRQ_GIC_START + INT_GNDINT) | ||
51 | #define IRQ_MMCI0B (IRQ_GIC_START + INT_MMCI0B) | ||
52 | #define IRQ_MMCI1B (IRQ_GIC_START + INT_MMCI1B) | ||
53 | #define IRQ_KMI0 (IRQ_GIC_START + INT_KMI0) | ||
54 | #define IRQ_KMI1 (IRQ_GIC_START + INT_KMI1) | ||
55 | #define IRQ_SCI3 (IRQ_GIC_START + INT_SCI3) | ||
56 | #define IRQ_CLCD (IRQ_GIC_START + INT_CLCD) | ||
57 | #define IRQ_TOUCH (IRQ_GIC_START + INT_TOUCH) | ||
58 | #define IRQ_KEYPAD (IRQ_GIC_START + INT_KEYPAD) | ||
59 | #define IRQ_DoC (IRQ_GIC_START + INT_DoC) | ||
60 | #define IRQ_MMCI0A (IRQ_GIC_START + INT_MMCI0A) | ||
61 | #define IRQ_MMCI1A (IRQ_GIC_START + INT_MMCI1A) | ||
62 | #define IRQ_AACI (IRQ_GIC_START + INT_AACI) | ||
63 | #define IRQ_ETH (IRQ_GIC_START + INT_ETH) | ||
64 | #define IRQ_USB (IRQ_GIC_START + INT_USB) | ||
65 | |||
66 | #define IRQMASK_WDOGINT INTMASK_WDOGINT | ||
67 | #define IRQMASK_SOFTINT INTMASK_SOFTINT | ||
68 | #define IRQMASK_COMMRx INTMASK_COMMRx | ||
69 | #define IRQMASK_COMMTx INTMASK_COMMTx | ||
70 | #define IRQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1 | ||
71 | #define IRQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3 | ||
72 | #define IRQMASK_GPIOINT0 INTMASK_GPIOINT0 | ||
73 | #define IRQMASK_GPIOINT1 INTMASK_GPIOINT1 | ||
74 | #define IRQMASK_GPIOINT2 INTMASK_GPIOINT2 | ||
75 | #define IRQMASK_GPIOINT3 INTMASK_GPIOINT3 | ||
76 | #define IRQMASK_RTCINT INTMASK_RTCINT | ||
77 | #define IRQMASK_SSPINT INTMASK_SSPINT | ||
78 | #define IRQMASK_UARTINT0 INTMASK_UARTINT0 | ||
79 | #define IRQMASK_UARTINT1 INTMASK_UARTINT1 | ||
80 | #define IRQMASK_UARTINT2 INTMASK_UARTINT2 | ||
81 | #define IRQMASK_SCIINT INTMASK_SCIINT | ||
82 | #define IRQMASK_CLCDINT INTMASK_CLCDINT | ||
83 | #define IRQMASK_DMAINT INTMASK_DMAINT | ||
84 | #define IRQMASK_PWRFAILINT INTMASK_PWRFAILINT | ||
85 | #define IRQMASK_MBXINT INTMASK_MBXINT | ||
86 | #define IRQMASK_GNDINT INTMASK_GNDINT | ||
87 | #define IRQMASK_MMCI0B INTMASK_MMCI0B | ||
88 | #define IRQMASK_MMCI1B INTMASK_MMCI1B | ||
89 | #define IRQMASK_KMI0 INTMASK_KMI0 | ||
90 | #define IRQMASK_KMI1 INTMASK_KMI1 | ||
91 | #define IRQMASK_SCI3 INTMASK_SCI3 | ||
92 | #define IRQMASK_UART3 INTMASK_UART3 | ||
93 | #define IRQMASK_CLCD INTMASK_CLCD | ||
94 | #define IRQMASK_TOUCH INTMASK_TOUCH | ||
95 | #define IRQMASK_KEYPAD INTMASK_KEYPAD | ||
96 | #define IRQMASK_DoC INTMASK_DoC | ||
97 | #define IRQMASK_MMCI0A INTMASK_MMCI0A | ||
98 | #define IRQMASK_MMCI1A INTMASK_MMCI1A | ||
99 | #define IRQMASK_AACI INTMASK_AACI | ||
100 | #define IRQMASK_ETH INTMASK_ETH | ||
101 | #define IRQMASK_USB INTMASK_USB | ||
102 | |||
103 | #define NR_IRQS (IRQ_GIC_START + 64) | ||
diff --git a/include/asm-arm/arch-realview/memory.h b/include/asm-arm/arch-realview/memory.h new file mode 100644 index 000000000000..ed370abb638f --- /dev/null +++ b/include/asm-arm/arch-realview/memory.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | /* | ||
29 | * Virtual view <-> DMA view memory address translations | ||
30 | * virt_to_bus: Used to translate the virtual address to an | ||
31 | * address suitable to be passed to set_dma_addr | ||
32 | * bus_to_virt: Used to convert an address for DMA operations | ||
33 | * to an address that the kernel can use. | ||
34 | */ | ||
35 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | ||
36 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | ||
37 | |||
38 | #endif | ||
diff --git a/include/asm-arm/arch-realview/param.h b/include/asm-arm/arch-realview/param.h new file mode 100644 index 000000000000..89b1235d32bd --- /dev/null +++ b/include/asm-arm/arch-realview/param.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/param.h | ||
3 | * | ||
4 | * Copyright (C) 2002 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h new file mode 100644 index 000000000000..4b6de13a6b9a --- /dev/null +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -0,0 +1,395 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/platform.h | ||
3 | * | ||
4 | * Copyright (c) ARM Limited 2003. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __address_h | ||
22 | #define __address_h 1 | ||
23 | |||
24 | /* | ||
25 | * Memory definitions | ||
26 | */ | ||
27 | #define REALVIEW_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/ | ||
28 | #define REALVIEW_BOOT_ROM_HI 0x30000000 | ||
29 | #define REALVIEW_BOOT_ROM_BASE REALVIEW_BOOT_ROM_HI /* Normal position */ | ||
30 | #define REALVIEW_BOOT_ROM_SIZE SZ_64M | ||
31 | |||
32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ | ||
33 | #define REALVIEW_SSRAM_SIZE SZ_2M | ||
34 | |||
35 | #define REALVIEW_FLASH_BASE 0x40000000 | ||
36 | #define REALVIEW_FLASH_SIZE SZ_64M | ||
37 | |||
38 | /* | ||
39 | * SDRAM | ||
40 | */ | ||
41 | #define REALVIEW_SDRAM_BASE 0x00000000 | ||
42 | |||
43 | /* | ||
44 | * Logic expansion modules | ||
45 | * | ||
46 | */ | ||
47 | |||
48 | |||
49 | /* ------------------------------------------------------------------------ | ||
50 | * RealView Registers | ||
51 | * ------------------------------------------------------------------------ | ||
52 | * | ||
53 | */ | ||
54 | #define REALVIEW_SYS_ID_OFFSET 0x00 | ||
55 | #define REALVIEW_SYS_SW_OFFSET 0x04 | ||
56 | #define REALVIEW_SYS_LED_OFFSET 0x08 | ||
57 | #define REALVIEW_SYS_OSC0_OFFSET 0x0C | ||
58 | |||
59 | #define REALVIEW_SYS_OSC1_OFFSET 0x10 | ||
60 | #define REALVIEW_SYS_OSC2_OFFSET 0x14 | ||
61 | #define REALVIEW_SYS_OSC3_OFFSET 0x18 | ||
62 | #define REALVIEW_SYS_OSC4_OFFSET 0x1C /* OSC1 for RealView/AB */ | ||
63 | |||
64 | #define REALVIEW_SYS_LOCK_OFFSET 0x20 | ||
65 | #define REALVIEW_SYS_100HZ_OFFSET 0x24 | ||
66 | #define REALVIEW_SYS_CFGDATA1_OFFSET 0x28 | ||
67 | #define REALVIEW_SYS_CFGDATA2_OFFSET 0x2C | ||
68 | #define REALVIEW_SYS_FLAGS_OFFSET 0x30 | ||
69 | #define REALVIEW_SYS_FLAGSSET_OFFSET 0x30 | ||
70 | #define REALVIEW_SYS_FLAGSCLR_OFFSET 0x34 | ||
71 | #define REALVIEW_SYS_NVFLAGS_OFFSET 0x38 | ||
72 | #define REALVIEW_SYS_NVFLAGSSET_OFFSET 0x38 | ||
73 | #define REALVIEW_SYS_NVFLAGSCLR_OFFSET 0x3C | ||
74 | #define REALVIEW_SYS_RESETCTL_OFFSET 0x40 | ||
75 | #define REALVIEW_SYS_PCICTL_OFFSET 0x44 | ||
76 | #define REALVIEW_SYS_MCI_OFFSET 0x48 | ||
77 | #define REALVIEW_SYS_FLASH_OFFSET 0x4C | ||
78 | #define REALVIEW_SYS_CLCD_OFFSET 0x50 | ||
79 | #define REALVIEW_SYS_CLCDSER_OFFSET 0x54 | ||
80 | #define REALVIEW_SYS_BOOTCS_OFFSET 0x58 | ||
81 | #define REALVIEW_SYS_24MHz_OFFSET 0x5C | ||
82 | #define REALVIEW_SYS_MISC_OFFSET 0x60 | ||
83 | #define REALVIEW_SYS_IOSEL_OFFSET 0x70 | ||
84 | #define REALVIEW_SYS_TEST_OSC0_OFFSET 0x80 | ||
85 | #define REALVIEW_SYS_TEST_OSC1_OFFSET 0x84 | ||
86 | #define REALVIEW_SYS_TEST_OSC2_OFFSET 0x88 | ||
87 | #define REALVIEW_SYS_TEST_OSC3_OFFSET 0x8C | ||
88 | #define REALVIEW_SYS_TEST_OSC4_OFFSET 0x90 | ||
89 | |||
90 | #define REALVIEW_SYS_BASE 0x10000000 | ||
91 | #define REALVIEW_SYS_ID (REALVIEW_SYS_BASE + REALVIEW_SYS_ID_OFFSET) | ||
92 | #define REALVIEW_SYS_SW (REALVIEW_SYS_BASE + REALVIEW_SYS_SW_OFFSET) | ||
93 | #define REALVIEW_SYS_LED (REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET) | ||
94 | #define REALVIEW_SYS_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC0_OFFSET) | ||
95 | #define REALVIEW_SYS_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC1_OFFSET) | ||
96 | |||
97 | #define REALVIEW_SYS_LOCK (REALVIEW_SYS_BASE + REALVIEW_SYS_LOCK_OFFSET) | ||
98 | #define REALVIEW_SYS_100HZ (REALVIEW_SYS_BASE + REALVIEW_SYS_100HZ_OFFSET) | ||
99 | #define REALVIEW_SYS_CFGDATA1 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA1_OFFSET) | ||
100 | #define REALVIEW_SYS_CFGDATA2 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA2_OFFSET) | ||
101 | #define REALVIEW_SYS_FLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGS_OFFSET) | ||
102 | #define REALVIEW_SYS_FLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSSET_OFFSET) | ||
103 | #define REALVIEW_SYS_FLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSCLR_OFFSET) | ||
104 | #define REALVIEW_SYS_NVFLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGS_OFFSET) | ||
105 | #define REALVIEW_SYS_NVFLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSSET_OFFSET) | ||
106 | #define REALVIEW_SYS_NVFLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSCLR_OFFSET) | ||
107 | #define REALVIEW_SYS_RESETCTL (REALVIEW_SYS_BASE + REALVIEW_SYS_RESETCTL_OFFSET) | ||
108 | #define REALVIEW_SYS_PCICTL (REALVIEW_SYS_BASE + REALVIEW_SYS_PCICTL_OFFSET) | ||
109 | #define REALVIEW_SYS_MCI (REALVIEW_SYS_BASE + REALVIEW_SYS_MCI_OFFSET) | ||
110 | #define REALVIEW_SYS_FLASH (REALVIEW_SYS_BASE + REALVIEW_SYS_FLASH_OFFSET) | ||
111 | #define REALVIEW_SYS_CLCD (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCD_OFFSET) | ||
112 | #define REALVIEW_SYS_CLCDSER (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCDSER_OFFSET) | ||
113 | #define REALVIEW_SYS_BOOTCS (REALVIEW_SYS_BASE + REALVIEW_SYS_BOOTCS_OFFSET) | ||
114 | #define REALVIEW_SYS_24MHz (REALVIEW_SYS_BASE + REALVIEW_SYS_24MHz_OFFSET) | ||
115 | #define REALVIEW_SYS_MISC (REALVIEW_SYS_BASE + REALVIEW_SYS_MISC_OFFSET) | ||
116 | #define REALVIEW_SYS_IOSEL (REALVIEW_SYS_BASE + REALVIEW_SYS_IOSEL_OFFSET) | ||
117 | #define REALVIEW_SYS_TEST_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC0_OFFSET) | ||
118 | #define REALVIEW_SYS_TEST_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC1_OFFSET) | ||
119 | #define REALVIEW_SYS_TEST_OSC2 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC2_OFFSET) | ||
120 | #define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET) | ||
121 | #define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET) | ||
122 | |||
123 | /* | ||
124 | * Values for REALVIEW_SYS_RESET_CTRL | ||
125 | */ | ||
126 | #define REALVIEW_SYS_CTRL_RESET_CONFIGCLR 0x01 | ||
127 | #define REALVIEW_SYS_CTRL_RESET_CONFIGINIT 0x02 | ||
128 | #define REALVIEW_SYS_CTRL_RESET_DLLRESET 0x03 | ||
129 | #define REALVIEW_SYS_CTRL_RESET_PLLRESET 0x04 | ||
130 | #define REALVIEW_SYS_CTRL_RESET_POR 0x05 | ||
131 | #define REALVIEW_SYS_CTRL_RESET_DoC 0x06 | ||
132 | |||
133 | #define REALVIEW_SYS_CTRL_LED (1 << 0) | ||
134 | |||
135 | |||
136 | /* ------------------------------------------------------------------------ | ||
137 | * RealView control registers | ||
138 | * ------------------------------------------------------------------------ | ||
139 | */ | ||
140 | |||
141 | /* | ||
142 | * REALVIEW_IDFIELD | ||
143 | * | ||
144 | * 31:24 = manufacturer (0x41 = ARM) | ||
145 | * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus) | ||
146 | * 15:12 = FPGA (0x3 = XVC600 or XVC600E) | ||
147 | * 11:4 = build value | ||
148 | * 3:0 = revision number (0x1 = rev B (AHB)) | ||
149 | */ | ||
150 | |||
151 | /* | ||
152 | * REALVIEW_SYS_LOCK | ||
153 | * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL, | ||
154 | * SYS_CLD, SYS_BOOTCS | ||
155 | */ | ||
156 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) | ||
157 | #define REALVIEW_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */ | ||
158 | |||
159 | /* | ||
160 | * REALVIEW_SYS_FLASH | ||
161 | */ | ||
162 | #define REALVIEW_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */ | ||
163 | |||
164 | /* | ||
165 | * REALVIEW_INTREG | ||
166 | * - used to acknowledge and control MMCI and UART interrupts | ||
167 | */ | ||
168 | #define REALVIEW_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */ | ||
169 | #define REALVIEW_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */ | ||
170 | #define REALVIEW_INTREG_CARDIN 0x08 /* MMCI card in detect */ | ||
171 | /* write 1 to acknowledge and clear */ | ||
172 | #define REALVIEW_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */ | ||
173 | #define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */ | ||
174 | |||
175 | /* | ||
176 | * REALVIEW peripheral addresses | ||
177 | */ | ||
178 | #define REALVIEW_SCTL_BASE 0x10001000 /* System controller */ | ||
179 | #define REALVIEW_I2C_BASE 0x10002000 /* I2C control */ | ||
180 | /* Reserved 0x10003000 */ | ||
181 | #define REALVIEW_AACI_BASE 0x10004000 /* Audio */ | ||
182 | #define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */ | ||
183 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ | ||
184 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ | ||
185 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ | ||
186 | #define REALVIEW_UART0_BASE 0x10009000 /* UART 0 */ | ||
187 | #define REALVIEW_UART1_BASE 0x1000A000 /* UART 1 */ | ||
188 | #define REALVIEW_UART2_BASE 0x1000B000 /* UART 2 */ | ||
189 | #define REALVIEW_UART3_BASE 0x1000C000 /* UART 3 */ | ||
190 | #define REALVIEW_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
191 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ | ||
192 | /* Reserved 0x1000F000 */ | ||
193 | #define REALVIEW_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
194 | #define REALVIEW_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
195 | #define REALVIEW_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
196 | #define REALVIEW_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
197 | #define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */ | ||
198 | #define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */ | ||
199 | /* Reserved 0x10016000 */ | ||
200 | #define REALVIEW_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
201 | #define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */ | ||
202 | #define REALVIEW_PCI_CORE_BASE 0x10019000 /* PCI configuration */ | ||
203 | /* Reserved 0x1001A000 - 0x1001FFFF */ | ||
204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ | ||
205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ | ||
206 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | ||
207 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | ||
208 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | ||
209 | /* Reserved 0x10090000 - 0x100EFFFF */ | ||
210 | |||
211 | #define REALVIEW_ETH_BASE 0x4E000000 /* Ethernet */ | ||
212 | |||
213 | /* PCI space */ | ||
214 | #define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */ | ||
215 | #define REALVIEW_PCI_CFG_BASE 0x42000000 | ||
216 | #define REALVIEW_PCI_MEM_BASE0 0x44000000 | ||
217 | #define REALVIEW_PCI_MEM_BASE1 0x50000000 | ||
218 | #define REALVIEW_PCI_MEM_BASE2 0x60000000 | ||
219 | /* Sizes of above maps */ | ||
220 | #define REALVIEW_PCI_BASE_SIZE 0x01000000 | ||
221 | #define REALVIEW_PCI_CFG_BASE_SIZE 0x02000000 | ||
222 | #define REALVIEW_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */ | ||
223 | #define REALVIEW_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */ | ||
224 | #define REALVIEW_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */ | ||
225 | |||
226 | #define REALVIEW_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */ | ||
227 | #define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */ | ||
228 | |||
229 | /* | ||
230 | * Disk on Chip | ||
231 | */ | ||
232 | #define REALVIEW_DOC_BASE 0x2C000000 | ||
233 | #define REALVIEW_DOC_SIZE (16 << 20) | ||
234 | #define REALVIEW_DOC_PAGE_SIZE 512 | ||
235 | #define REALVIEW_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE) | ||
236 | |||
237 | #define ERASE_UNIT_PAGES 32 | ||
238 | #define START_PAGE 0x80 | ||
239 | |||
240 | /* | ||
241 | * LED settings, bits [7:0] | ||
242 | */ | ||
243 | #define REALVIEW_SYS_LED0 (1 << 0) | ||
244 | #define REALVIEW_SYS_LED1 (1 << 1) | ||
245 | #define REALVIEW_SYS_LED2 (1 << 2) | ||
246 | #define REALVIEW_SYS_LED3 (1 << 3) | ||
247 | #define REALVIEW_SYS_LED4 (1 << 4) | ||
248 | #define REALVIEW_SYS_LED5 (1 << 5) | ||
249 | #define REALVIEW_SYS_LED6 (1 << 6) | ||
250 | #define REALVIEW_SYS_LED7 (1 << 7) | ||
251 | |||
252 | #define ALL_LEDS 0xFF | ||
253 | |||
254 | #define LED_BANK REALVIEW_SYS_LED | ||
255 | |||
256 | /* | ||
257 | * Control registers | ||
258 | */ | ||
259 | #define REALVIEW_IDFIELD_OFFSET 0x0 /* RealView build information */ | ||
260 | #define REALVIEW_FLASHPROG_OFFSET 0x4 /* Flash devices */ | ||
261 | #define REALVIEW_INTREG_OFFSET 0x8 /* Interrupt control */ | ||
262 | #define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */ | ||
263 | |||
264 | /* ------------------------------------------------------------------------ | ||
265 | * Interrupts - bit assignment (primary) | ||
266 | * ------------------------------------------------------------------------ | ||
267 | */ | ||
268 | #define INT_WDOGINT 0 /* Watchdog timer */ | ||
269 | #define INT_SOFTINT 1 /* Software interrupt */ | ||
270 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ | ||
271 | #define INT_COMMTx 3 /* Debug Comm Tx interrupt */ | ||
272 | #define INT_TIMERINT0_1 4 /* Timer 0 and 1 */ | ||
273 | #define INT_TIMERINT2_3 5 /* Timer 2 and 3 */ | ||
274 | #define INT_GPIOINT0 6 /* GPIO 0 */ | ||
275 | #define INT_GPIOINT1 7 /* GPIO 1 */ | ||
276 | #define INT_GPIOINT2 8 /* GPIO 2 */ | ||
277 | /* 9 reserved */ | ||
278 | #define INT_RTCINT 10 /* Real Time Clock */ | ||
279 | #define INT_SSPINT 11 /* Synchronous Serial Port */ | ||
280 | #define INT_UARTINT0 12 /* UART 0 on development chip */ | ||
281 | #define INT_UARTINT1 13 /* UART 1 on development chip */ | ||
282 | #define INT_UARTINT2 14 /* UART 2 on development chip */ | ||
283 | #define INT_UARTINT3 15 /* UART 3 on development chip */ | ||
284 | #define INT_SCIINT 16 /* Smart Card Interface */ | ||
285 | #define INT_MMCI0A 17 /* Multimedia Card 0A */ | ||
286 | #define INT_MMCI0B 18 /* Multimedia Card 0B */ | ||
287 | #define INT_AACI 19 /* Audio Codec */ | ||
288 | #define INT_KMI0 20 /* Keyboard/Mouse port 0 */ | ||
289 | #define INT_KMI1 21 /* Keyboard/Mouse port 1 */ | ||
290 | #define INT_CHARLCD 22 /* Character LCD */ | ||
291 | #define INT_CLCDINT 23 /* CLCD controller */ | ||
292 | #define INT_DMAINT 24 /* DMA controller */ | ||
293 | #define INT_PWRFAILINT 25 /* Power failure */ | ||
294 | #define INT_PISMO 26 | ||
295 | #define INT_DoC 27 /* Disk on Chip memory controller */ | ||
296 | #define INT_ETH 28 /* Ethernet controller */ | ||
297 | #define INT_USB 29 /* USB controller */ | ||
298 | #define INT_TSPENINT 30 /* Touchscreen pen */ | ||
299 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ | ||
300 | |||
301 | /* | ||
302 | * Interrupt bit positions | ||
303 | * | ||
304 | */ | ||
305 | #define INTMASK_WDOGINT (1 << INT_WDOGINT) | ||
306 | #define INTMASK_SOFTINT (1 << INT_SOFTINT) | ||
307 | #define INTMASK_COMMRx (1 << INT_COMMRx) | ||
308 | #define INTMASK_COMMTx (1 << INT_COMMTx) | ||
309 | #define INTMASK_TIMERINT0_1 (1 << INT_TIMERINT0_1) | ||
310 | #define INTMASK_TIMERINT2_3 (1 << INT_TIMERINT2_3) | ||
311 | #define INTMASK_GPIOINT0 (1 << INT_GPIOINT0) | ||
312 | #define INTMASK_GPIOINT1 (1 << INT_GPIOINT1) | ||
313 | #define INTMASK_GPIOINT2 (1 << INT_GPIOINT2) | ||
314 | #define INTMASK_RTCINT (1 << INT_RTCINT) | ||
315 | #define INTMASK_SSPINT (1 << INT_SSPINT) | ||
316 | #define INTMASK_UARTINT0 (1 << INT_UARTINT0) | ||
317 | #define INTMASK_UARTINT1 (1 << INT_UARTINT1) | ||
318 | #define INTMASK_UARTINT2 (1 << INT_UARTINT2) | ||
319 | #define INTMASK_UARTINT3 (1 << INT_UARTINT3) | ||
320 | #define INTMASK_SCIINT (1 << INT_SCIINT) | ||
321 | #define INTMASK_MMCI0A (1 << INT_MMCI0A) | ||
322 | #define INTMASK_MMCI0B (1 << INT_MMCI0B) | ||
323 | #define INTMASK_AACI (1 << INT_AACI) | ||
324 | #define INTMASK_KMI0 (1 << INT_KMI0) | ||
325 | #define INTMASK_KMI1 (1 << INT_KMI1) | ||
326 | #define INTMASK_CHARLCD (1 << INT_CHARLCD) | ||
327 | #define INTMASK_CLCDINT (1 << INT_CLCDINT) | ||
328 | #define INTMASK_DMAINT (1 << INT_DMAINT) | ||
329 | #define INTMASK_PWRFAILINT (1 << INT_PWRFAILINT) | ||
330 | #define INTMASK_PISMO (1 << INT_PISMO) | ||
331 | #define INTMASK_DoC (1 << INT_DoC) | ||
332 | #define INTMASK_ETH (1 << INT_ETH) | ||
333 | #define INTMASK_USB (1 << INT_USB) | ||
334 | #define INTMASK_TSPENINT (1 << INT_TSPENINT) | ||
335 | #define INTMASK_TSKPADINT (1 << INT_TSKPADINT) | ||
336 | |||
337 | #define MAXIRQNUM 31 | ||
338 | #define MAXFIQNUM 31 | ||
339 | #define MAXSWINUM 31 | ||
340 | |||
341 | /* | ||
342 | * Application Flash | ||
343 | * | ||
344 | */ | ||
345 | #define FLASH_BASE REALVIEW_FLASH_BASE | ||
346 | #define FLASH_SIZE REALVIEW_FLASH_SIZE | ||
347 | #define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) | ||
348 | #define FLASH_BLOCK_SIZE SZ_128K | ||
349 | |||
350 | /* | ||
351 | * Boot Flash | ||
352 | * | ||
353 | */ | ||
354 | #define EPROM_BASE REALVIEW_BOOT_ROM_HI | ||
355 | #define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE | ||
356 | #define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) | ||
357 | |||
358 | /* | ||
359 | * Clean base - dummy | ||
360 | * | ||
361 | */ | ||
362 | #define CLEAN_BASE EPROM_BASE | ||
363 | |||
364 | /* | ||
365 | * System controller bit assignment | ||
366 | */ | ||
367 | #define REALVIEW_REFCLK 0 | ||
368 | #define REALVIEW_TIMCLK 1 | ||
369 | |||
370 | #define REALVIEW_TIMER1_EnSel 15 | ||
371 | #define REALVIEW_TIMER2_EnSel 17 | ||
372 | #define REALVIEW_TIMER3_EnSel 19 | ||
373 | #define REALVIEW_TIMER4_EnSel 21 | ||
374 | |||
375 | |||
376 | #define MAX_TIMER 2 | ||
377 | #define MAX_PERIOD 699050 | ||
378 | #define TICKS_PER_uSEC 1 | ||
379 | |||
380 | /* | ||
381 | * These are useconds NOT ticks. | ||
382 | * | ||
383 | */ | ||
384 | #define mSEC_1 1000 | ||
385 | #define mSEC_5 (mSEC_1 * 5) | ||
386 | #define mSEC_10 (mSEC_1 * 10) | ||
387 | #define mSEC_25 (mSEC_1 * 25) | ||
388 | #define SEC_1 (mSEC_1 * 1000) | ||
389 | |||
390 | #define REALVIEW_CSR_BASE 0x10000000 | ||
391 | #define REALVIEW_CSR_SIZE 0x10000000 | ||
392 | |||
393 | #endif | ||
394 | |||
395 | /* END */ | ||
diff --git a/include/asm-arm/arch-realview/system.h b/include/asm-arm/arch-realview/system.h new file mode 100644 index 000000000000..9f8fcbca0869 --- /dev/null +++ b/include/asm-arm/arch-realview/system.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/system.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
22 | #define __ASM_ARCH_SYSTEM_H | ||
23 | |||
24 | #include <asm/hardware.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/arch/platform.h> | ||
27 | |||
28 | static inline void arch_idle(void) | ||
29 | { | ||
30 | /* | ||
31 | * This should do all the clock switching | ||
32 | * and wait for interrupt tricks | ||
33 | */ | ||
34 | cpu_do_idle(); | ||
35 | } | ||
36 | |||
37 | static inline void arch_reset(char mode) | ||
38 | { | ||
39 | unsigned int hdr_ctrl = (IO_ADDRESS(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET); | ||
40 | unsigned int val; | ||
41 | |||
42 | /* | ||
43 | * To reset, we hit the on-board reset register | ||
44 | * in the system FPGA | ||
45 | */ | ||
46 | val = __raw_readl(hdr_ctrl); | ||
47 | val |= REALVIEW_SYS_CTRL_RESET_CONFIGCLR; | ||
48 | __raw_writel(val, hdr_ctrl); | ||
49 | } | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/arch-realview/timex.h b/include/asm-arm/arch-realview/timex.h new file mode 100644 index 000000000000..5b9d82d0a5e0 --- /dev/null +++ b/include/asm-arm/arch-realview/timex.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/timex.h | ||
3 | * | ||
4 | * RealView architecture timex specifications | ||
5 | * | ||
6 | * Copyright (C) 2003 ARM Limited | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #define CLOCK_TICK_RATE (50000000 / 16) | ||
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h new file mode 100644 index 000000000000..b5e4d360665b --- /dev/null +++ b/include/asm-arm/arch-realview/uncompress.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <asm/hardware.h> | ||
21 | |||
22 | #define AMBA_UART_DR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x00)) | ||
23 | #define AMBA_UART_LCRH (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x2c)) | ||
24 | #define AMBA_UART_CR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x30)) | ||
25 | #define AMBA_UART_FR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x18)) | ||
26 | |||
27 | /* | ||
28 | * This does not append a newline | ||
29 | */ | ||
30 | static void putstr(const char *s) | ||
31 | { | ||
32 | while (*s) { | ||
33 | while (AMBA_UART_FR & (1 << 5)) | ||
34 | barrier(); | ||
35 | |||
36 | AMBA_UART_DR = *s; | ||
37 | |||
38 | if (*s == '\n') { | ||
39 | while (AMBA_UART_FR & (1 << 5)) | ||
40 | barrier(); | ||
41 | |||
42 | AMBA_UART_DR = '\r'; | ||
43 | } | ||
44 | s++; | ||
45 | } | ||
46 | while (AMBA_UART_FR & (1 << 3)) | ||
47 | barrier(); | ||
48 | } | ||
49 | |||
50 | /* | ||
51 | * nothing to do | ||
52 | */ | ||
53 | #define arch_decomp_setup() | ||
54 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-realview/vmalloc.h b/include/asm-arm/arch-realview/vmalloc.h new file mode 100644 index 000000000000..0ad49af186af --- /dev/null +++ b/include/asm-arm/arch-realview/vmalloc.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited | ||
5 | * Copyright (C) 2000 Russell King. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #define VMALLOC_END (PAGE_OFFSET + 0x18000000) | ||
diff --git a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h index 24453c405a87..b4da08d7a336 100644 --- a/include/asm-arm/arch-rpc/io.h +++ b/include/asm-arm/arch-rpc/io.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __ASM_ARM_ARCH_IO_H | 13 | #ifndef __ASM_ARM_ARCH_IO_H |
14 | #define __ASM_ARM_ARCH_IO_H | 14 | #define __ASM_ARM_ARCH_IO_H |
15 | 15 | ||
16 | #include <asm/hardware.h> | ||
17 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
17 | 19 | ||
18 | /* | 20 | /* |
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/fb.h b/include/asm-arm/arch-s3c2410/fb.h index ac57bc887d82..4790491ba9d0 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h | |||
@@ -13,6 +13,7 @@ | |||
13 | * 07-Sep-2004 RTP Created file | 13 | * 07-Sep-2004 RTP Created file |
14 | * 03-Nov-2004 BJD Updated and minor cleanups | 14 | * 03-Nov-2004 BJD Updated and minor cleanups |
15 | * 03-Aug-2005 RTP Renamed to fb.h | 15 | * 03-Aug-2005 RTP Renamed to fb.h |
16 | * 26-Oct-2005 BJD Changed name of platdata init | ||
16 | */ | 17 | */ |
17 | 18 | ||
18 | #ifndef __ASM_ARM_FB_H | 19 | #ifndef __ASM_ARM_FB_H |
@@ -64,6 +65,6 @@ struct s3c2410fb_mach_info { | |||
64 | unsigned long lpcsel; | 65 | unsigned long lpcsel; |
65 | }; | 66 | }; |
66 | 67 | ||
67 | void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info); | 68 | extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *); |
68 | 69 | ||
69 | #endif /* __ASM_ARM_FB_H */ | 70 | #endif /* __ASM_ARM_FB_H */ |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 4bf272ed9add..16fbc8afffd9 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 15 | #ifndef __ASM_ARM_ARCH_IO_H |
16 | #define __ASM_ARM_ARCH_IO_H | 16 | #define __ASM_ARM_ARCH_IO_H |
17 | 17 | ||
18 | #include <asm/hardware.h> | ||
19 | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | 20 | #define IO_SPACE_LIMIT 0xffffffff |
19 | 21 | ||
20 | /* | 22 | /* |
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-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 2053cbacffc3..cb33d57c146c 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -20,6 +20,7 @@ | |||
20 | * 18-11-2004 BJD Added S3C2440 AC97 controls | 20 | * 18-11-2004 BJD Added S3C2440 AC97 controls |
21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | 22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 |
23 | * 26-Oct-2005 BJD Added generic configuration types | ||
23 | */ | 24 | */ |
24 | 25 | ||
25 | 26 | ||
@@ -43,6 +44,11 @@ | |||
43 | /* general configuration options */ | 44 | /* general configuration options */ |
44 | 45 | ||
45 | #define S3C2410_GPIO_LEAVE (0xFFFFFFFF) | 46 | #define S3C2410_GPIO_LEAVE (0xFFFFFFFF) |
47 | #define S3C2410_GPIO_INPUT (0xFFFFFFF0) | ||
48 | #define S3C2410_GPIO_OUTPUT (0xFFFFFFF1) | ||
49 | #define S3C2410_GPIO_IRQ (0xFFFFFFF2) /* not available for all */ | ||
50 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ | ||
51 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ | ||
46 | 52 | ||
47 | /* configure GPIO ports A..G */ | 53 | /* configure GPIO ports A..G */ |
48 | 54 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index fdd62e8cd6cb..7fdde9b91cb4 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #define S3C2410_IISMOD_16FS (0<<0) | 55 | #define S3C2410_IISMOD_16FS (0<<0) |
56 | #define S3C2410_IISMOD_32FS (1<<0) | 56 | #define S3C2410_IISMOD_32FS (1<<0) |
57 | #define S3C2410_IISMOD_48FS (2<<0) | 57 | #define S3C2410_IISMOD_48FS (2<<0) |
58 | #define S3C2410_IISMOD_FS_MASK (3<<0) | ||
58 | 59 | ||
59 | #define S3C2410_IISPSR (0x08) | 60 | #define S3C2410_IISPSR (0x08) |
60 | #define S3C2410_IISPSR_INTMASK (31<<5) | 61 | #define S3C2410_IISPSR_INTMASK (31<<5) |
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h index 19c3b1e186bb..28711aaa4968 100644 --- a/include/asm-arm/arch-sa1100/hardware.h +++ b/include/asm-arm/arch-sa1100/hardware.h | |||
@@ -22,13 +22,6 @@ | |||
22 | 22 | ||
23 | 23 | ||
24 | /* | 24 | /* |
25 | * We requires absolute addresses i.e. (PCMCIA_IO_0_BASE + 0x3f8) for | ||
26 | * in*()/out*() macros to be usable for all cases. | ||
27 | */ | ||
28 | #define PCIO_BASE 0 | ||
29 | |||
30 | |||
31 | /* | ||
32 | * SA1100 internal I/O mappings | 25 | * SA1100 internal I/O mappings |
33 | * | 26 | * |
34 | * We have the following mapping: | 27 | * We have the following mapping: |
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h index 7d969ffbd3bb..9d4fe6cf205b 100644 --- a/include/asm-arm/arch-sa1100/io.h +++ b/include/asm-arm/arch-sa1100/io.h | |||
@@ -10,13 +10,19 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #include <asm/hardware.h> | ||
14 | |||
13 | #define IO_SPACE_LIMIT 0xffffffff | 15 | #define IO_SPACE_LIMIT 0xffffffff |
14 | 16 | ||
15 | /* | 17 | /* |
16 | * We don't actually have real ISA nor PCI buses, but there is so many | 18 | * We don't actually have real ISA nor PCI buses, but there is so many |
17 | * drivers out there that might just work if we fake them... | 19 | * drivers out there that might just work if we fake them... |
18 | */ | 20 | */ |
19 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | 21 | static inline void __iomem *__io(unsigned long addr) |
22 | { | ||
23 | return (void __iomem *)addr; | ||
24 | } | ||
25 | #define __io(a) __io(a) | ||
20 | #define __mem_pci(a) (a) | 26 | #define __mem_pci(a) (a) |
21 | #define __mem_isa(a) (a) | 27 | #define __mem_isa(a) (a) |
22 | 28 | ||
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-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h index 6f52118ba1a4..0f0612f79b2b 100644 --- a/include/asm-arm/arch-sa1100/system.h +++ b/include/asm-arm/arch-sa1100/system.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> | 4 | * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> |
5 | */ | 5 | */ |
6 | #include <linux/config.h> | 6 | #include <linux/config.h> |
7 | #include <asm/hardware.h> | ||
7 | 8 | ||
8 | static inline void arch_idle(void) | 9 | static inline void arch_idle(void) |
9 | { | 10 | { |
diff --git a/include/asm-arm/arch-shark/io.h b/include/asm-arm/arch-shark/io.h index 5e6ed0038b2b..87ffa27f2962 100644 --- a/include/asm-arm/arch-shark/io.h +++ b/include/asm-arm/arch-shark/io.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_ARM_ARCH_IO_H | 11 | #ifndef __ASM_ARM_ARCH_IO_H |
12 | #define __ASM_ARM_ARCH_IO_H | 12 | #define __ASM_ARM_ARCH_IO_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | ||
15 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
15 | 17 | ||
16 | /* | 18 | /* |
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/cpu.h b/include/asm-arm/cpu.h index fcbdd40cb667..751bc7462074 100644 --- a/include/asm-arm/cpu.h +++ b/include/asm-arm/cpu.h | |||
@@ -16,6 +16,7 @@ | |||
16 | struct cpuinfo_arm { | 16 | struct cpuinfo_arm { |
17 | struct cpu cpu; | 17 | struct cpu cpu; |
18 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
19 | struct task_struct *idle; | ||
19 | unsigned int loops_per_jiffy; | 20 | unsigned int loops_per_jiffy; |
20 | #endif | 21 | #endif |
21 | }; | 22 | }; |
diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h index ce4cf5c1c05d..6b8d73dc1ab0 100644 --- a/include/asm-arm/hardware/amba_clcd.h +++ b/include/asm-arm/hardware/amba_clcd.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define CLCD_UBAS 0x00000010 | 22 | #define CLCD_UBAS 0x00000010 |
23 | #define CLCD_LBAS 0x00000014 | 23 | #define CLCD_LBAS 0x00000014 |
24 | 24 | ||
25 | #ifndef CONFIG_ARCH_VERSATILE | 25 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) |
26 | #define CLCD_IENB 0x00000018 | 26 | #define CLCD_IENB 0x00000018 |
27 | #define CLCD_CNTL 0x0000001c | 27 | #define CLCD_CNTL 0x0000001c |
28 | #else | 28 | #else |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 5c4ae8f5dbb0..2e6799632f12 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
28 | #include <asm/memory.h> | 28 | #include <asm/memory.h> |
29 | #include <asm/arch/hardware.h> | ||
30 | 29 | ||
31 | /* | 30 | /* |
32 | * ISA I/O bus memory addresses are 1:1 with the physical address. | 31 | * ISA I/O bus memory addresses are 1:1 with the physical address. |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index f97912fbb10f..59975ee43cf1 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -47,5 +47,6 @@ struct irqaction; | |||
47 | struct pt_regs; | 47 | struct pt_regs; |
48 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | 48 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); |
49 | 49 | ||
50 | extern void migrate_irqs(void); | ||
50 | #endif | 51 | #endif |
51 | 52 | ||
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 4fa95084a8c0..eb262e078c46 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
@@ -48,10 +48,11 @@ struct machine_desc { | |||
48 | * Set of macros to define architecture features. This is built into | 48 | * Set of macros to define architecture features. This is built into |
49 | * a table by the linker. | 49 | * a table by the linker. |
50 | */ | 50 | */ |
51 | #define MACHINE_START(_type,_name) \ | 51 | #define MACHINE_START(_type,_name) \ |
52 | const struct machine_desc __mach_desc_##_type \ | 52 | static 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, |
56 | 57 | ||
57 | #define MACHINE_END \ | 58 | #define MACHINE_END \ |
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 | */ |
24 | struct flash_platform_data { | 25 | struct 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 9ac47cf8d2e4..b338936bde4f 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | struct map_desc { | 12 | struct map_desc { |
13 | unsigned long virtual; | 13 | unsigned long virtual; |
14 | unsigned long physical; | 14 | unsigned long pfn; |
15 | unsigned long length; | 15 | unsigned long length; |
16 | unsigned int type; | 16 | unsigned int type; |
17 | }; | 17 | }; |
@@ -27,6 +27,9 @@ 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) | ||
31 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) | ||
32 | |||
30 | extern void create_memmap_holes(struct meminfo *); | 33 | extern void create_memmap_holes(struct meminfo *); |
31 | extern void memtable_init(struct meminfo *); | 34 | extern void memtable_init(struct meminfo *); |
32 | extern void iotable_init(struct map_desc *, int); | 35 | extern void iotable_init(struct map_desc *, int); |
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 | /* |
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 4af9c411c617..57b8def83d41 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
@@ -86,7 +86,8 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
86 | cpu_set(cpu, next->cpu_vm_mask); | 86 | cpu_set(cpu, next->cpu_vm_mask); |
87 | check_context(next); | 87 | check_context(next); |
88 | cpu_switch_mm(next->pgd, next); | 88 | cpu_switch_mm(next->pgd, next); |
89 | cpu_clear(cpu, prev->cpu_vm_mask); | 89 | if (cache_is_vivt()) |
90 | cpu_clear(cpu, prev->cpu_vm_mask); | ||
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 366bafbdfbb1..5a0d19b466b0 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -397,9 +397,6 @@ static inline pte_t *pmd_page_kernel(pmd_t pmd) | |||
397 | #define pgd_clear(pgdp) do { } while (0) | 397 | #define pgd_clear(pgdp) do { } while (0) |
398 | #define set_pgd(pgd,pgdp) do { } while (0) | 398 | #define set_pgd(pgd,pgdp) do { } while (0) |
399 | 399 | ||
400 | #define page_pte_prot(page,prot) mk_pte(page, prot) | ||
401 | #define page_pte(page) mk_pte(page, __pgprot(0)) | ||
402 | |||
403 | /* to find an entry in a page-table-directory */ | 400 | /* to find an entry in a page-table-directory */ |
404 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) | 401 | #define pgd_index(addr) ((addr) >> PGDIR_SHIFT) |
405 | 402 | ||
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h index 60f33e6eb800..71ca7d412687 100644 --- a/include/asm-arm/semaphore.h +++ b/include/asm-arm/semaphore.h | |||
@@ -24,8 +24,6 @@ struct semaphore { | |||
24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | 24 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ |
25 | } | 25 | } |
26 | 26 | ||
27 | #define __MUTEX_INITIALIZER(name) __SEMAPHORE_INIT(name,1) | ||
28 | |||
29 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 27 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
30 | struct semaphore name = __SEMAPHORE_INIT(name,count) | 28 | struct semaphore name = __SEMAPHORE_INIT(name,count) |
31 | 29 | ||
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index dbb4d859c586..551cd3c3093c 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -66,4 +66,14 @@ struct secondary_data { | |||
66 | }; | 66 | }; |
67 | extern struct secondary_data secondary_data; | 67 | extern struct secondary_data secondary_data; |
68 | 68 | ||
69 | extern int __cpu_disable(void); | ||
70 | extern int mach_cpu_disable(unsigned int cpu); | ||
71 | |||
72 | extern void __cpu_die(unsigned int cpu); | ||
73 | extern void cpu_die(void); | ||
74 | |||
75 | extern void platform_cpu_die(unsigned int cpu); | ||
76 | extern int platform_cpu_kill(unsigned int cpu); | ||
77 | extern void platform_cpu_enable(unsigned int cpu); | ||
78 | |||
69 | #endif /* ifndef __ASM_ARM_SMP_H */ | 79 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index cb4906b45555..6ed4f916b166 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -80,7 +80,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
80 | */ | 80 | */ |
81 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) | 81 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) |
82 | 82 | ||
83 | static inline void __raw_write_lock(rwlock_t *rw) | 83 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
84 | { | 84 | { |
85 | unsigned long tmp; | 85 | unsigned long tmp; |
86 | 86 | ||
@@ -97,7 +97,7 @@ static inline void __raw_write_lock(rwlock_t *rw) | |||
97 | smp_mb(); | 97 | smp_mb(); |
98 | } | 98 | } |
99 | 99 | ||
100 | static inline int __raw_write_trylock(rwlock_t *rw) | 100 | static inline int __raw_write_trylock(raw_rwlock_t *rw) |
101 | { | 101 | { |
102 | unsigned long tmp; | 102 | unsigned long tmp; |
103 | 103 | ||
@@ -157,7 +157,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
157 | smp_mb(); | 157 | smp_mb(); |
158 | } | 158 | } |
159 | 159 | ||
160 | static inline void __raw_read_unlock(rwlock_t *rw) | 160 | static inline void __raw_read_unlock(raw_rwlock_t *rw) |
161 | { | 161 | { |
162 | unsigned long tmp, tmp2; | 162 | unsigned long tmp, tmp2; |
163 | 163 | ||
diff --git a/include/asm-arm/tlb.h b/include/asm-arm/tlb.h index 9bb325c54645..f49bfb78c221 100644 --- a/include/asm-arm/tlb.h +++ b/include/asm-arm/tlb.h | |||
@@ -27,11 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | struct mmu_gather { | 28 | struct mmu_gather { |
29 | struct mm_struct *mm; | 29 | struct mm_struct *mm; |
30 | unsigned int freed; | ||
31 | unsigned int fullmm; | 30 | unsigned int fullmm; |
32 | |||
33 | unsigned int flushes; | ||
34 | unsigned int avoided_flushes; | ||
35 | }; | 31 | }; |
36 | 32 | ||
37 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | 33 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); |
@@ -39,11 +35,9 @@ DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
39 | static inline struct mmu_gather * | 35 | static inline struct mmu_gather * |
40 | tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | 36 | tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) |
41 | { | 37 | { |
42 | int cpu = smp_processor_id(); | 38 | struct mmu_gather *tlb = &get_cpu_var(mmu_gathers); |
43 | struct mmu_gather *tlb = &per_cpu(mmu_gathers, cpu); | ||
44 | 39 | ||
45 | tlb->mm = mm; | 40 | tlb->mm = mm; |
46 | tlb->freed = 0; | ||
47 | tlb->fullmm = full_mm_flush; | 41 | tlb->fullmm = full_mm_flush; |
48 | 42 | ||
49 | return tlb; | 43 | return tlb; |
@@ -52,24 +46,13 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | |||
52 | static inline void | 46 | static inline void |
53 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) | 47 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) |
54 | { | 48 | { |
55 | struct mm_struct *mm = tlb->mm; | ||
56 | unsigned long freed = tlb->freed; | ||
57 | int rss = get_mm_counter(mm, rss); | ||
58 | |||
59 | if (rss < freed) | ||
60 | freed = rss; | ||
61 | add_mm_counter(mm, rss, -freed); | ||
62 | |||
63 | if (tlb->fullmm) | 49 | if (tlb->fullmm) |
64 | flush_tlb_mm(mm); | 50 | flush_tlb_mm(tlb->mm); |
65 | 51 | ||
66 | /* keep the page table cache within bounds */ | 52 | /* keep the page table cache within bounds */ |
67 | check_pgt_cache(); | 53 | check_pgt_cache(); |
68 | } | ||
69 | 54 | ||
70 | static inline unsigned int tlb_is_full_mm(struct mmu_gather *tlb) | 55 | put_cpu_var(mmu_gathers); |
71 | { | ||
72 | return tlb->fullmm; | ||
73 | } | 56 | } |
74 | 57 | ||
75 | #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) | 58 | #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index c49df635a80f..d626e70faded 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -544,7 +544,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
544 | asmlinkage int sys_fork(struct pt_regs *regs); | 544 | asmlinkage int sys_fork(struct pt_regs *regs); |
545 | asmlinkage int sys_vfork(struct pt_regs *regs); | 545 | asmlinkage int sys_vfork(struct pt_regs *regs); |
546 | asmlinkage int sys_pipe(unsigned long *fildes); | 546 | asmlinkage int sys_pipe(unsigned long *fildes); |
547 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
548 | struct sigaction; | 547 | struct sigaction; |
549 | asmlinkage long sys_rt_sigaction(int sig, | 548 | asmlinkage long sys_rt_sigaction(int sig, |
550 | const struct sigaction __user *act, | 549 | const struct sigaction __user *act, |