Commit 785d7fab3eb0c39bcd8086055e7bd144c48158e4

Authored by Dirk Behme
Committed by Shawn Guo
1 parent ef44180680

ARM: imx6: Add UART2 for low-level debug

To be able to enable early debugging on boards using the UART2 for the
console, add the option for early debugging on UART2.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Showing 4 changed files with 18 additions and 0 deletions Side-by-side Diff

arch/arm/Kconfig.debug
... ... @@ -180,6 +180,14 @@
180 180 Say Y here if you want kernel low-level debugging support
181 181 on i.MX50 or i.MX53.
182 182  
  183 + config DEBUG_IMX6Q_UART2
  184 + bool "i.MX6Q Debug UART2"
  185 + depends on SOC_IMX6Q
  186 + help
  187 + Say Y here if you want kernel low-level debugging support
  188 + on i.MX6Q UART2. This is correct for e.g. the SabreLite
  189 + board.
  190 +
183 191 config DEBUG_IMX6Q_UART4
184 192 bool "i.MX6Q Debug UART4"
185 193 depends on SOC_IMX6Q
arch/arm/mach-imx/lluart.c
... ... @@ -17,6 +17,12 @@
17 17 #include <mach/hardware.h>
18 18  
19 19 static struct map_desc imx_lluart_desc = {
  20 +#ifdef CONFIG_DEBUG_IMX6Q_UART2
  21 + .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR),
  22 + .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
  23 + .length = MX6Q_UART2_SIZE,
  24 + .type = MT_DEVICE,
  25 +#endif
20 26 #ifdef CONFIG_DEBUG_IMX6Q_UART4
21 27 .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
22 28 .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
arch/arm/plat-mxc/include/mach/debug-macro.S
... ... @@ -24,6 +24,8 @@
24 24 #define UART_PADDR MX51_UART1_BASE_ADDR
25 25 #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
26 26 #define UART_PADDR MX53_UART1_BASE_ADDR
  27 +#elif defined (CONFIG_DEBUG_IMX6Q_UART2)
  28 +#define UART_PADDR MX6Q_UART2_BASE_ADDR
27 29 #elif defined (CONFIG_DEBUG_IMX6Q_UART4)
28 30 #define UART_PADDR MX6Q_UART4_BASE_ADDR
29 31 #endif
arch/arm/plat-mxc/include/mach/mx6q.h
... ... @@ -27,6 +27,8 @@
27 27 #define MX6Q_CCM_SIZE 0x4000
28 28 #define MX6Q_ANATOP_BASE_ADDR 0x020c8000
29 29 #define MX6Q_ANATOP_SIZE 0x1000
  30 +#define MX6Q_UART2_BASE_ADDR 0x021e8000
  31 +#define MX6Q_UART2_SIZE 0x4000
30 32 #define MX6Q_UART4_BASE_ADDR 0x021f0000
31 33 #define MX6Q_UART4_SIZE 0x4000
32 34