aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/include/mach/debug-macro.S
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-12-08 11:07:57 +0530
committerLinus Walleij <linus.walleij@stericsson.com>2011-01-10 18:34:52 +0100
commit92389ca8362c42952c7ebb8a0350ac522dcde0f4 (patch)
tree6c840e0d706712729bded5900aed93fa70778ca2 /arch/arm/mach-ux500/include/mach/debug-macro.S
parent0c21e3aaf6ae85bee804a325aa29c325209180fd (diff)
ux500: remove build-time changing macros
To allow the possiblity of building U8500 and U5500 support in the same image. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> [Rebased to latest changes in Russells tree] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/include/mach/debug-macro.S')
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
index be7c0f14e31..700fb05ee81 100644
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ b/arch/arm/mach-ux500/include/mach/debug-macro.S
@@ -14,7 +14,24 @@
#error Invalid Ux500 debug UART
#endif
-#define __UX500_UART(n) UX500_UART##n##_BASE
+/*
+ * DEBUG_LL only works if only one SOC is built in. We don't use #else below
+ * in order to get "__UX500_UART redefined" warnings if more than one SOC is
+ * built, so that there's some hint during the build that something is wrong.
+ */
+
+#ifdef CONFIG_UX500_SOC_DB5500
+#define __UX500_UART(n) U5500_UART##n##_BASE
+#endif
+
+#ifdef CONFIG_UX500_SOC_DB8500
+#define __UX500_UART(n) U8500_UART##n##_BASE
+#endif
+
+#ifndef __UX500_UART
+#error Unknown SOC
+#endif
+
#define UX500_UART(n) __UX500_UART(n)
#define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART)