Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Debugging macro include header
0004  *
0005  *  Copyright (C) 2009 ST-Ericsson
0006  */
0007 
0008 
0009 #if CONFIG_UX500_DEBUG_UART > 2
0010 #error Invalid Ux500 debug UART
0011 #endif
0012 
0013 /*
0014  * DEBUG_LL only works if only one SOC is built in.  We don't use #else below
0015  * in order to get "__UX500_UART redefined" warnings if more than one SOC is
0016  * built, so that there's some hint during the build that something is wrong.
0017  */
0018 
0019 #ifdef CONFIG_UX500_SOC_DB8500
0020 #define U8500_UART0_PHYS_BASE   (0x80120000)
0021 #define U8500_UART1_PHYS_BASE   (0x80121000)
0022 #define U8500_UART2_PHYS_BASE   (0x80007000)
0023 #define __UX500_PHYS_UART(n)    U8500_UART##n##_PHYS_BASE
0024 #endif
0025 
0026 #if !defined(__UX500_PHYS_UART)
0027 #error Unknown SOC
0028 #endif
0029 
0030 #define UX500_PHYS_UART(n)  __UX500_PHYS_UART(n)
0031 #define UART_PHYS_BASE  UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART)
0032 #define UART_VIRT_BASE  (0xfff07000)
0033 
0034     .macro  addruart, rp, rv, tmp
0035     ldr \rp, =UART_PHYS_BASE        @ no, physical address
0036     ldr \rv, =UART_VIRT_BASE        @ yes, virtual address
0037     .endm
0038 
0039 #include <debug/pl01x.S>