diff options
Diffstat (limited to 'arch/arm/include/debug')
| -rw-r--r-- | arch/arm/include/debug/imx-uart.h | 10 | ||||
| -rw-r--r-- | arch/arm/include/debug/keystone.S | 43 | ||||
| -rw-r--r-- | arch/arm/include/debug/mvebu.S | 5 | ||||
| -rw-r--r-- | arch/arm/include/debug/rockchip.S | 42 | ||||
| -rw-r--r-- | arch/arm/include/debug/u300.S | 18 |
5 files changed, 118 insertions, 0 deletions
diff --git a/arch/arm/include/debug/imx-uart.h b/arch/arm/include/debug/imx-uart.h index 91d38e38a0b4..29da84e183f4 100644 --- a/arch/arm/include/debug/imx-uart.h +++ b/arch/arm/include/debug/imx-uart.h | |||
| @@ -65,6 +65,14 @@ | |||
| 65 | #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR | 65 | #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR |
| 66 | #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) | 66 | #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) |
| 67 | 67 | ||
| 68 | #define IMX6SL_UART1_BASE_ADDR 0x02020000 | ||
| 69 | #define IMX6SL_UART2_BASE_ADDR 0x02024000 | ||
| 70 | #define IMX6SL_UART3_BASE_ADDR 0x02034000 | ||
| 71 | #define IMX6SL_UART4_BASE_ADDR 0x02038000 | ||
| 72 | #define IMX6SL_UART5_BASE_ADDR 0x02018000 | ||
| 73 | #define IMX6SL_UART_BASE_ADDR(n) IMX6SL_UART##n##_BASE_ADDR | ||
| 74 | #define IMX6SL_UART_BASE(n) IMX6SL_UART_BASE_ADDR(n) | ||
| 75 | |||
| 68 | #define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT) | 76 | #define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT) |
| 69 | 77 | ||
| 70 | #ifdef CONFIG_DEBUG_IMX1_UART | 78 | #ifdef CONFIG_DEBUG_IMX1_UART |
| @@ -83,6 +91,8 @@ | |||
| 83 | #define UART_PADDR IMX_DEBUG_UART_BASE(IMX53) | 91 | #define UART_PADDR IMX_DEBUG_UART_BASE(IMX53) |
| 84 | #elif defined(CONFIG_DEBUG_IMX6Q_UART) | 92 | #elif defined(CONFIG_DEBUG_IMX6Q_UART) |
| 85 | #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q) | 93 | #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q) |
| 94 | #elif defined(CONFIG_DEBUG_IMX6SL_UART) | ||
| 95 | #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SL) | ||
| 86 | #endif | 96 | #endif |
| 87 | 97 | ||
| 88 | #endif /* __DEBUG_IMX_UART_H */ | 98 | #endif /* __DEBUG_IMX_UART_H */ |
diff --git a/arch/arm/include/debug/keystone.S b/arch/arm/include/debug/keystone.S new file mode 100644 index 000000000000..9aef9ba3f4f0 --- /dev/null +++ b/arch/arm/include/debug/keystone.S | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * Early serial debug output macro for Keystone SOCs | ||
| 3 | * | ||
| 4 | * Copyright 2013 Texas Instruments, Inc. | ||
| 5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 6 | * | ||
| 7 | * Based on RMKs low level debug code. | ||
| 8 | * Copyright (C) 1994-1999 Russell King | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/serial_reg.h> | ||
| 16 | |||
| 17 | #define UART_SHIFT 2 | ||
| 18 | #if defined(CONFIG_DEBUG_KEYSTONE_UART0) | ||
| 19 | #define UART_PHYS 0x02530c00 | ||
| 20 | #define UART_VIRT 0xfeb30c00 | ||
| 21 | #elif defined(CONFIG_DEBUG_KEYSTONE_UART1) | ||
| 22 | #define UART_PHYS 0x02531000 | ||
| 23 | #define UART_VIRT 0xfeb31000 | ||
| 24 | #endif | ||
| 25 | |||
| 26 | .macro addruart, rp, rv, tmp | ||
| 27 | ldr \rv, =UART_VIRT @ physical base address | ||
| 28 | ldr \rp, =UART_PHYS @ virtual base address | ||
| 29 | .endm | ||
| 30 | |||
| 31 | .macro senduart,rd,rx | ||
| 32 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
| 33 | .endm | ||
| 34 | |||
| 35 | .macro busyuart,rd,rx | ||
| 36 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
| 37 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 38 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 39 | bne 1002b | ||
| 40 | .endm | ||
| 41 | |||
| 42 | .macro waituart,rd,rx | ||
| 43 | .endm | ||
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S index df191afa3be1..6517311a1c91 100644 --- a/arch/arm/include/debug/mvebu.S +++ b/arch/arm/include/debug/mvebu.S | |||
| @@ -11,7 +11,12 @@ | |||
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifdef CONFIG_DEBUG_MVEBU_UART_ALTERNATE | ||
| 15 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xf1000000 | ||
| 16 | #else | ||
| 14 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | 17 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 |
| 18 | #endif | ||
| 19 | |||
| 15 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000 | 20 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfec00000 |
| 16 | 21 | ||
| 17 | .macro addruart, rp, rv, tmp | 22 | .macro addruart, rp, rv, tmp |
diff --git a/arch/arm/include/debug/rockchip.S b/arch/arm/include/debug/rockchip.S new file mode 100644 index 000000000000..cfd883e69588 --- /dev/null +++ b/arch/arm/include/debug/rockchip.S | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* | ||
| 2 | * Early serial output macro for Rockchip SoCs | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Maxime Ripard | ||
| 5 | * | ||
| 6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
| 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 | #if defined(CONFIG_DEBUG_RK29_UART0) | ||
| 14 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20060000 | ||
| 15 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed60000 | ||
| 16 | #elif defined(CONFIG_DEBUG_RK29_UART1) | ||
| 17 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 | ||
| 18 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 | ||
| 19 | #elif defined(CONFIG_DEBUG_RK29_UART2) | ||
| 20 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 | ||
| 21 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 | ||
| 22 | #elif defined(CONFIG_DEBUG_RK3X_UART0) | ||
| 23 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10124000 | ||
| 24 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb24000 | ||
| 25 | #elif defined(CONFIG_DEBUG_RK3X_UART1) | ||
| 26 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10126000 | ||
| 27 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb26000 | ||
| 28 | #elif defined(CONFIG_DEBUG_RK3X_UART2) | ||
| 29 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000 | ||
| 30 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000 | ||
| 31 | #elif defined(CONFIG_DEBUG_RK3X_UART3) | ||
| 32 | #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000 | ||
| 33 | #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | .macro addruart, rp, rv, tmp | ||
| 37 | ldr \rp, =ROCKCHIP_UART_DEBUG_PHYS_BASE | ||
| 38 | ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE | ||
| 39 | .endm | ||
| 40 | |||
| 41 | #define UART_SHIFT 2 | ||
| 42 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/u300.S b/arch/arm/include/debug/u300.S new file mode 100644 index 000000000000..6f04f08a203c --- /dev/null +++ b/arch/arm/include/debug/u300.S | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006-2013 ST-Ericsson AB | ||
| 3 | * License terms: GNU General Public License (GPL) version 2 | ||
| 4 | * Debugging macro include header. | ||
| 5 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
| 6 | */ | ||
| 7 | #define U300_SLOW_PER_PHYS_BASE 0xc0010000 | ||
| 8 | #define U300_SLOW_PER_VIRT_BASE 0xff000000 | ||
| 9 | |||
| 10 | .macro addruart, rp, rv, tmp | ||
| 11 | /* If we move the address using MMU, use this. */ | ||
| 12 | ldr \rp, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address | ||
| 13 | ldr \rv, = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address | ||
| 14 | orr \rp, \rp, #0x00003000 | ||
| 15 | orr \rv, \rv, #0x00003000 | ||
| 16 | .endm | ||
| 17 | |||
| 18 | #include <asm/hardware/debug-pl01x.S> | ||
