Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 1 | /* |
| 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 Vincent | 59778fb | 2010-02-12 06:23:07 +0100 | [diff] [blame] | 11 | #include <mach/hardware.h> |
| 12 | |
Rabin Vincent | 39a982b | 2010-05-03 07:38:06 +0100 | [diff] [blame] | 13 | #if CONFIG_UX500_DEBUG_UART > 2 |
| 14 | #error Invalid Ux500 debug UART |
| 15 | #endif |
| 16 | |
Rabin Vincent | 92389ca | 2010-12-08 11:07:57 +0530 | [diff] [blame] | 17 | /* |
| 18 | * DEBUG_LL only works if only one SOC is built in. We don't use #else below |
| 19 | * in order to get "__UX500_UART redefined" warnings if more than one SOC is |
| 20 | * built, so that there's some hint during the build that something is wrong. |
| 21 | */ |
| 22 | |
Rabin Vincent | 92389ca | 2010-12-08 11:07:57 +0530 | [diff] [blame] | 23 | #ifdef CONFIG_UX500_SOC_DB8500 |
| 24 | #define __UX500_UART(n) U8500_UART##n##_BASE |
| 25 | #endif |
| 26 | |
| 27 | #ifndef __UX500_UART |
| 28 | #error Unknown SOC |
| 29 | #endif |
| 30 | |
Rabin Vincent | 39a982b | 2010-05-03 07:38:06 +0100 | [diff] [blame] | 31 | #define UX500_UART(n) __UX500_UART(n) |
| 32 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) |
| 33 | |
Nicolas Pitre | 639da5e | 2011-08-31 22:55:46 -0400 | [diff] [blame] | 34 | .macro addruart, rp, rv, tmp |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 35 | ldr \rp, =UART_BASE @ no, physical address |
| 36 | ldr \rv, =IO_ADDRESS(UART_BASE) @ yes, virtual address |
Srinidhi Kasagar | aa44ef4 | 2009-11-28 08:17:18 +0100 | [diff] [blame] | 37 | .endm |
| 38 | |
| 39 | #include <asm/hardware/debug-pl01x.S> |