diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 21:02:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 21:02:10 -0400 |
commit | 820d41cf0cd0e94a5661e093821e2e5c6b36a9d8 (patch) | |
tree | 4d03046048dc52a8fa539c7e7b846e02738d8ca5 /arch/arm/mach-tegra/include | |
parent | 6268b325c3066234e7bddb99d2b98bcedb0c0033 (diff) | |
parent | 88b48684fe2d4f6207223423227c80d5408bccaf (diff) |
Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull "ARM: cleanups of io includes" from Olof Johansson:
"Rob Herring has done a sweeping change cleaning up all of the
mach/io.h includes, moving some of the oft-repeated macros to a common
location and removing a bunch of boiler plate. This is another step
closer to a common zImage for multiple platforms."
Fix up various fairly trivial conflicts (<mach/io.h> removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).
* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
ARM: tegra: Include assembler.h in sleep.S to fix build break
ARM: pxa: use common IOMEM definition
ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
ARM: __io abuse cleanup
ARM: create a common IOMEM definition
ARM: iop13xx: fix missing declaration of iop13xx_init_early
ARM: fix ioremap/iounmap for !CONFIG_MMU
ARM: kill off __mem_pci
ARM: remove bunch of now unused mach/io.h files
ARM: make mach/io.h include optional
ARM: clps711x: remove unneeded include of mach/io.h
ARM: dove: add explicit include of dove.h to addr-map.c
ARM: at91: add explicit include of hardware.h to uncompressor
ARM: ep93xx: clean-up mach/io.h
ARM: tegra: clean-up mach/io.h
ARM: orion5x: clean-up mach/io.h
ARM: davinci: remove unneeded mach/io.h include
[media] davinci: remove includes of mach/io.h
ARM: OMAP: Remove remaining includes for mach/io.h
ARM: msm: clean-up mach/io.h
...
Diffstat (limited to 'arch/arm/mach-tegra/include')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/debug-macro.S | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/io.h | 49 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/iomap.h | 42 |
3 files changed, 42 insertions, 50 deletions
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S index 90069abd37bd..8ce0661b8a3d 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/mach-tegra/include/mach/debug-macro.S | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/serial_reg.h> | 27 | #include <linux/serial_reg.h> |
28 | 28 | ||
29 | #include <mach/io.h> | ||
30 | #include <mach/iomap.h> | 29 | #include <mach/iomap.h> |
31 | #include <mach/irammap.h> | 30 | #include <mach/irammap.h> |
32 | 31 | ||
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h index f15defffb5d2..fe700f9ce7dc 100644 --- a/arch/arm/mach-tegra/include/mach/io.h +++ b/arch/arm/mach-tegra/include/mach/io.h | |||
@@ -23,56 +23,8 @@ | |||
23 | 23 | ||
24 | #define IO_SPACE_LIMIT 0xffff | 24 | #define IO_SPACE_LIMIT 0xffff |
25 | 25 | ||
26 | /* On TEGRA, many peripherals are very closely packed in | ||
27 | * two 256MB io windows (that actually only use about 64KB | ||
28 | * at the start of each). | ||
29 | * | ||
30 | * We will just map the first 1MB of each window (to minimize | ||
31 | * pt entries needed) and provide a macro to transform physical | ||
32 | * io addresses to an appropriate void __iomem *. | ||
33 | * | ||
34 | */ | ||
35 | |||
36 | #ifdef __ASSEMBLY__ | ||
37 | #define IOMEM(x) (x) | ||
38 | #else | ||
39 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
40 | #endif | ||
41 | |||
42 | #define IO_IRAM_PHYS 0x40000000 | ||
43 | #define IO_IRAM_VIRT IOMEM(0xFE400000) | ||
44 | #define IO_IRAM_SIZE SZ_256K | ||
45 | |||
46 | #define IO_CPU_PHYS 0x50040000 | ||
47 | #define IO_CPU_VIRT IOMEM(0xFE000000) | ||
48 | #define IO_CPU_SIZE SZ_16K | ||
49 | |||
50 | #define IO_PPSB_PHYS 0x60000000 | ||
51 | #define IO_PPSB_VIRT IOMEM(0xFE200000) | ||
52 | #define IO_PPSB_SIZE SZ_1M | ||
53 | |||
54 | #define IO_APB_PHYS 0x70000000 | ||
55 | #define IO_APB_VIRT IOMEM(0xFE300000) | ||
56 | #define IO_APB_SIZE SZ_1M | ||
57 | |||
58 | #define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) | ||
59 | #define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst))) | ||
60 | |||
61 | #define IO_TO_VIRT(n) ( \ | ||
62 | IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \ | ||
63 | IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \ | ||
64 | IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \ | ||
65 | IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \ | ||
66 | IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \ | ||
67 | IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \ | ||
68 | IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \ | ||
69 | IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \ | ||
70 | NULL) | ||
71 | |||
72 | #ifndef __ASSEMBLER__ | 26 | #ifndef __ASSEMBLER__ |
73 | 27 | ||
74 | #define IO_ADDRESS(n) (IO_TO_VIRT(n)) | ||
75 | |||
76 | #ifdef CONFIG_TEGRA_PCI | 28 | #ifdef CONFIG_TEGRA_PCI |
77 | extern void __iomem *tegra_pcie_io_base; | 29 | extern void __iomem *tegra_pcie_io_base; |
78 | 30 | ||
@@ -88,7 +40,6 @@ static inline void __iomem *__io(unsigned long addr) | |||
88 | #endif | 40 | #endif |
89 | 41 | ||
90 | #define __io(a) __io(a) | 42 | #define __io(a) __io(a) |
91 | #define __mem_pci(a) (a) | ||
92 | 43 | ||
93 | #endif | 44 | #endif |
94 | 45 | ||
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h index cff672a344f4..7e76da73121c 100644 --- a/arch/arm/mach-tegra/include/mach/iomap.h +++ b/arch/arm/mach-tegra/include/mach/iomap.h | |||
@@ -277,4 +277,46 @@ | |||
277 | # define TEGRA_DEBUG_UART_BASE TEGRA_UARTE_BASE | 277 | # define TEGRA_DEBUG_UART_BASE TEGRA_UARTE_BASE |
278 | #endif | 278 | #endif |
279 | 279 | ||
280 | /* On TEGRA, many peripherals are very closely packed in | ||
281 | * two 256MB io windows (that actually only use about 64KB | ||
282 | * at the start of each). | ||
283 | * | ||
284 | * We will just map the first 1MB of each window (to minimize | ||
285 | * pt entries needed) and provide a macro to transform physical | ||
286 | * io addresses to an appropriate void __iomem *. | ||
287 | * | ||
288 | */ | ||
289 | |||
290 | #define IO_IRAM_PHYS 0x40000000 | ||
291 | #define IO_IRAM_VIRT IOMEM(0xFE400000) | ||
292 | #define IO_IRAM_SIZE SZ_256K | ||
293 | |||
294 | #define IO_CPU_PHYS 0x50040000 | ||
295 | #define IO_CPU_VIRT IOMEM(0xFE000000) | ||
296 | #define IO_CPU_SIZE SZ_16K | ||
297 | |||
298 | #define IO_PPSB_PHYS 0x60000000 | ||
299 | #define IO_PPSB_VIRT IOMEM(0xFE200000) | ||
300 | #define IO_PPSB_SIZE SZ_1M | ||
301 | |||
302 | #define IO_APB_PHYS 0x70000000 | ||
303 | #define IO_APB_VIRT IOMEM(0xFE300000) | ||
304 | #define IO_APB_SIZE SZ_1M | ||
305 | |||
306 | #define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) | ||
307 | #define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst))) | ||
308 | |||
309 | #define IO_TO_VIRT(n) ( \ | ||
310 | IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \ | ||
311 | IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \ | ||
312 | IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \ | ||
313 | IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \ | ||
314 | IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \ | ||
315 | IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \ | ||
316 | IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \ | ||
317 | IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \ | ||
318 | NULL) | ||
319 | |||
320 | #define IO_ADDRESS(n) (IO_TO_VIRT(n)) | ||
321 | |||
280 | #endif | 322 | #endif |