diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-08-19 00:56:59 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2011-10-17 05:02:52 -0400 |
commit | f350b86121c7a004a5f866333fa1d23fe30263a6 (patch) | |
tree | 9b8dc0312aaef46faf84f723c7412095dca13326 /arch/arm/plat-mxc | |
parent | 1285b8f89a0553695f4ff5f167d8b4afe91af906 (diff) |
arm/imx: use Kconfig choice for low-level debug UART selection
Now that the DEBUG_LL UART can be selected by a Kconfig choice,
simplify the #ifdefery in debug-macro.S and add entries to the
top-level Kconfig.debug instead.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/debug-macro.S | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index e4dde91f0231..07cfdbe8f068 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -12,43 +12,17 @@ | |||
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | #ifdef CONFIG_SOC_IMX1 | 15 | #ifdef CONFIG_DEBUG_IMX1_UART |
16 | #define UART_PADDR MX1_UART1_BASE_ADDR | 16 | #define UART_PADDR MX1_UART1_BASE_ADDR |
17 | #endif | 17 | #elif defined (CONFIG_DEBUG_IMX25_UART) |
18 | |||
19 | #ifdef CONFIG_SOC_IMX25 | ||
20 | #ifdef UART_PADDR | ||
21 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
22 | #endif | ||
23 | #define UART_PADDR MX25_UART1_BASE_ADDR | 18 | #define UART_PADDR MX25_UART1_BASE_ADDR |
24 | #endif | 19 | #elif defined (CONFIG_DEBUG_IMX21_IMX27_UART) |
25 | |||
26 | #if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27) | ||
27 | #ifdef UART_PADDR | ||
28 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
29 | #endif | ||
30 | #define UART_PADDR MX2x_UART1_BASE_ADDR | 20 | #define UART_PADDR MX2x_UART1_BASE_ADDR |
31 | #endif | 21 | #elif defined (CONFIG_DEBUG_IMX31_IMX35_UART) |
32 | |||
33 | #if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35) | ||
34 | #ifdef UART_PADDR | ||
35 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
36 | #endif | ||
37 | #define UART_PADDR MX3x_UART1_BASE_ADDR | 22 | #define UART_PADDR MX3x_UART1_BASE_ADDR |
38 | #endif | 23 | #elif defined (CONFIG_DEBUG_IMX51_UART) |
39 | |||
40 | #ifdef CONFIG_SOC_IMX51 | ||
41 | #ifdef UART_PADDR | ||
42 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
43 | #endif | ||
44 | #define UART_PADDR MX51_UART1_BASE_ADDR | 24 | #define UART_PADDR MX51_UART1_BASE_ADDR |
45 | #endif | 25 | #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) |
46 | |||
47 | /* iMX50/53 have same addresses, but not iMX51 */ | ||
48 | #if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53) | ||
49 | #ifdef UART_PADDR | ||
50 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | ||
51 | #endif | ||
52 | #define UART_PADDR MX53_UART1_BASE_ADDR | 26 | #define UART_PADDR MX53_UART1_BASE_ADDR |
53 | #endif | 27 | #endif |
54 | 28 | ||