diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-06-07 11:24:39 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-06-10 11:08:56 -0400 |
commit | 0b37e9e8dc02ab68bfb6ba0b5153be681886abd2 (patch) | |
tree | 4be999983d45a79caeed4578b38861680bd4d19d | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) |
ARM: at91: debug: use DEBUG_UART_VIRT
AT91 still uses an offset (0x0100 0000) from the physical address to map
the debug UART. This is unfortunate as for some platforms (sama5d3 and
earlier), it ends up in the PCI zone and PCI is enabled in multi_v7.
Switch to DEBUG_UART_VIRT to solve that.
Tested on sama5d3 and 9g20.
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | arch/arm/Kconfig.debug | 11 | ||||
-rw-r--r-- | arch/arm/include/debug/at91.S | 10 |
2 files changed, 7 insertions, 14 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 19a3dcf5eb2e..2609491f4ab1 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -117,15 +117,15 @@ choice | |||
117 | their output to the serial port on atmel devices. | 117 | their output to the serial port on atmel devices. |
118 | 118 | ||
119 | SOC DEBUG_UART_PHYS DEBUG_UART_VIRT PORT | 119 | SOC DEBUG_UART_PHYS DEBUG_UART_VIRT PORT |
120 | rm9200, 9260/9g20, 0xfffff200 0xfefff200 DBGU | 120 | rm9200, 9260/9g20, 0xfffff200 0xf8fff200 DBGU |
121 | 9261/9g10, 9rl | 121 | 9261/9g10, 9rl |
122 | 9263, 9g45, sama5d3 0xffffee00 0xfeffee00 DBGU | 122 | 9263, 9g45, sama5d3 0xffffee00 0xf8ffee00 DBGU |
123 | sama5d4 0xfc00c000 0xfb00c000 USART3 | 123 | sama5d4 0xfc00c000 0xfb00c000 USART3 |
124 | sama5d4 0xfc069000 0xfb069000 DBGU | 124 | sama5d4 0xfc069000 0xfb069000 DBGU |
125 | sama5d2 0xf8020000 0xf7020000 UART1 | 125 | sama5d2 0xf8020000 0xf7020000 UART1 |
126 | 126 | ||
127 | Please adjust DEBUG_UART_PHYS configuration options based on | 127 | Please adjust DEBUG_UART_PHYS and DEBUG_UART_VIRT |
128 | your needs. | 128 | configuration options based on your needs. |
129 | 129 | ||
130 | config DEBUG_BCM2835 | 130 | config DEBUG_BCM2835 |
131 | bool "Kernel low-level debugging on BCM2835 PL011 UART" | 131 | bool "Kernel low-level debugging on BCM2835 PL011 UART" |
@@ -1627,7 +1627,8 @@ config DEBUG_UART_VIRT | |||
1627 | DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ | 1627 | DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ |
1628 | DEBUG_S3C64XX_UART || \ | 1628 | DEBUG_S3C64XX_UART || \ |
1629 | DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \ | 1629 | DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \ |
1630 | DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 | 1630 | DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \ |
1631 | DEBUG_AT91_UART | ||
1631 | 1632 | ||
1632 | config DEBUG_UART_8250_SHIFT | 1633 | config DEBUG_UART_8250_SHIFT |
1633 | int "Register offset shift for the 8250 debug UART" | 1634 | int "Register offset shift for the 8250 debug UART" |
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S index d4ae3b8e2426..0098401e5aeb 100644 --- a/arch/arm/include/debug/at91.S +++ b/arch/arm/include/debug/at91.S | |||
@@ -9,14 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifdef CONFIG_MMU | ||
13 | #define AT91_IO_P2V(x) ((x) - 0x01000000) | ||
14 | #else | ||
15 | #define AT91_IO_P2V(x) (x) | ||
16 | #endif | ||
17 | |||
18 | #define AT91_DEBUG_UART_VIRT AT91_IO_P2V(CONFIG_DEBUG_UART_PHYS) | ||
19 | |||
20 | #define AT91_DBGU_SR (0x14) /* Status Register */ | 12 | #define AT91_DBGU_SR (0x14) /* Status Register */ |
21 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ | 13 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ |
22 | #define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */ | 14 | #define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */ |
@@ -24,7 +16,7 @@ | |||
24 | 16 | ||
25 | .macro addruart, rp, rv, tmp | 17 | .macro addruart, rp, rv, tmp |
26 | ldr \rp, =CONFIG_DEBUG_UART_PHYS @ System peripherals (phys address) | 18 | ldr \rp, =CONFIG_DEBUG_UART_PHYS @ System peripherals (phys address) |
27 | ldr \rv, =AT91_DEBUG_UART_VIRT @ System peripherals (virt address) | 19 | ldr \rv, =CONFIG_DEBUG_UART_VIRT @ System peripherals (virt address) |
28 | .endm | 20 | .endm |
29 | 21 | ||
30 | .macro senduart,rd,rx | 22 | .macro senduart,rd,rx |