ARM: sirf: move debug-macro.S to include/debug/sirf.S
authorArnd Bergmann <arnd@arndb.de>
Tue, 19 Mar 2013 12:52:14 +0000 (13:52 +0100)
committerArnd Bergmann <arnd@arndb.de>
Mon, 25 Mar 2013 11:29:40 +0000 (12:29 +0100)
The new style ll_debug implementation for multiplatform requires the
platform glue to be in include/debug, so let's move it there to
separate the debugging logic from the platform code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Barry Song <Baohua.Song@csr.com>
arch/arm/Kconfig.debug
arch/arm/include/debug/sirf.S [new file with mode: 0644]
arch/arm/mach-prima2/include/mach/debug-macro.S [deleted file]
arch/arm/mach-prima2/lluart.c

index acddddac7ee46fb961e8ba1fe86d038276d0a632..a69334d7f2b3cf83e1ace478416e61744dd235c9 100644 (file)
@@ -592,6 +592,7 @@ config DEBUG_LL_INCLUDE
        default "debug/mvebu.S" if DEBUG_MVEBU_UART
        default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
        default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
+       default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
        default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
        default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
        default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
diff --git a/arch/arm/include/debug/sirf.S b/arch/arm/include/debug/sirf.S
new file mode 100644 (file)
index 0000000..dbf250c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * arch/arm/mach-prima2/include/mach/debug-macro.S
+ *
+ * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
+#define SIRFSOC_UART1_PA_BASE          0xb0060000
+#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
+#define SIRFSOC_UART1_PA_BASE          0xcc060000
+#else
+#define SIRFSOC_UART1_PA_BASE          0
+#endif
+
+#define SIRFSOC_UART1_VA_BASE          0xFEC60000
+
+#define SIRFSOC_UART_TXFIFO_STATUS     0x0114
+#define SIRFSOC_UART_TXFIFO_DATA       0x0118
+
+#define SIRFSOC_UART1_TXFIFO_FULL                       (1 << 5)
+#define SIRFSOC_UART1_TXFIFO_EMPTY                     (1 << 6)
+
+       .macro  addruart, rp, rv, tmp
+       ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
+       ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
+       .endm
+
+       .macro  senduart,rd,rx
+       str     \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
+       .endm
+
+       .macro  busyuart,rd,rx
+       .endm
+
+       .macro  waituart,rd,rx
+1001:  ldr     \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
+       tst     \rd, #SIRFSOC_UART1_TXFIFO_EMPTY
+       beq     1001b
+       .endm
+
diff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-prima2/include/mach/debug-macro.S
deleted file mode 100644 (file)
index cd97492..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * arch/arm/mach-prima2/include/mach/debug-macro.S
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#include <mach/hardware.h>
-#include <mach/uart.h>
-
-       .macro  addruart, rp, rv, tmp
-       ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
-       ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
-       .endm
-
-       .macro  senduart,rd,rx
-       str     \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
-       .endm
-
-       .macro  busyuart,rd,rx
-       .endm
-
-       .macro  waituart,rd,rx
-1001:  ldr     \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
-       tst     \rd, #SIRFSOC_UART1_TXFIFO_EMPTY
-       beq     1001b
-       .endm
-
index a89f9b3c8cc5ff836e84c09c4a4ccb76613c16e4..7222481ef1c850b8d422263aea8b6ae6764f63a6 100644 (file)
 #include <asm/page.h>
 #include <asm/mach/map.h>
 #include <mach/map.h>
-#include <mach/uart.h>
+
+#if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1)
+#define SIRFSOC_UART1_PA_BASE          0xb0060000
+#elif defined(CONFIG_DEBUG_SIRFMARCO_UART1)
+#define SIRFSOC_UART1_PA_BASE          0xcc060000
+#else
+#define SIRFSOC_UART1_PA_BASE          0
+#endif
+
+#define SIRFSOC_UART1_VA_BASE          SIRFSOC_VA(0x060000)
+#define SIRFSOC_UART1_SIZE             SZ_4K
 
 void __init sirfsoc_map_lluart(void)
 {
This page took 0.029615 seconds and 5 git commands to generate.