rk30: add debug_uart.h
author黄涛 <huangtao@rock-chips.com>
Wed, 9 Jan 2013 02:05:57 +0000 (10:05 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 9 Jan 2013 03:04:27 +0000 (11:04 +0800)
arch/arm/mach-rk30/devices.c
arch/arm/mach-rk30/include/mach/debug_uart.h [new file with mode: 0644]
arch/arm/mach-rk30/include/mach/io.h
arch/arm/mach-rk30/include/mach/irqs.h
arch/arm/mach-rk30/pm.c

index c5e6aee6b981fe6bf5b1ea1abc0a3825c948b34c..42c85604129b8b2ce39c58b63e41b019772e5be9 100755 (executable)
@@ -24,6 +24,7 @@
 #include <plat/dma-pl330.h>
 #include <mach/gpio.h>
 #include <mach/iomux.h>
+#include <mach/debug_uart.h>
 #include <plat/rk_fiq_debugger.h>
 
 #ifdef CONFIG_ADC_RK30
diff --git a/arch/arm/mach-rk30/include/mach/debug_uart.h b/arch/arm/mach-rk30/include/mach/debug_uart.h
new file mode 100644 (file)
index 0000000..8295cfe
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __MACH_DEBUG_UART
+#define __MACH_DEBUG_UART
+
+#if CONFIG_RK_DEBUG_UART >= 0 && CONFIG_RK_DEBUG_UART < 4
+
+#if CONFIG_RK_DEBUG_UART == 0
+#define DEBUG_UART_PHYS         RK30_UART0_PHYS
+#define DEBUG_UART_BASE         RK30_UART0_BASE
+#elif CONFIG_RK_DEBUG_UART == 1
+#define DEBUG_UART_PHYS         RK30_UART1_PHYS
+#define DEBUG_UART_BASE         RK30_UART1_BASE
+#elif CONFIG_RK_DEBUG_UART == 2
+#define DEBUG_UART_PHYS         RK30_UART2_PHYS
+#define DEBUG_UART_BASE         RK30_UART2_BASE
+#elif CONFIG_RK_DEBUG_UART == 3
+#define DEBUG_UART_PHYS         RK30_UART3_PHYS
+#define DEBUG_UART_BASE         RK30_UART3_BASE
+#endif
+
+#define IRQ_DEBUG_UART         (IRQ_UART0 + CONFIG_RK_DEBUG_UART)
+
+#endif
+
+#endif
index ae5dcca95bcc247b394d4f0636e9e075e3e2fc1b..dee6fe9e199fb0fbcb3465e346bc3ddd27369951 100755 (executable)
 #define RK30_HSIC_PHYS          0x10240000
 #define RK30_HSIC_SIZE          SZ_256K
 
-#if CONFIG_RK_DEBUG_UART == 0
-#define DEBUG_UART_PHYS         RK30_UART0_PHYS
-#define DEBUG_UART_BASE         RK30_UART0_BASE
-#elif CONFIG_RK_DEBUG_UART == 1
-#define DEBUG_UART_PHYS         RK30_UART1_PHYS
-#define DEBUG_UART_BASE         RK30_UART1_BASE
-#elif CONFIG_RK_DEBUG_UART == 2
-#define DEBUG_UART_PHYS         RK30_UART2_PHYS
-#define DEBUG_UART_BASE         RK30_UART2_BASE
-#elif CONFIG_RK_DEBUG_UART == 3
-#define DEBUG_UART_PHYS         RK30_UART3_PHYS
-#define DEBUG_UART_BASE         RK30_UART3_BASE
-#endif
-
 #define GIC_DIST_BASE           RK30_GICD_BASE
 #define GIC_CPU_BASE            RK30_GICC_BASE
 
index 73f6f10f5f80719166fa306fa7a4add8af5a6ec9..0d5369e5a8e1051cd81386f4652a8cf9deddd178 100644 (file)
@@ -88,9 +88,6 @@
 
 //hhb@rock-chips.com this spi is used for fiq_debugger signal irq
 #define IRQ_UART_SIGNAL                        RK30XX_IRQ(80)
-#if CONFIG_RK_DEBUG_UART >= 0 && CONFIG_RK_DEBUG_UART < 4
-#define IRQ_DEBUG_UART                 (IRQ_UART0 + CONFIG_RK_DEBUG_UART)
-#endif
 
 #define IRQ_ARM_PMU                     RK30XX_IRQ(103)
 
index 9ab51da4b473ad09c2447f1189f6c4825ae1d331..218f1af8dd1a6700e4f12905184f59ba0f85b444 100755 (executable)
@@ -22,6 +22,7 @@
 #include <mach/iomux.h>
 #include <mach/cru.h>
 #include <mach/ddr.h>
+#include <mach/debug_uart.h>
 
 #define cru_readl(offset)      readl_relaxed(RK30_CRU_BASE + offset)
 #define cru_writel(v, offset)  do { writel_relaxed(v, RK30_CRU_BASE + offset); dsb(); } while (0)