1*4882a593Smuzhiyun/* SPDX-License-Identifier: GPL-2.0-only */ 2*4882a593Smuzhiyun/* 3*4882a593Smuzhiyun * Debugging macro include header 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2009 ST-Ericsson 6*4882a593Smuzhiyun */ 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun#if CONFIG_UX500_DEBUG_UART > 2 10*4882a593Smuzhiyun#error Invalid Ux500 debug UART 11*4882a593Smuzhiyun#endif 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun/* 14*4882a593Smuzhiyun * DEBUG_LL only works if only one SOC is built in. We don't use #else below 15*4882a593Smuzhiyun * in order to get "__UX500_UART redefined" warnings if more than one SOC is 16*4882a593Smuzhiyun * built, so that there's some hint during the build that something is wrong. 17*4882a593Smuzhiyun */ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun#ifdef CONFIG_UX500_SOC_DB8500 20*4882a593Smuzhiyun#define U8500_UART0_PHYS_BASE (0x80120000) 21*4882a593Smuzhiyun#define U8500_UART1_PHYS_BASE (0x80121000) 22*4882a593Smuzhiyun#define U8500_UART2_PHYS_BASE (0x80007000) 23*4882a593Smuzhiyun#define __UX500_PHYS_UART(n) U8500_UART##n##_PHYS_BASE 24*4882a593Smuzhiyun#endif 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun#if !defined(__UX500_PHYS_UART) 27*4882a593Smuzhiyun#error Unknown SOC 28*4882a593Smuzhiyun#endif 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun#define UX500_PHYS_UART(n) __UX500_PHYS_UART(n) 31*4882a593Smuzhiyun#define UART_PHYS_BASE UX500_PHYS_UART(CONFIG_UX500_DEBUG_UART) 32*4882a593Smuzhiyun#define UART_VIRT_BASE (0xfff07000) 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun .macro addruart, rp, rv, tmp 35*4882a593Smuzhiyun ldr \rp, =UART_PHYS_BASE @ no, physical address 36*4882a593Smuzhiyun ldr \rv, =UART_VIRT_BASE @ yes, virtual address 37*4882a593Smuzhiyun .endm 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun#include <debug/pl01x.S> 40