Skip to contentSkip to conversation

ARM: i.MX50/53: debug-macro: fix UART_PADDR

PATCH New Troy Kisky 3 participants 4 messages Jul 12, 2011

Subsystems (3)
lore
Share & tools
lore

Troy Kisky

author
#0 lore raw

PATCH 1/1 ARM: i.MX50/53: debug-macro: fix UART_PADDR

The i.MX51 UART_PADDR value does not work for MX50/53.

---
 arch/arm/plat-mxc/include/mach/debug-macro.S |   42 +++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 8 deletions(-)
arch/arm/plat-mxc/include/mach/debug-macro.S +34 -8
index 8e8d175..6b696cd 100644
@@ -17,32 +17,58 @@
 #endif
 
 #ifdef CONFIG_ARCH_MX25
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX25_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX25_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX25_UART1_BASE_ADDR
 #endif
 
 #ifdef CONFIG_ARCH_MX2
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX2x_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX2x_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX2x_UART1_BASE_ADDR
 #endif
 
 #ifdef CONFIG_ARCH_MX3
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX3x_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX3x_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX3x_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX5
-#ifdef UART_PADDR
+#ifdef CONFIG_ARCH_MX50
+#ifndef UART_PADDR
+#define UART_PADDR	MX50_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX50_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
+#endif
+
+#ifdef CONFIG_ARCH_MX51
+#ifndef UART_PADDR
 #define UART_PADDR	MX51_UART1_BASE_ADDR
 #endif
+#if UART_PADDR != MX51_UART1_BASE_ADDR
+#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
+#endif
+#endif
+
+#ifdef CONFIG_ARCH_MX53
+#ifndef UART_PADDR
+#define UART_PADDR	MX53_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX53_UART1_BASE_ADDR
+#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
+#endif
+#endif
 
 #define UART_VADDR	IMX_IO_ADDRESS(UART_PADDR)
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: i.MX50/53: debug-macro: fix UART_PADDR

Quoted 14 lines · Troy Kisky

The i.MX51 UART_PADDR value does not work for MX50/53.

---
 arch/arm/plat-mxc/include/mach/debug-macro.S |   42 +++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 8 deletions(-)
arch/arm/plat-mxc/include/mach/debug-macro.S +0 -0
index 8e8d175..6b696cd 100644
@@ -17,32 +17,58 @@
 #endif
 

arch/arm/plat-mxc/include/mach/debug-macro.S line 26

Quoted 10 lines
arch/arm/plat-mxc/include/mach/debug-macro.S +4 -2
 #ifdef CONFIG_ARCH_MX25
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX25_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX25_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX25_UART1_BASE_ADDR
 #endif

I'm not sure it's worth the effort to do this. Still you should at least note it in the change log or better move it to a separate patch.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
maintainer
#2 lore raw

PATCH 1/1 ARM: i.MX50/53: debug-macro: fix UART_PADDR

In reply to Troy Kisky
Quoted 3 lines · Troy Kisky

The i.MX51 UART_PADDR value does not work for MX50/53.

Your first patch looked better...

Sascha

Quoted 79 lines
---
 arch/arm/plat-mxc/include/mach/debug-macro.S |   42 +++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 8 deletions(-)
arch/arm/plat-mxc/include/mach/debug-macro.S +34 -8
index 8e8d175..6b696cd 100644
@@ -17,32 +17,58 @@
 #endif
 
 #ifdef CONFIG_ARCH_MX25
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX25_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX25_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX25_UART1_BASE_ADDR
 #endif
 
 #ifdef CONFIG_ARCH_MX2
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX2x_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX2x_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX2x_UART1_BASE_ADDR
 #endif
 
 #ifdef CONFIG_ARCH_MX3
-#ifdef UART_PADDR
+#ifndef UART_PADDR
+#define UART_PADDR	MX3x_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX3x_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#define UART_PADDR	MX3x_UART1_BASE_ADDR
 #endif
 
-#ifdef CONFIG_ARCH_MX5
-#ifdef UART_PADDR
+#ifdef CONFIG_ARCH_MX50
+#ifndef UART_PADDR
+#define UART_PADDR	MX50_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX50_UART1_BASE_ADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
+#endif
+
+#ifdef CONFIG_ARCH_MX51
+#ifndef UART_PADDR
 #define UART_PADDR	MX51_UART1_BASE_ADDR
 #endif
+#if UART_PADDR != MX51_UART1_BASE_ADDR
+#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
+#endif
+#endif
+
+#ifdef CONFIG_ARCH_MX53
+#ifndef UART_PADDR
+#define UART_PADDR	MX53_UART1_BASE_ADDR
+#endif
+#if UART_PADDR != MX53_UART1_BASE_ADDR
+#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
+#endif
+#endif
 
 #define UART_VADDR	IMX_IO_ADDRESS(UART_PADDR)
 
Signature · 1 line
1.7.0.4
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author
#3 lore raw

PATCH 1/1 ARM: i.MX50/53: debug-macro: fix UART_PADDR

Quoted 8 lines · Sascha Hauer
Quoted 3 lines · Troy Kisky

The i.MX51 UART_PADDR value does not work for MX50/53.

Your first patch looked better...

Sascha

I agree, I was trying to address Uwe's complaint.

Troy