]> Pileus Git - ~andy/linux/commitdiff
ARM: PRIMA2: provide two DEBUG_LL ports for prima2 and marco
authorBarry Song <Baohua.Song@csr.com>
Thu, 20 Dec 2012 11:45:25 +0000 (19:45 +0800)
committerBarry Song <Barry.Song@csr.com>
Tue, 22 Jan 2013 11:53:36 +0000 (19:53 +0800)
prima2 and marco has different memory base, the old code will
fail if we enable DEBUG_LL in marco.
this patch adds two debuf port, while debugging, we select one
of PRIMA2 and MARCO debug ports, in the products, we disable
DEBUG_LL.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
arch/arm/Kconfig.debug
arch/arm/mach-prima2/include/mach/uart.h
arch/arm/mach-prima2/include/mach/uncompress.h

index 661030d6bc6c3d10f3ca35f6b8125d21adac7389..00ad1f895da25d95c39bcef841c4c188f395eb85 100644 (file)
@@ -386,6 +386,20 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on Tegra based platforms.
 
+       config DEBUG_SIRFPRIMA2_UART1
+               bool "Kernel low-level debugging messages via SiRFprimaII UART1"
+               depends on ARCH_PRIMA2
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the uart1 port on SiRFprimaII devices.
+
+       config DEBUG_SIRFMARCO_UART1
+               bool "Kernel low-level debugging messages via SiRFmarco UART1"
+               depends on ARCH_MARCO
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the uart1 port on SiRFmarco devices.
+
        config DEBUG_VEXPRESS_UART0_DETECT
                bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
                depends on ARCH_VEXPRESS && CPU_CP15_MMU
index c98b4d5ac24a4d566a3dfb54ab79f83cef9d56cb..c10510d01a440775844fe707fb98e15378d21cce 100644 (file)
 #define __MACH_PRIMA2_SIRFSOC_UART_H
 
 /* UART-1: used as serial debug port */
+#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
 #define SIRFSOC_UART1_PA_BASE          0xb0060000
+#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
+#define SIRFSOC_UART1_PA_BASE          0xcc060000
+#else
+#define SIRFSOC_UART1_PA_BASE          0
+#endif
 #define SIRFSOC_UART1_VA_BASE          SIRFSOC_VA(0x060000)
 #define SIRFSOC_UART1_SIZE             SZ_4K
 
index 0c898fcf909c90b1b6ef4b124ced34e076f6fe7d..15f3edcfbb47a66d325a72a68d5bb655ecfed4c4 100644 (file)
@@ -25,6 +25,9 @@ static __inline__ void putc(char c)
         * during kernel decompression, all mappings are flat:
         *  virt_addr == phys_addr
         */
+       if (!SIRFSOC_UART1_PA_BASE)
+               return;
+
        while (__raw_readl((void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS)
                & SIRFSOC_UART1_TXFIFO_FULL)
                barrier();