aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2012-12-20 06:45:25 -0500
committerBarry Song <Barry.Song@csr.com>2013-01-22 06:53:36 -0500
commit7f46a10724e0d31c83029436e54298be2cc558fa (patch)
tree1de423733f7e72ceefa45ee08c7e5d5ab1df8681
parent4898de3d15d8ba34aa7a1b0f753a476d52ebdf92 (diff)
ARM: PRIMA2: provide two DEBUG_LL ports for prima2 and marco
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>
-rw-r--r--arch/arm/Kconfig.debug14
-rw-r--r--arch/arm/mach-prima2/include/mach/uart.h6
-rw-r--r--arch/arm/mach-prima2/include/mach/uncompress.h3
3 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 661030d6bc6c..00ad1f895da2 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -386,6 +386,20 @@ choice
386 Say Y here if you want kernel low-level debugging support 386 Say Y here if you want kernel low-level debugging support
387 on Tegra based platforms. 387 on Tegra based platforms.
388 388
389 config DEBUG_SIRFPRIMA2_UART1
390 bool "Kernel low-level debugging messages via SiRFprimaII UART1"
391 depends on ARCH_PRIMA2
392 help
393 Say Y here if you want the debug print routines to direct
394 their output to the uart1 port on SiRFprimaII devices.
395
396 config DEBUG_SIRFMARCO_UART1
397 bool "Kernel low-level debugging messages via SiRFmarco UART1"
398 depends on ARCH_MARCO
399 help
400 Say Y here if you want the debug print routines to direct
401 their output to the uart1 port on SiRFmarco devices.
402
389 config DEBUG_VEXPRESS_UART0_DETECT 403 config DEBUG_VEXPRESS_UART0_DETECT
390 bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" 404 bool "Autodetect UART0 on Versatile Express Cortex-A core tiles"
391 depends on ARCH_VEXPRESS && CPU_CP15_MMU 405 depends on ARCH_VEXPRESS && CPU_CP15_MMU
diff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/mach-prima2/include/mach/uart.h
index c98b4d5ac24a..c10510d01a44 100644
--- a/arch/arm/mach-prima2/include/mach/uart.h
+++ b/arch/arm/mach-prima2/include/mach/uart.h
@@ -10,7 +10,13 @@
10#define __MACH_PRIMA2_SIRFSOC_UART_H 10#define __MACH_PRIMA2_SIRFSOC_UART_H
11 11
12/* UART-1: used as serial debug port */ 12/* UART-1: used as serial debug port */
13#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
13#define SIRFSOC_UART1_PA_BASE 0xb0060000 14#define SIRFSOC_UART1_PA_BASE 0xb0060000
15#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
16#define SIRFSOC_UART1_PA_BASE 0xcc060000
17#else
18#define SIRFSOC_UART1_PA_BASE 0
19#endif
14#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) 20#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000)
15#define SIRFSOC_UART1_SIZE SZ_4K 21#define SIRFSOC_UART1_SIZE SZ_4K
16 22
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-prima2/include/mach/uncompress.h
index 0c898fcf909c..15f3edcfbb47 100644
--- a/arch/arm/mach-prima2/include/mach/uncompress.h
+++ b/arch/arm/mach-prima2/include/mach/uncompress.h
@@ -25,6 +25,9 @@ static __inline__ void putc(char c)
25 * during kernel decompression, all mappings are flat: 25 * during kernel decompression, all mappings are flat:
26 * virt_addr == phys_addr 26 * virt_addr == phys_addr
27 */ 27 */
28 if (!SIRFSOC_UART1_PA_BASE)
29 return;
30
28 while (__raw_readl((void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS) 31 while (__raw_readl((void __iomem *)SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS)
29 & SIRFSOC_UART1_TXFIFO_FULL) 32 & SIRFSOC_UART1_TXFIFO_FULL)
30 barrier(); 33 barrier();