rk2928: add debug_uart.h
author黄涛 <huangtao@rock-chips.com>
Wed, 9 Jan 2013 01:46:48 +0000 (09:46 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 9 Jan 2013 03:04:26 +0000 (11:04 +0800)
arch/arm/mach-rk2928/common.c
arch/arm/mach-rk2928/devices.c
arch/arm/mach-rk2928/include/mach/debug_uart.h [new file with mode: 0644]
arch/arm/mach-rk2928/include/mach/io.h
arch/arm/mach-rk2928/include/mach/irqs.h
arch/arm/mach-rk2928/pm.c

index f0816c0dc06180aae016b503f7ff431265f925d0..a4d92cd1d49f988425d15d5bb00820a2886d2555 100755 (executable)
@@ -16,6 +16,7 @@
 #include <mach/loader.h>
 #include <mach/ddr.h>
 #include <mach/cpu.h>
+#include <mach/debug_uart.h>
 
 static void __init rk2928_cpu_axi_init(void)
 {
index 8c6a9536d13c22431b90ba3e31d3bde719d61cdb..5ea94602e3baccaeebbef22bc3dc2f4d2ea9a56d 100755 (executable)
@@ -28,6 +28,7 @@
 #include <mach/gpio.h>
 #include <mach/iomux.h>
 #include <mach/dvfs.h>
+#include <mach/debug_uart.h>
 #include <plat/rk_fiq_debugger.h>
 #include <linux/regulator/consumer.h>
 
diff --git a/arch/arm/mach-rk2928/include/mach/debug_uart.h b/arch/arm/mach-rk2928/include/mach/debug_uart.h
new file mode 100644 (file)
index 0000000..5da6a1c
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef __MACH_DEBUG_UART
+#define __MACH_DEBUG_UART
+
+#if CONFIG_RK_DEBUG_UART >= 0 && CONFIG_RK_DEBUG_UART < 3
+
+#if CONFIG_RK_DEBUG_UART == 0
+#define DEBUG_UART_PHYS         RK2928_UART0_PHYS
+#define DEBUG_UART_BASE         RK2928_UART0_BASE
+#elif CONFIG_RK_DEBUG_UART == 1
+#define DEBUG_UART_PHYS         RK2928_UART1_PHYS
+#define DEBUG_UART_BASE         RK2928_UART1_BASE
+#elif CONFIG_RK_DEBUG_UART == 2
+#define DEBUG_UART_PHYS         RK2928_UART2_PHYS
+#define DEBUG_UART_BASE         RK2928_UART2_BASE
+#endif
+
+#define IRQ_DEBUG_UART         (IRQ_UART0 + CONFIG_RK_DEBUG_UART)
+
+#endif
+
+#endif
index 9924a0c4e6e7b9719f5981b932b4565bb3da32aa..b263dce07dfa33d6a9fadb8b024ee9e9822af124 100755 (executable)
 #define RK2928_EFUSE_PHYS       0x20090000
 #define RK2928_EFUSE_SIZE       SZ_4K
 
-#if CONFIG_RK_DEBUG_UART == 0
-#define DEBUG_UART_PHYS         RK2928_UART0_PHYS
-#define DEBUG_UART_BASE         RK2928_UART0_BASE
-#elif CONFIG_RK_DEBUG_UART == 1
-#define DEBUG_UART_PHYS         RK2928_UART1_PHYS
-#define DEBUG_UART_BASE         RK2928_UART1_BASE
-#elif CONFIG_RK_DEBUG_UART == 2
-#define DEBUG_UART_PHYS         RK2928_UART2_PHYS
-#define DEBUG_UART_BASE         RK2928_UART2_BASE
-#endif
-
 #define GIC_DIST_BASE           RK2928_GICD_BASE
 #define GIC_CPU_BASE            RK2928_GICC_BASE
 
index a2b4867adba7886726ec85b7b7dc2d28cd643248..c216d12a3a0949a0813ca5e5a7b0bb1689c0ca8f 100644 (file)
@@ -57,9 +57,6 @@
 
 //hhb@rock-chips.com this spi is used for fiq_debugger signal irq
 #define IRQ_UART_SIGNAL                        127
-#if CONFIG_RK_DEBUG_UART >= 0 && CONFIG_RK_DEBUG_UART < 3
-#define IRQ_DEBUG_UART                 (IRQ_UART0 + CONFIG_RK_DEBUG_UART)
-#endif
 
 #define NR_GIC_IRQS                     (4 * 32)
 #define NR_GPIO_IRQS                    (4 * 32)
index eae40064af5285264727dbcf41c7d314e4af85e1..825a51e4d5e34e921652920978e1b8d1b62d6eb3 100644 (file)
@@ -21,6 +21,7 @@
 #include <mach/gpio.h>
 #include <mach/iomux.h>
 #include <mach/cru.h>
+#include <mach/debug_uart.h>
 
 #define cru_readl(offset)      readl_relaxed(RK2928_CRU_BASE + offset)
 #define cru_writel(v, offset)  do { writel_relaxed(v, RK2928_CRU_BASE + offset); dsb(); } while (0)