aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/dma-mapping.h7
-rw-r--r--arch/arm/include/debug/imx.S62
2 files changed, 62 insertions, 7 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 23004847bb05..8ea02ac3ec1a 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -211,13 +211,6 @@ static inline void dma_free_writecombine(struct device *dev, size_t size,
211extern void __init init_dma_coherent_pool_size(unsigned long size); 211extern void __init init_dma_coherent_pool_size(unsigned long size);
212 212
213/* 213/*
214 * This can be called during boot to increase the size of the consistent
215 * DMA region above it's default value of 2MB. It must be called before the
216 * memory allocator is initialised, i.e. before any core_initcall.
217 */
218static inline void init_consistent_dma_size(unsigned long size) { }
219
220/*
221 * For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic" 214 * For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic"
222 * and utilize bounce buffers as needed to work around limited DMA windows. 215 * and utilize bounce buffers as needed to work around limited DMA windows.
223 * 216 *
diff --git a/arch/arm/include/debug/imx.S b/arch/arm/include/debug/imx.S
new file mode 100644
index 000000000000..0b65d792f664
--- /dev/null
+++ b/arch/arm/include/debug/imx.S
@@ -0,0 +1,62 @@
1/* arch/arm/mach-imx/include/mach/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#ifdef CONFIG_DEBUG_IMX1_UART
14#define UART_PADDR 0x00206000
15#elif defined (CONFIG_DEBUG_IMX25_UART)
16#define UART_PADDR 0x43f90000
17#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
18#define UART_PADDR 0x1000a000
19#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
20#define UART_PADDR 0x43f90000
21#elif defined (CONFIG_DEBUG_IMX51_UART)
22#define UART_PADDR 0x73fbc000
23#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
24#define UART_PADDR 0x53fbc000
25#elif defined (CONFIG_DEBUG_IMX6Q_UART2)
26#define UART_PADDR 0x021e8000
27#elif defined (CONFIG_DEBUG_IMX6Q_UART4)
28#define UART_PADDR 0x021f0000
29#endif
30
31/*
32 * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
33 * stay sync with that. It's hard to maintain, and should be fixed
34 * globally for multi-platform build to use a fixed virtual address
35 * for low-level debug uart port across platforms.
36 */
37#define IMX_IO_P2V(x) ( \
38 (((x) & 0x80000000) >> 7) | \
39 (0xf4000000 + \
40 (((x) & 0x50000000) >> 6) + \
41 (((x) & 0x0b000000) >> 4) + \
42 (((x) & 0x000fffff))))
43
44#define UART_VADDR IMX_IO_P2V(UART_PADDR)
45
46 .macro addruart, rp, rv, tmp
47 ldr \rp, =UART_PADDR @ physical
48 ldr \rv, =UART_VADDR @ virtual
49 .endm
50
51 .macro senduart,rd,rx
52 str \rd, [\rx, #0x40] @ TXDATA
53 .endm
54
55 .macro waituart,rd,rx
56 .endm
57
58 .macro busyuart,rd,rx
591002: ldr \rd, [\rx, #0x98] @ SR2
60 tst \rd, #1 << 3 @ TXDC
61 beq 1002b @ wait until transmit done
62 .endm