blob: c5203b7ea5521596f929bde20cd35708a2419e5c [file] [log] [blame]
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +01001/*
2 * Debugging macro include header
3 *
4 * Copyright (C) 2009 ST-Ericsson
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
Rabin Vincent59778fb2010-02-12 06:23:07 +010011#include <mach/hardware.h>
12
Rabin Vincent39a982b2010-05-03 07:38:06 +010013#if CONFIG_UX500_DEBUG_UART > 2
14#error Invalid Ux500 debug UART
15#endif
16
17#define __UX500_UART(n) UX500_UART##n##_BASE
18#define UX500_UART(n) __UX500_UART(n)
19#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)
20
Tony Lindgren4e6d4882010-02-01 23:26:53 +010021 .macro addruart, rx, tmp
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010022 mrc p15, 0, \rx, c1, c0
Rabin Vincent59778fb2010-02-12 06:23:07 +010023 tst \rx, #1 @ MMU enabled?
Rabin Vincent39a982b2010-05-03 07:38:06 +010024 ldreq \rx, =UART_BASE @ no, physical address
25 ldrne \rx, =IO_ADDRESS(UART_BASE) @ yes, virtual address
Srinidhi Kasagaraa44ef42009-11-28 08:17:18 +010026 .endm
27
28#include <asm/hardware/debug-pl01x.S>