From: 黄涛 Date: Wed, 9 Jan 2013 01:46:48 +0000 (+0800) Subject: rk2928: add debug_uart.h X-Git-Tag: firefly_0821_release~7975 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=12ae803e30e02d4b0026d9098c36a215ad20a723;p=firefly-linux-kernel-4.4.55.git rk2928: add debug_uart.h --- diff --git a/arch/arm/mach-rk2928/common.c b/arch/arm/mach-rk2928/common.c index f0816c0dc061..a4d92cd1d49f 100755 --- a/arch/arm/mach-rk2928/common.c +++ b/arch/arm/mach-rk2928/common.c @@ -16,6 +16,7 @@ #include #include #include +#include static void __init rk2928_cpu_axi_init(void) { diff --git a/arch/arm/mach-rk2928/devices.c b/arch/arm/mach-rk2928/devices.c index 8c6a9536d13c..5ea94602e3ba 100755 --- a/arch/arm/mach-rk2928/devices.c +++ b/arch/arm/mach-rk2928/devices.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include 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 index 000000000000..5da6a1ce116e --- /dev/null +++ b/arch/arm/mach-rk2928/include/mach/debug_uart.h @@ -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 diff --git a/arch/arm/mach-rk2928/include/mach/io.h b/arch/arm/mach-rk2928/include/mach/io.h index 9924a0c4e6e7..b263dce07dfa 100755 --- a/arch/arm/mach-rk2928/include/mach/io.h +++ b/arch/arm/mach-rk2928/include/mach/io.h @@ -173,17 +173,6 @@ #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 diff --git a/arch/arm/mach-rk2928/include/mach/irqs.h b/arch/arm/mach-rk2928/include/mach/irqs.h index a2b4867adba7..c216d12a3a09 100644 --- a/arch/arm/mach-rk2928/include/mach/irqs.h +++ b/arch/arm/mach-rk2928/include/mach/irqs.h @@ -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) diff --git a/arch/arm/mach-rk2928/pm.c b/arch/arm/mach-rk2928/pm.c index eae40064af52..825a51e4d5e3 100644 --- a/arch/arm/mach-rk2928/pm.c +++ b/arch/arm/mach-rk2928/pm.c @@ -21,6 +21,7 @@ #include #include #include +#include #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)