Skip to content

Commit

Permalink
ARM: PRIMA2: provide two DEBUG_LL ports for prima2 and marco
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Barry Song authored and Barry Song committed Jan 22, 2013
1 parent 4898de3 commit 7f46a10
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-prima2/include/mach/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
#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

Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-prima2/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7f46a10

Please sign in to comment.