Skip to contentSkip to conversation

Add initial support for Wandboard dual lite and solo.

PATCH Superseded Fabio Estevam 5 participants 18 messages Mar 14, 2013 – Mar 20, 2013

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

From: Fabio Estevam <[email protected]>

Add initial support for Wandboard.

Wandboard is a development board that has two variants: one version based on mx6 dual lite and another one based on mx6 solo.

For details on the features of Wandboard, please refer to:
http://www.wandboard.org/

---
Changes since v3:
- Rebased after fixing nitrogen DDR size:
http://marc.info/?l=u-boot&m=136321557726201&w=2

Changes since v2:
- Also added support to the mx6solo variant.
- Rebased against u-boot-imx

Changes since v1:
- Use get_ram_size
- Remove ARP_TIMEOUT
- Remove unneeded "1u"

 MAINTAINERS                                |    1 +
 arch/arm/include/asm/arch-mx6/mx6dl_pins.h |    3 +
 board/wandboard/Makefile                   |   29 ++++
 board/wandboard/wandboard.c                |  181 ++++++++++++++++++++++++
 boards.cfg                                 |    2 +
 include/configs/wandboard.h                |  207 ++++++++++++++++++++++++++++
 6 files changed, 423 insertions(+)
 create mode 100644 board/wandboard/Makefile
 create mode 100644 board/wandboard/wandboard.c
 create mode 100644 include/configs/wandboard.h
MAINTAINERS +1 -0
index f490d62..791afce 100644
@@ -664,6 +664,7 @@ Fabio Estevam <[email protected]>
 	mx53smd		i.MX53
 	mx6qsabresd	i.MX6Q
 	mx6qsabreauto	i.MX6Q
+	wandboard	i.MX6DL/S
 
 Daniel Gorsulowski <[email protected]>
 
arch/arm/include/asm/arch-mx6/mx6dl_pins.h +3 -0
index 9494e41..9846f1b 100644
@@ -50,6 +50,8 @@
 #define NO_MUX_I                0
 #define NO_PAD_I                0
 enum {
+	MX6_PAD_CSI0_DAT10__UART1_TXD		= IOMUX_PAD(0x0360, 0x004C, 3, 0x0000, 0, 0),
+	MX6_PAD_CSI0_DAT11__UART1_RXD		= IOMUX_PAD(0x0364, 0x0050, 3, 0x08FC, 1, 0),
 	MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK = IOMUX_PAD(0x03B0, 0x009C, 0, 0x0000, 0, PAD_CTL_DSE_120ohm),
 	MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15	= IOMUX_PAD(0x03B4, 0x00A0, 0, 0x0000, 0, PAD_CTL_DSE_120ohm),
 	MX6_PAD_DI0_PIN2__IPU1_DI0_PIN2	= IOMUX_PAD(0x03B8, 0x00A4, 0, 0x0000, 0, PAD_CTL_DSE_120ohm),
@@ -90,6 +92,7 @@ enum {
 	MX6_PAD_EIM_D27__UART2_RXD		= IOMUX_PAD(0x0540, 0x0170, 4, 0x0904, 1, 0),
 	MX6_PAD_EIM_D28__I2C1_SDA		= IOMUX_PAD(0x0544, 0x0174, 1 | IOMUX_CONFIG_SION, 0x086C, 1, 0),
 	MX6_PAD_EIM_D28__GPIO_3_28		= IOMUX_PAD(0x0544, 0x0174, 5, 0x0000, 0, 0),
+	MX6_PAD_EIM_D29__GPIO_3_29		= IOMUX_PAD(0x0548, 0x0178, 5, 0x0000, 0, 0),
 	MX6_PAD_ENET_MDC__ENET_MDC		= IOMUX_PAD(0x05B8, 0x01E8, 1, 0x0000, 0,  0),
 	MX6_PAD_ENET_MDIO__ENET_MDIO		= IOMUX_PAD(0x05BC, 0x01EC, 1, 0x0810, 0, 0),
 	MX6_PAD_ENET_REF_CLK__ENET_TX_CLK	= IOMUX_PAD(0x05C0, 0x01F0, 1, 0x0000, 0, 0),
board/wandboard/Makefile new file +29 -0
new file mode 100644
index 0000000..014ea6c
@@ -0,0 +1,29 @@
+#
+# (C) Copyright 2013 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).o
+
+COBJS  := wandboard.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):        $(obj).depend $(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/wandboard/wandboard.c new file +181 -0

181 lines not on this page · raw message

boards.cfg +2 -0
index 84f96e0..9fd4bd6 100644
@@ -261,6 +261,8 @@ nitrogen6q                   arm         armv7       nitrogen6x          boundar
 nitrogen6q2g                 arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048
 nitrogen6s                   arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512
 nitrogen6s1g                 arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,DDR_MB=1024
+wandboard_dl		     arm	 armv7	     wandboard		 -		mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024
+wandboard_solo		     arm	 armv7	     wandboard		 -		mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512
 cm_t35                       arm         armv7       cm_t35              -              omap3
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
include/configs/wandboard.h new file +207 -0

207 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Dear Fabio Estevam,

Quoted 3 lines · In message <[email protected]> you wrote:

From: Fabio Estevam <[email protected]>

Add initial support for Wandboard.

Subject and commit message are redundant, resulting in text like this:

Add initial support for Wandboard dual lite and solo.

Add initial support for Wandboard.

Please remove the second line.

Quoted 10 lines
 MAINTAINERS                                |    1 +
 arch/arm/include/asm/arch-mx6/mx6dl_pins.h |    3 +
 board/wandboard/Makefile                   |   29 ++++
 board/wandboard/wandboard.c                |  181 ++++++++++++++++++++++++
 boards.cfg                                 |    2 +
 include/configs/wandboard.h                |  207 ++++++++++++++++++++++++++++
 6 files changed, 423 insertions(+)
 create mode 100644 board/wandboard/Makefile
 create mode 100644 board/wandboard/wandboard.c
 create mode 100644 include/configs/wandboard.h

The patch does not apply cleanly against current u-boot-imx#master; there are conflicts for boards.cfg

It would be nice if there was some board/wandboard/README that describes how to install a new U-Boot image on a running system.

board/wandboard/wandboard.c line 174

Quoted 4 lines
board/wandboard/wandboard.c new file +4 -0
+u32 get_board_rev(void)
+{
+	return 0x61011;
+}

Umm... This is very ugly. Where is this magic number coming froim, and what does it mean? It makes no sense to me to hardcode the board revision number into the U-Boot image??

board/wandboard/wandboard.c line 178

Quoted 3 lines
board/wandboard/wandboard.c new file +3 -0
+int checkboard(void)
+{
+	puts("Board: Wandboard\n");

Should we also add information about DL / Solo here? It would probably make sense...

...

Quoted 1 line

+#define CONFIG_MACH_TYPE 4412

Should this not rather be:

	#define	MACH_TYPE_WANDBOARD	4412
	#define CONFIG_MACH_TYPE	MACH_TYPE_WANDBOARD

so we can remove this when machtypes gets updated?

Is there only a single MACH_TYPE for the DL and Solo variants?

include/configs/wandboard.h line 22

Quoted 2 lines
include/configs/wandboard.h new file +2 -0
+#include <asm/arch/imx-regs.h>
+#include <asm/imx-common/gpio.h>

Please move includes to the start of the file.

include/configs/wandboard.h line 30

Quoted 2 lines
include/configs/wandboard.h new file +2 -0
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)

Why do we need that much?

Quoted 1 line

+#define CONFIG_BOOTDELAY 1

Is there any reason for not chosing the more standard 5 second delay?

Quoted 1 line

+#define CONFIG_PREBOOT ""

Omit this?

include/configs/wandboard.h line 89

Quoted 7 lines
include/configs/wandboard.h new file +7 -0
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"script=boot.scr\0" \
+	"uimage=uImage\0" \
+	"console=ttymxc0\0" \
+	"fdt_high=0xffffffff\0" \
+	"initrd_high=0xffffffff\0" \
+	"fdt_file=imx6dl-wandboard.dtb\0" \

Should this not be adjusted for the Solo variant?

include/configs/wandboard.h line 170

Quoted 2 lines
include/configs/wandboard.h new file +2 -0
+#define CONFIG_SYS_MEMTEST_START	0x10000000
+#define CONFIG_SYS_MEMTEST_END		0x10010000

This makes no sense. Please see doc/README.memory-test

I can confirm that the code boots on a wanboard_dl system, but it does not find the environment as used by the original Technixion port. Is this intentional?

Can we please remove the "Reset cause: WDOG" line in production mode?

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
 The software required `Windows 95 or better', so I installed Linux.
author reviewer
#2 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Hi Wolfgang,

Quoted 7 lines · Wolfgang Denk

Dear Fabio Estevam,

Quoted 3 lines · In message <[email protected]> you wrote:

From: Fabio Estevam <[email protected]>

Add initial support for Wandboard.

Quoted 7 lines

Subject and commit message are redundant, resulting in text like this:

Add initial support for Wandboard dual lite and solo.

Add initial support for Wandboard.

Please remove the second line.

Thanks for the review. I will address your comments and send v5 after the nitrogen patches are applied into u-boot.imx.

Quoted 3 lines
Quoted 1 line

+#define CONFIG_BOOTDELAY 1

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

Quoted 3 lines

I can confirm that the code boots on a wanboard_dl system, but it does not find the environment as used by the original Technixion port. Is this intentional?

To be honest I haven't really checked the environment settings used in the original Technixion port.

Hopefully this is not a problem.

Quoted 1 line

Can we please remove the "Reset cause: WDOG" line in production mode?

Do you mean the change below?

arch/arm/imx-common/cpu.c +1 -1
@@ -148,7 +148,7 @@ int print_cpuinfo(void)
                (cpurev & 0x000F0) >> 4,
                (cpurev & 0x0000F) >> 0,
                mxc_get_clock(MXC_ARM_CLK) / 1000000);
-       printf("Reset cause: %s\n", get_reset_cause());
+       debug("Reset cause: %s\n", get_reset_cause());
        return 0;
 }
 #endif

Since this is common code I can address it separately with other patch. Just let me know if this is OK.

Regards,

Fabio Estevam

#3 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Quoted 18 lines · Fabio Estevam

Hi Wolfgang,

Quoted 7 lines · Wolfgang Denk

Dear Fabio Estevam,

Quoted 3 lines · In message <[email protected]> you wrote:

From: Fabio Estevam <[email protected]>

Add initial support for Wandboard.

Quoted 7 lines

Subject and commit message are redundant, resulting in text like this:

Add initial support for Wandboard dual lite and solo.

Add initial support for Wandboard.

Please remove the second line.

Quoted 8 lines

Thanks for the review. I will address your comments and send v5 after the nitrogen patches are applied into u-boot.imx.

Quoted 3 lines
Quoted 1 line

+#define CONFIG_BOOTDELAY 1

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

There's a pretty even distribution of 1 3 and 5 second delays (with a few 10s, 2s and 6s). If they want 1, let them have 1, it's not hard to break into, you have U-Boot starting + 1sec.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130314/802d8aa3/attachment.pgp>
#4 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Dear Tom,

Quoted 8 lines · In message <20130314173648.GX23324@bill-the-cat> you wrote:
Quoted 4 lines
Quoted 2 lines

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

There's a pretty even distribution of 1 3 and 5 second delays (with a few 10s, 2s and 6s). If they want 1, let them have 1, it's not hard to break into, you have U-Boot starting + 1sec.

The question is who "they" are. My vote is for 5 :-)

A quick AWK oneliner in include/configs finds this statistics:

	Value Count
	 -1:    49
	  0:    12
	  1:    59
	  2:    30
	  3:   150
	  5:   175
	  6:    14
	 10:    38
	 20:     1

[And this does not take into account that for example amcc-common.h which defines a value of 5 is included by 28 other board config files...]

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Give a man a fish, and you feed him for a day. Teach a man  to  fish,
and he'll invite himself over for dinner.             - Calvin Keegan
#5 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Wolfgang Denk

Dear Tom,

Quoted 6 lines · In message <20130314173648.GX23324@bill-the-cat> you wrote:
Quoted 5 lines
Quoted 3 lines

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

Quoted 7 lines
Quoted 3 lines

There's a pretty even distribution of 1 3 and 5 second delays (with a few 10s, 2s and 6s). If they want 1, let them have 1, it's not hard to break into, you have U-Boot starting + 1sec.

The question is who "they" are. My vote is for 5 :-)

A quick AWK oneliner in include/configs finds this statistics:

OK, I forgot to sub -1 from 1, oops. So it's not very even, but...

Quoted 3 lines

Value Count -1: 49 0: 12 1: 59 2: 30 3: 150 5: 175
6: 14 10: 38 20: 1

We have a lot of variation and no "standard" aside from "board maintainer picks". While I'd strongly question anyone who did > 10 I think this is a board maintainer decision. Now, if you've convinced Fabio that 5 or 3 just makes more sense than 1 for all the right reasons, great. But "I think 1 is too short" isn't a good one. 1 is plenty of time to get a keypress in and stop the boot given that you have roughly from u-boot starting to press any key, not just when the countdown is going. Unless you have a bug in your timer code :)

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRQjrHAAoJENk4IS6UOR1WsZIQAJv0BwogMTtfpaijt10frY2Z 9TiVbSz+GLAsHG1KpxmWG8K1D6mFVuQw6/96+8ARdZCeLdcqKXZjPLcydmmO6Ths HLR22EcGpUDVmfgi15LUGxD/uct/MZYwl0w9NWfEQBeuluEPlGN6Rahv9gtQeZmI U/3fBLX8S/LhX1WunVDRyDn2YBRedR2AvlLQbkd7JeondPqL72Cspnwr2QgpumJc mqua9zXHiXzzS0HdLDoQxdwWM9wCF7Xl2+go744gvv3Rr/hot7eWwPy5DjAPDMlL bjdhgtsg1kcjlJqdvKz3TpV5WC5bkbdHXR7G9xaNCL1ibkN5SWg9YhwelbLYGl+r Enbov0r0jG5XHfv2QfxutPnIOb1EptH9//926Wu4V7Xc/n5aMeuRLer0Cqzni7Ps EbjQ8PZSwLbBla9hlW6IjlzjdXxgG74k6n/+St9np5Sfe2jLkfziMoQApkxPairr ixhCH0w+rfrMeDxZV0vubQWqG9cRlfXwWdKIbdGZm0vpZWC5wFSqbMcqTuz/Edyx E5H4M6TGmXV+bWG/ShWeQ+ybxBgKmikyMcGYuVr9MtUgaHkwmAf+WEITUWXDi6iX tUCR+tXwnRvMxQoPu45U1xLA2VedofvTukZaLWrarP5o7yhCU7BE7Kx4gsjQMH2V E6PGT31eUj3m+Ila3mWd
=PZeB
-----END PGP SIGNATURE-----

#6 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Quoted 24 lines · Tom Rini

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Wolfgang Denk

Dear Tom,

Quoted 6 lines · In message <20130314173648.GX23324@bill-the-cat> you wrote:
Quoted 5 lines
Quoted 3 lines

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

Quoted 7 lines
Quoted 3 lines

There's a pretty even distribution of 1 3 and 5 second delays (with a few 10s, 2s and 6s). If they want 1, let them have 1, it's not hard to break into, you have U-Boot starting + 1sec.

The question is who "they" are. My vote is for 5 :-)

A quick AWK oneliner in include/configs finds this statistics:

OK, I forgot to sub -1 from 1, oops. So it's not very even, but...

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

Value Count -1: 49 0: 12 1: 59 2: 30 3: 150 5: 175
6: 14 10: 38 20: 1

We have a lot of variation and no "standard" aside from "board maintainer picks". While I'd strongly question anyone who did > 10 I think this is a board maintainer decision.

It looks like a lot of the 10s are Freescale reference boards... I don't think it was a conscious decision there, just something that got copied and pasted. We generally use 3 seconds internally in our board farm.

As for the default, does it make sense to autoboot at all? What are the odds that the default configuration works as is (e.g. network configuration or images in flash)? And personally, I find autoboot quite annoying during development (except for booting a secondary flash bank from a locked primary bank) -- it just adds risk of booting the new kernel before it's ready (or adds time if I have to wait until the new kernel's ready before I reboot).

Quoted 6 lines

Now, if you've convinced
Fabio that 5 or 3 just makes more sense than 1 for all the right reasons, great. But "I think 1 is too short" isn't a good one. 1 is plenty of time to get a keypress in and stop the boot given that you have roughly from u-boot starting to press any key, not just when the countdown is going. Unless you have a bug in your timer code :)

It's barely enough time if I'm watching for it, ready to pounce (and network lag doesn't strike at the wrong moment) -- but otherwise it's an extra reboot (or jamming Ctrl-C at a not-working network load until it finally listens) if I'm not expecting it (new environment, or someone else used the board last, etc).

-Scott

#7 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

In reply to Fabio Estevam

Dear Fabio,

Quoted 4 lines · In message <CAOMZO5AVbVjXhHvMmZYRmroBWZYXb_-_4eNiQVTUjOOXD=iDhg@mail.gmail.com>…
Quoted 2 lines

Is there any reason for not chosing the more standard 5 second delay?

Ok, so let's go with 3 seconds then ;-)

Why not 5? For development, 1 or 3 is often quite short. I've seen enough cases where connecting to a serial port (for example, through one of thos @#&^!*y USB devices) eats a major part of that time. And for production mode when boot times are important you don;t want such a dealy anyway, not even with 1 or with 3 seconds.

Quoted 3 lines
Quoted 3 lines

I can confirm that the code boots on a wanboard_dl system, but it does not find the environment as used by the original Technixion port. Is this intentional?

Sorry for my typo. The company name is Technexion.

Quoted 4 lines

To be honest I haven't really checked the environment settings used in the original Technixion port.

Hopefully this is not a problem.

Not really a problem. I just wondered if there was a good reason to chose a different location for the environment. BTW - would it not make sense to enable redundant environment?

Actually I don;t think it is worth keepin the old settings, but that's just my opinion. Other users might be surprised to lose their whole environment settings when updating from the vendor provided version to mainline, so at least a warning should go to the board specific README.

Quoted 16 lines
Quoted 1 line

Can we please remove the "Reset cause: WDOG" line in production mode?

Do you mean the change below?

arch/arm/imx-common/cpu.c +1 -1
@@ -148,7 +148,7 @@ int print_cpuinfo(void)
                (cpurev & 0x000F0) >> 4,
                (cpurev & 0x0000F) >> 0,
                mxc_get_clock(MXC_ARM_CLK) / 1000000);
-       printf("Reset cause: %s\n", get_reset_cause());
+       debug("Reset cause: %s\n", get_reset_cause());
        return 0;
 }
 #endif
Quoted 2 lines

Since this is common code I can address it separately with other patch. Just let me know if this is OK.

Indeed this is common code, I see it now. So yes, if we change this, it should be done as separate patch. I think debug() makes a lot of sense here to reduce the output at boot time to a reasonable minimum, but then - is there another way for the user to inquire for this information. If not, should we add it to the bdinfo output?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I used to think that the brain was the most wonderful  organ  in  my
body. Then I realized who was telling me this."        - Emo Phillips
#8 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Quoted 2 lines · Wolfgang Denk

Dear Fabio,

Hi Wolfgang, hi Fabio,

Quoted 16 lines
Quoted 16 lines
Quoted 1 line

Can we please remove the "Reset cause: WDOG" line in production mode?

Do you mean the change below?

arch/arm/imx-common/cpu.c +1 -1
@@ -148,7 +148,7 @@ int print_cpuinfo(void)
                (cpurev & 0x000F0) >> 4,
                (cpurev & 0x0000F) >> 0,
                mxc_get_clock(MXC_ARM_CLK) / 1000000);
-       printf("Reset cause: %s\n", get_reset_cause());
+       debug("Reset cause: %s\n", get_reset_cause());
        return 0;
 }
 #endif
Quoted 8 lines
Quoted 2 lines

Since this is common code I can address it separately with other patch. Just let me know if this is OK.

Indeed this is common code, I see it now. So yes, if we change this, it should be done as separate patch. I think debug() makes a lot of sense here to reduce the output at boot time to a reasonable minimum, but then - is there another way for the user to inquire for this information. If not, should we add it to the bdinfo output?

Reset cause is a very important information - we can know if the processor gets a watchdog, or if a power on happened. The last one can address to hiddden issues with the power supply.

I understand that less redundant information is better, but this is very important info and it cannot be used only if DEBUG is set. IMHO we should let it as it is - it helps us when something bad happens.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#9 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Dear Stefano Babic,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 6 lines

Indeed this is common code, I see it now. So yes, if we change this, it should be done as separate patch. I think debug() makes a lot of sense here to reduce the output at boot time to a reasonable minimum, but then - is there another way for the user to inquire for this information. If not, should we add it to the bdinfo output?

Quoted 7 lines

Reset cause is a very important information - we can know if the processor gets a watchdog, or if a power on happened. The last one can address to hiddden issues with the power supply.

I understand that less redundant information is better, but this is very important info and it cannot be used only if DEBUG is set. IMHO we should let it as it is - it helps us when something bad happens.

I agree that it is important information, and there should be a way that the user can get at this information. But I see no urgent need to print this for everyboot, where it is just costing us precious boot time (yes, it's only a few milliseconds, but they are trivial to save).

That was why I suggested to add thjis information for example to the output of the "bdinfo" command.

BTW: if I type "reset", I will get a message "Reset cause: WDOG". I know why, but most users will not know thy they see a watchdog reset here, so actually this information may be more confusing than helpful in a number of cases (which is IMO one more reason to not always to display it - it saves us a number of unproductive support requests).

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If today is the first day of the rest of your life, what the hell was
yesterday?
#10 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Quoted 2 lines · Wolfgang Denk

Dear Stefano Babic,

Hi Wolfgang,

Quoted 8 lines

I agree that it is important information, and there should be a way that the user can get at this information. But I see no urgent need to print this for everyboot, where it is just costing us precious boot time (yes, it's only a few milliseconds, but they are trivial to save).

That was why I suggested to add thjis information for example to the output of the "bdinfo" command.

That is fine - but then it should be consistent. We have tried to have a consistent API between SOCs (I mean: iMX SOCs), that is, each SOC in the i.MX family should implement the same functions and not invent a new one, And the behavior must beconsistent, too. I know we are far away to be perfect, and some code can be further factorized (this was the reason to add imx_common).

To the specific case, each i.MX SOC implements a get_reset_cause() function:

arch/arm/cpu/arm1136/mx31/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm1136/mx31/generic.c: printf("Reset cause: %s\n",

arch/arm/cpu/arm1136/mx35/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm1136/mx35/generic.c: printf("Reset cause: %s\n",
get_reset_cause());

arch/arm/cpu/arm926ejs/mx25/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm926ejs/mx25/generic.c: printf("Reset cause: %s\n\n",

arch/arm/imx-common/cpu.c:char *get_reset_cause(void)
arch/arm/imx-common/cpu.c: printf("Reset cause: %s\n", get_reset_cause());

Checking this I see also that the mx53loco does not use general code (bad !):

board/freescale/mx53loco/mx53loco.c: printf("Reset cause: %s\n",

It is ok to move the information to bdinfo, but then it should not break the consistence: all i.MX should follow the same rule. This makes also easier for board maintainers to switch from a SOC to the next one, because they have to provide quite the same functions in their code (and using the same functions, too.).

Quoted 5 lines

BTW: if I type "reset", I will get a message "Reset cause: WDOG". I know why, but most users will not know thy they see a watchdog reset here, so actually this information may be more confusing than helpful in a number of cases (which is IMO one more reason to not always to display it - it saves us a number of unproductive support requests).

I agree with you that this should be done by a separate patchset: it is not related to the Wandboard. But if we go on this way, the same changes should be done for all i.MX, not only for i.MX5/i.MX6.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#11 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Dear Stefano,

Quoted 6 lines · In message <[email protected]> you wrote:

It is ok to move the information to bdinfo, but then it should not break the consistence: all i.MX should follow the same rule. This makes also easier for board maintainers to switch from a SOC to the next one, because they have to provide quite the same functions in their code (and using the same functions, too.).

100% agreement.

Quoted 3 lines

I agree with you that this should be done by a separate patchset: it is not related to the Wandboard. But if we go on this way, the same changes should be done for all i.MX, not only for i.MX5/i.MX6.

Indeed. It was just with this specific board that I got awre of the issue. I fully agree that we should implement a common solution that covers all these systems.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The ideal situation is to have massive computing power right at home.
Something that dims the streetlights and shrinks the picture  on  the
neighbours' TVs when you boot it up.
author reviewer
#12 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

In reply to Wolfgang Denk
Quoted 6 lines · Wolfgang Denk

board/wandboard/wandboard.c line 178

Quoted 3 lines
board/wandboard/wandboard.c new file +3 -0
+int checkboard(void)
+{
+     puts("Board: Wandboard\n");

Should we also add information about DL / Solo here? It would probably make sense...

This is what we will get:

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
Board: Wandboard

The DL / S will appear in the CPU line, so this allows to distinguish between the two variants.

Regards,

Fabio Estevam

#13 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Dear Fabio Estevam,

Quoted 8 lines · In message <CAOMZO5DEyD9qga7mbhaL-j2siqrAtYN-XYBwLZmRO6ch_0TPeQ@mail.gmail.com>…
Quoted 7 lines

board/wandboard/wandboard.c line 178

Quoted 4 lines
board/wandboard/wandboard.c new file +3 -0
+int checkboard(void)
+{
+     puts("Board: Wandboard\n");

Should we also add information about DL / Solo here? It would probably make sense...

Quoted 7 lines

This is what we will get:

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
Board: Wandboard

The DL / S will appear in the CPU line, so this allows to distinguish between the two variants.

Yes, you are right. Thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This all sounds complicated, but it mostly does excatly what you  ex-
pect. It's just difficult for us to explain what you expect...
                       - L. Wall & R. L. Schwartz, _Programming Perl_
author reviewer
#14 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

In reply to Wolfgang Denk

Hi Wolfgang,

Quoted 4 lines · Wolfgang Denk

include/configs/wandboard.h line 170

Quoted 2 lines
include/configs/wandboard.h new file +2 -0
+#define CONFIG_SYS_MEMTEST_START     0x10000000
+#define CONFIG_SYS_MEMTEST_END               0x10010000

This makes no sense. Please see doc/README.memory-test

This is something that always causes me confusion.

doc/README.memory-test is not available in u-boot-imx. but I looked in the archives.

What is a good and safe value, I should use here?

Regards,

Fabio Estevam

author reviewer
#15 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

Quoted 9 lines · Fabio Estevam

Hi Wolfgang,

Quoted 4 lines · Wolfgang Denk

include/configs/wandboard.h line 170

Quoted 2 lines
include/configs/wandboard.h new file +2 -0
+#define CONFIG_SYS_MEMTEST_START     0x10000000
+#define CONFIG_SYS_MEMTEST_END               0x10010000

This makes no sense. Please see doc/README.memory-test

Quoted 6 lines

This is something that always causes me confusion.

doc/README.memory-test is not available in u-boot-imx. but I looked in the archives.

What is a good and safe value, I should use here?

I think that the following is safe to use:

#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)

#16 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

In reply to Fabio Estevam

Dear Fabio Estevam,

Quoted 10 lines · In message <CAOMZO5D6NoTKtvx0+BPFCZHsht7fa_Ksg-VNVaQ45Tjr-XwLaA@mail.gmail.com>…
Quoted 5 lines

include/configs/wandboard.h line 170

Quoted 3 lines
include/configs/wandboard.h new file +2 -0
+#define CONFIG_SYS_MEMTEST_START     0x10000000
+#define CONFIG_SYS_MEMTEST_END               0x10010000

This makes no sense. Please see doc/README.memory-test

This is something that always causes me confusion.

doc/README.memory-test is not available in u-boot-imx. but I looked in the archives.

It's in master by now.

Quoted 1 line

What is a good and safe value, I should use here?

As explained, reasonable values for _START are just above the exception vectors - if any, and _END should be a bit below the space used for U-Boot's stack.

I have to admit that I don't understand what the i.MX6 port is doing with the memory. Normally, a warmboot should not change it's content, yet here it does. Also I don't think there are exception vectors actually used in low memory, because when I erase all this memory the system still continues to run.

Sorry, I'm afraid I'm not much of a help here.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never worry about theory as long as  the  machinery  does  what  it's
supposed to do.                                      - R. A. Heinlein
#17 lore raw

PATCH v4 1/1 Add initial support for Wandboard dual lite and solo.

In reply to Fabio Estevam
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Add initial support for Wandboard.

Quoted 8 lines

Wandboard is a development board that has two variants: one version based on mx6 dual lite and another one based on mx6 solo.

For details on the features of Wandboard, please refer to:
http://www.wandboard.org/

---

Hi Fabio,

as far as I know after rereading all threads there are no open points with this patch / board. I know that it was submitted after the merge window is closed, but as it has impact nor on common iMX code neither on general U-Boot code I will merge it for 2013.04.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================