ARM: picoxcell: move debug macros to include/debug
authorRob Herring <rob.herring@calxeda.com>
Thu, 6 Sep 2012 19:14:46 +0000 (14:14 -0500)
committerRob Herring <rob.herring@calxeda.com>
Fri, 14 Sep 2012 14:22:03 +0000 (09:22 -0500)
Move picoxcell debug-macro.S over to common debug macro directory.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Jamie Iles <jamie@jamieiles.com>
arch/arm/Kconfig.debug
arch/arm/include/debug/picoxcell.S [new file with mode: 0644]
arch/arm/mach-picoxcell/include/mach/debug-macro.S [deleted file]

index aa56934cd284f954b2d610c34e11f22064fbee9b..b74ed971868d1d361d7687ecf651c1ce55ef1233 100644 (file)
@@ -268,6 +268,13 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on MVEBU based platforms.
 
+       config DEBUG_PICOXCELL_UART
+               depends on ARCH_PICOXCELL
+               bool "Use PicoXcell UART for low-level debug"
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on PicoXcell based platforms.
+
        config DEBUG_REALVIEW_STD_PORT
                bool "RealView Default UART"
                depends on ARCH_REALVIEW
@@ -392,6 +399,7 @@ config DEBUG_LL_INCLUDE
        default "debug/icedcc.S" if DEBUG_ICEDCC
        default "debug/highbank.S" if DEBUG_HIGHBANK_UART
        default "debug/mvebu.S" if DEBUG_MVEBU_UART
+       default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
        default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
        default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
                DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S
new file mode 100644 (file)
index 0000000..7419deb
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2011 Picochip Ltd., Jamie Iles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
+ * accesses to the 8250.
+ */
+#include <linux/serial_reg.h>
+
+#define UART_SHIFT 2
+#define PICOXCELL_UART1_BASE           0x80230000
+#define PHYS_TO_IO(x)                  (((x) & 0x00ffffff) | 0xfe000000)
+
+               .macro  addruart, rp, rv, tmp
+               ldr     \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
+               ldr     \rp, =PICOXCELL_UART1_BASE
+               .endm
+
+               .macro  senduart,rd,rx
+               str     \rd, [\rx, #UART_TX << UART_SHIFT]
+               .endm
+
+               .macro  busyuart,rd,rx
+1002:          ldr     \rd, [\rx, #UART_LSR << UART_SHIFT]
+               and     \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
+               teq     \rd, #UART_LSR_TEMT | UART_LSR_THRE
+               bne     1002b
+               .endm
+
+               /* The UART's don't have any flow control IO's wired up. */
+               .macro  waituart,rd,rx
+               .endm
diff --git a/arch/arm/mach-picoxcell/include/mach/debug-macro.S b/arch/arm/mach-picoxcell/include/mach/debug-macro.S
deleted file mode 100644 (file)
index 58d4ee3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit
- * accesses to the 8250.
- */
-#include <linux/serial_reg.h>
-#include <mach/hardware.h>
-#include <mach/map.h>
-
-#define UART_SHIFT 2
-
-               .macro  addruart, rp, rv, tmp
-               ldr     \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE)
-               ldr     \rp, =PICOXCELL_UART1_BASE
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #UART_TX << UART_SHIFT]
-               .endm
-
-               .macro  busyuart,rd,rx
-1002:          ldr     \rd, [\rx, #UART_LSR << UART_SHIFT]
-               and     \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
-               teq     \rd, #UART_LSR_TEMT | UART_LSR_THRE
-               bne     1002b
-               .endm
-
-               /* The UART's don't have any flow control IO's wired up. */
-               .macro  waituart,rd,rx
-               .endm