xref: /linux/arch/arm/include/debug/ux500.S (revision f87b95dd2e4a8832b1d6034f15a5324db42608a0)
1*f87b95ddSLinus Walleij/*
2*f87b95ddSLinus Walleij * Debugging macro include header
3*f87b95ddSLinus Walleij *
4*f87b95ddSLinus Walleij *  Copyright (C) 2009 ST-Ericsson
5*f87b95ddSLinus Walleij *
6*f87b95ddSLinus Walleij * This program is free software; you can redistribute it and/or modify
7*f87b95ddSLinus Walleij * it under the terms of the GNU General Public License version 2 as
8*f87b95ddSLinus Walleij * published by the Free Software Foundation.
9*f87b95ddSLinus Walleij *
10*f87b95ddSLinus Walleij */
11*f87b95ddSLinus Walleij#include <mach/hardware.h>
12*f87b95ddSLinus Walleij
13*f87b95ddSLinus Walleij#if CONFIG_UX500_DEBUG_UART > 2
14*f87b95ddSLinus Walleij#error Invalid Ux500 debug UART
15*f87b95ddSLinus Walleij#endif
16*f87b95ddSLinus Walleij
17*f87b95ddSLinus Walleij/*
18*f87b95ddSLinus Walleij * DEBUG_LL only works if only one SOC is built in.  We don't use #else below
19*f87b95ddSLinus Walleij * in order to get "__UX500_UART redefined" warnings if more than one SOC is
20*f87b95ddSLinus Walleij * built, so that there's some hint during the build that something is wrong.
21*f87b95ddSLinus Walleij */
22*f87b95ddSLinus Walleij
23*f87b95ddSLinus Walleij#ifdef CONFIG_UX500_SOC_DB8500
24*f87b95ddSLinus Walleij#define __UX500_UART(n)	U8500_UART##n##_BASE
25*f87b95ddSLinus Walleij#endif
26*f87b95ddSLinus Walleij
27*f87b95ddSLinus Walleij#ifndef __UX500_UART
28*f87b95ddSLinus Walleij#error Unknown SOC
29*f87b95ddSLinus Walleij#endif
30*f87b95ddSLinus Walleij
31*f87b95ddSLinus Walleij#define UX500_UART(n)	__UX500_UART(n)
32*f87b95ddSLinus Walleij#define UART_BASE	UX500_UART(CONFIG_UX500_DEBUG_UART)
33*f87b95ddSLinus Walleij
34*f87b95ddSLinus Walleij	.macro	addruart, rp, rv, tmp
35*f87b95ddSLinus Walleij	ldr	\rp, =UART_BASE				@ no, physical address
36*f87b95ddSLinus Walleij	ldr	\rv, =IO_ADDRESS(UART_BASE)		@ yes, virtual address
37*f87b95ddSLinus Walleij	.endm
38*f87b95ddSLinus Walleij
39*f87b95ddSLinus Walleij#include <asm/hardware/debug-pl01x.S>
40