Skip to contentSkip to conversation

mx35pdk: add debug board support

PATCH Superseded jgq516 at gmail.com 4 participants 9 messages Oct 20, 2010 – Oct 21, 2010

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +1 -0
index 85beece..cdf6ac5 100644
@@ -139,6 +139,7 @@ config MACH_ARMADILLO5X0
 config MACH_MX35_3DS
 	bool "Support MX35PDK platform"
 	select ARCH_MX35
+	select MXC_DEBUG_BOARD
 	select IMX_HAVE_PLATFORM_IMX_UART
 	default n
 	help
arch/arm/mach-mx3/mach-mx35_3ds.c +8 -0
index 1c30d72..326b90a 100644
@@ -35,10 +35,14 @@
 #include <mach/hardware.h>
 #include <mach/common.h>
 #include <mach/iomux-mx35.h>
+#include <mach/irqs.h>
+#include <mach/3ds_debugboard.h>
 
 #include "devices-imx35.h"
 #include "devices.h"
 
+#define EXPIO_PARENT_INT       (MXC_INTERNAL_IRQS + GPIO_PORTA + 1)
+
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
 	imx35_add_imx_uart0(&uart_pdata);
 
 	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+	if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+		pr_warn("Init of the debugboard failed, all "
+			"devices on the board are unusable.\n");
 }
 
 static void __init mx35pdk_timer_init(void)
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

Hi jgq516,

Quoted 17 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 105

Quoted 8 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
 	imx35_add_imx_uart0(&uart_pdata);
 
 	mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+	if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+		pr_warn("Init of the debugboard failed, all "
+			"devices on the board are unusable.\n");
                            ^^^^^

You probably mean debugboard here. I'd change the wording.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
author
#2 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

Hi Baruch,

2010/10/20 Baruch Siach <[email protected]>

Quoted 32 lines

Hi jgq516,

Quoted 17 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 105

Quoted 8 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
      imx35_add_imx_uart0(&uart_pdata);
 
      mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+     if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+             pr_warn("Init of the debugboard failed, all "
+                     "devices on the board are unusable.\n");
                            ^^^^^
Quoted 3 lines

You probably mean debugboard here. I'd change the wording.

There are some devices in the debug board, such as lan9217 ethernet. If

mxc_expio_init failed,
then the lan9217 can't be use.
BTW: In mach-mx5/board-mx51_3ds.c and mach-mx31_3ds.c, the warn messages are same.
if (mxc_expio_init(MX51_CS5_BASE_ADDR,
EXPIO_PARENT_INT))

printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are
unusable.\n");

baruch

Quoted 6 lines

--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/f3d71487/attachment-0002.html>

author
#3 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

2010/10/21 xiao jiang <[email protected]>

Quoted 46 lines

Hi Baruch,

2010/10/20 Baruch Siach <[email protected]>

Hi jgq516,

Quoted 31 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:
Quoted 17 lines

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 105

Quoted 8 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
      imx35_add_imx_uart0(&uart_pdata);
 
      mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+     if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+             pr_warn("Init of the debugboard failed, all "
+                     "devices on the board are unusable.\n");
                            ^^^^^
Quoted 3 lines

You probably mean debugboard here. I'd change the wording.

There are some devices in the debug board, such as lan9217 ethernet. If

mxc_expio_init failed,
then the lan9217 can't be use.
BTW: In mach-mx5/board-mx51_3ds.c and mach-mx31_3ds.c, the warn messages are same.
if (mxc_expio_init(MX51_CS5_BASE_ADDR,
EXPIO_PARENT_INT))

Quoted 6 lines

printk(KERN_WARNING "Init of the debugboard failed, all "

"devices on the board are
unusable.\n");

Ooo, I pressed the keyboard neglectfully[?], and you can see below

sentence in mach-mx31_3ds.c.
if (!mxc_expio_init(CS5_BASE_ADDR, EXPIO_PARENT_INT))
printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n");

Thanks,
Xiao Jiang

Quoted 11 lines

baruch

Quoted 8 lines

--

                                                    ~. .~   Tk Open

Systems

=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/13e5fb59/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 630 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/13e5fb59/attachment-0001.png>

#4 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

Hi xiao,

Quoted 37 lines · xiao jiang

2010/10/21 xiao jiang <[email protected]>

Quoted 36 lines

2010/10/20 Baruch Siach <[email protected]>

Quoted 30 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:
Quoted 17 lines

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 105

Quoted 8 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
      imx35_add_imx_uart0(&uart_pdata);
 
      mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+     if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+             pr_warn("Init of the debugboard failed, all "
+                     "devices on the board are unusable.\n");
                            ^^^^^
Quoted 3 lines

You probably mean debugboard here. I'd change the wording.

There are some devices in the debug board, such as lan9217 ethernet. If

mxc_expio_init failed,
then the lan9217 can't be use.

Of course. But this does not make devices on the main board unusable, isn't it? The user might think that his whole system is unusable because of this init failure.

Quoted 7 lines
Quoted 7 lines

BTW: In mach-mx5/board-mx51_3ds.c and mach-mx31_3ds.c, the warn messages are same.
if (mxc_expio_init(MX51_CS5_BASE_ADDR,
EXPIO_PARENT_INT))

printk(KERN_WARNING "Init of the debugboard failed, all "

Quoted 8 lines
Quoted 4 lines

"devices on the board are
unusable.\n");

Ooo, I pressed the keyboard neglectfully[?], and you can see below

sentence in mach-mx31_3ds.c.
if (!mxc_expio_init(CS5_BASE_ADDR, EXPIO_PARENT_INT))
printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n");

Then this wording should also change there. Adding Jason Wang to Cc.

baruch

Quoted 2 lines

Thanks,
Xiao Jiang

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
author
#5 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

2010/10/21 Baruch Siach <[email protected]>

Quoted 39 lines

Hi xiao,

Quoted 35 lines · xiao jiang

2010/10/21 xiao jiang <[email protected]>

Quoted 34 lines

2010/10/20 Baruch Siach <[email protected]>

Quoted 33 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:
Quoted 17 lines

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 105

Quoted 8 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
      imx35_add_imx_uart0(&uart_pdata);
 
      mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+     if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+             pr_warn("Init of the debugboard failed, all "
+                     "devices on the board are unusable.\n");
                            ^^^^^

You probably mean debugboard here. I'd change the wording.

There are some devices in the debug board, such as lan9217 ethernet.

If

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

mxc_expio_init failed,
then the lan9217 can't be use.

Of course. But this does not make devices on the main board unusable, isn't it? The user might think that his whole system is unusable because of this init failure.

Ok, no relation with main board, to avoid confuse, maybe "all devices on

the *debug* board are unusable" is more make sense, is it ok?

Thanks,
Xiao Jiang

Quoted 22 lines
Quoted 1 line
Quoted 1 line

BTW: In mach-mx5/board-mx51_3ds.c and mach-mx31_3ds.c, the warn

messages

Quoted 5 lines
Quoted 5 lines

are same.
if (mxc_expio_init(MX51_CS5_BASE_ADDR,
EXPIO_PARENT_INT))

printk(KERN_WARNING "Init of the debugboard failed,

all "

Quoted 9 lines
Quoted 5 lines

"devices on the board are
unusable.\n");

Ooo, I pressed the keyboard neglectfully[?], and you can see below

sentence in mach-mx31_3ds.c.
if (!mxc_expio_init(CS5_BASE_ADDR, EXPIO_PARENT_INT))
printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n");

Then this wording should also change there. Adding Jason Wang to Cc.

baruch

Quoted 9 lines
Quoted 2 lines

Thanks,
Xiao Jiang

--

                                                     ~. .~   Tk Open

Systems =}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/a17d2d10/attachment.html>

#6 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

In reply to Baruch Siach
Quoted 72 lines · Baruch Siach

Hi xiao,

Quoted 44 lines · xiao jiang

2010/10/21 xiao jiang <[email protected]>

Quoted 42 lines

2010/10/20 Baruch Siach <[email protected]>

Quoted 33 lines · On Wed, Oct 20, 2010 at 05:34:43PM +0800, jgq516 at gmail.com wrote:
Quoted 19 lines

From: Xiao Jiang <[email protected]>

Enable debug board support for mx35pdk. As suggested by Fabio, add MXC_DEBUG_BOARD config and redefinition EXPIO_PARENT_INT.

---
 arch/arm/mach-mx3/Kconfig         |    1 +
 arch/arm/mach-mx3/mach-mx35_3ds.c |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mx3/Kconfig +0 -0
index 85beece..cdf6ac5 100644

[snip]

arch/arm/mach-mx3/Kconfig static void __init mxc_board_init(void) · line 106

Quoted 9 lines
arch/arm/mach-mx3/Kconfig +4 -0
@@ -95,6 +99,10 @@ static void __init mxc_board_init(void)
      imx35_add_imx_uart0(&uart_pdata);
 
      mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+
+     if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+             pr_warn("Init of the debugboard failed, all "
+                     "devices on the board are unusable.\n");
 
                            ^^^^^
Quoted 4 lines

You probably mean debugboard here. I'd change the wording.

There are some devices in the debug board, such as lan9217 ethernet. If

mxc_expio_init failed,
then the lan9217 can't be use.

Of course. But this does not make devices on the main board unusable, isn't it? The user might think that his whole system is unusable because of this init failure.

Quoted 10 lines
Quoted 10 lines

BTW: In mach-mx5/board-mx51_3ds.c and mach-mx31_3ds.c, the warn messages are same.
if (mxc_expio_init(MX51_CS5_BASE_ADDR,
EXPIO_PARENT_INT))

printk(KERN_WARNING "Init of the debugboard failed, all "

"devices on the board are
unusable.\n");

Quoted 7 lines
Quoted 2 lines

Ooo, I pressed the keyboard neglectfully[?], and you can see below

sentence in mach-mx31_3ds.c.
if (!mxc_expio_init(CS5_BASE_ADDR, EXPIO_PARENT_INT))
printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n");

Quoted 5 lines

Then this wording should also change there. Adding Jason Wang to Cc.

baruch

Yes, you are right, this is a misleading word. should s/board/debugboard/. In addition, for mach-mx31_3ds.c, we should remove "!" before mxc_expio_init().

I will fix it ASAP.

Thanks,
Jason.

Quoted 5 lines
Quoted 3 lines

Thanks,
Xiao Jiang

#7 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

In reply to jgq516 at gmail.com

Xiao.

On Wed, Oct 20, 2010 at 7:34 AM, <[email protected]> wrote:
...

Quoted 5 lines

? ? ? ?mxc_register_device(&mxc_otg_udc_device, &usb_pdata); +
+ ? ? ? if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+ ? ? ? ? ? ? ? pr_warn("Init of the debugboard failed, all "
+ ? ? ? ? ? ? ? ? ? ? ? "devices on the board are unusable.\n");

' if (!mxc_expio_init' should be used here as I mentioned previously.

mxc_expio_init returns 0 if succesful.

Regards,

Fabio Estevam

#8 lore raw

PATCH v2 1/1 mx35pdk: add debug board support

Quoted 10 lines · Fabio Estevam

Xiao.

On Wed, Oct 20, 2010 at 7:34 AM, ?<[email protected]> wrote:
...

Quoted 5 lines

? ? ? ?mxc_register_device(&mxc_otg_udc_device, &usb_pdata); +
+ ? ? ? if (mxc_expio_init(MX35_CS5_BASE_ADDR, EXPIO_PARENT_INT))
+ ? ? ? ? ? ? ? pr_warn("Init of the debugboard failed, all "
+ ? ? ? ? ? ? ? ? ? ? ? "devices on the board are unusable.\n");

Quoted 3 lines

?' if (!mxc_expio_init' ?should be used here as I mentioned previously.

mxc_expio_init returns 0 if succesful.

Ops, sorry. 'if (mxc_expio_init' check is correct.

So I think the only thing you need to address in v3 is the comment from Baruch.

Thanks,

Fabio Estevam