ARM: sunxi: Add earlyprintk support for UART0 (sun4i)
authorStefan Roese <sr@denx.de>
Mon, 19 Nov 2012 11:09:41 +0000 (12:09 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 20 Nov 2012 14:36:21 +0000 (15:36 +0100)
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/Kconfig.debug
arch/arm/include/debug/sunxi.S

index f12bc3a..cc1ed35 100644 (file)
@@ -345,6 +345,13 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on SOCFPGA based platforms.
 
+       config DEBUG_SUNXI_UART0
+               bool "Kernel low-level debugging messages via sunXi UART0"
+               depends on ARCH_SUNXI
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on Allwinner A1X based platforms on the UART0.
+
        config DEBUG_SUNXI_UART1
                bool "Kernel low-level debugging messages via sunXi UART1"
                depends on ARCH_SUNXI
@@ -423,7 +430,7 @@ config DEBUG_LL_INCLUDE
        default "debug/mvebu.S" if DEBUG_MVEBU_UART
        default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
        default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
-       default "debug/sunxi.S" if DEBUG_SUNXI_UART1
+       default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
        default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
                DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
        default "mach/debug-macro.S"
index 3bf61ca..04eb56d 100644 (file)
  * published by the Free Software Foundation.
 */
 
-#ifdef CONFIG_DEBUG_SUNXI_UART1
+#if defined(CONFIG_DEBUG_SUNXI_UART0)
+#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000
+#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000
+#elif defined(CONFIG_DEBUG_SUNXI_UART1)
 #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400
 #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400
 #endif