Skip to contentSkip to conversation

Add support for Wandboard quad.

PATCH Superseded Tapani Utriainen 4 participants 7 messages May 28, 2013 – Jun 20, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

Add support for Wandboard quad.

---
Changes from v1:
- reorganized the board names into alphabetical order
- added quad entry to the Wandboard README

 board/wandboard/README      | 5 +++++
 boards.cfg                  | 1 +
 include/configs/wandboard.h | 2 ++
 3 files changed, 8 insertions(+)
board/wandboard/README +5 -0
index e0b0b33..ff43e03 100644
@@ -17,6 +17,11 @@ To build U-Boot for the Wandboard Dual Lite version:
 $ make wanboard_dl_config
 $ make
 
+To build U-Boot for the Wandboard Quad version:
+
+$ make wandboard_quad_config
+$ make
+
 To build U-Boot for the Wandboard Solo version:
 
 $ make wanboard_solo_config
boards.cfg +1 -0
index 98a512e..b510555 100644
@@ -267,6 +267,7 @@ nitrogen6q2g                 arm         armv7       nitrogen6x          boundar    
 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_quad              arm         armv7       wandboard           -              mx6 wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048
 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
include/configs/wandboard.h +2 -0
index 120e3f6..ac86626 100644
@@ -83,6 +83,8 @@
 
 #if defined(CONFIG_MX6DL)
 #define CONFIG_DEFAULT_FDT_FILE                "imx6dl-wandboard.dtb"
+#elif defined(CONFIG_MX6Q)
+#define CONFIG_DEFAULT_FDT_FILE                "imx6q-wandboard.dtb"
 #elif defined(CONFIG_MX6S)
 #define CONFIG_DEFAULT_FDT_FILE                "imx6s-wandboard.dtb"
 #endif

--
1.8.0.3

#2 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

In reply to Tapani Utriainen

Hi Tapani,

Quoted 5 lines · Tapani Utriainen

Add support for Wandboard quad.

---

Due to increased memory, a warning is generated for wandboard_quad:

wandboard.c: In function 'dram_init':
wandboard.c:47:31: warning: integer overflow in expression [-Woverflow]

It is better to fix it directly into this patch. Can you fix it by casting to phys_size_t and resubmit ?

	gd->ram_size = (phys_size_t)CONFIG_DDR_MB * SZ_1M;

By the way, I forget why it is not possible to use get_ram_size() here. I know this is not part of this patch (could be done later), but any hints why we cannot use as usual get_ram_size() in dram_init ?

Thanks,
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
=====================================================================
#3 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

Dear Stefano Babic,

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

It is better to fix it directly into this patch. Can you fix it by casting to phys_size_t and resubmit ?

	gd->ram_size = (phys_size_t)CONFIG_DDR_MB * SZ_1M;

Please do NOT use these terrible SZ_* defines. Never, ever.

They are dangerous and should be avoided.

Best regards,

Wolfgang Denk

Signature · 7 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
Carelessly planned projects take three times longer to complete  than
expected.  Carefully  planned  projects  take  four  times  longer to
complete than expected, mostly  because  the  planners  expect  their
planning to reduce the time it takes.
#4 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

Quoted 4 lines · Wolfgang Denk

Dear Stefano Babic,

Quoted 1 line · In message <[email protected]> you wrote:
Quoted 9 lines
Quoted 4 lines

It is better to fix it directly into this patch. Can you fix it by casting to phys_size_t and resubmit ?

      gd->ram_size = (phys_size_t)CONFIG_DDR_MB * SZ_1M;

Please do NOT use these terrible SZ_* defines. Never, ever.

They are dangerous and should be avoided.

Do you mind to explain why?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

Dear Otavio,

Quoted 7 lines · In message <CAP9ODKonqM3QLeryOBrgvgfqwdrT+2ePfk+MBECzewDhjQ6FQg@mail.gmail.com>…
Quoted 5 lines

Please do NOT use these terrible SZ_* defines. Never, ever.

They are dangerous and should be avoided.

Do you mind to explain why?

Well, what does "SZ_1M" mean? Is it 1000 * 1000 (as on hard disk drives) or 1000 * 1024 (as on floppy disks) or 1024 * 1024 (as for memory sizes)?

Instead of just seeing at first look what the code does, you have to look up the actual define, i. e. it obfuscates the code instead of being helpful.

This has been discussed several times before on the list; see for example [1] or [2].

[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/67552/focus=67575
[2] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/93425

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
I paid too much for it, but its worth it.
#6 lore raw

PATCH v2 1/1 Add support for Wandboard quad.

In reply to Tapani Utriainen

Hello Tapani,

Quoted 4 lines · Tapani Utriainen

Add support for Wandboard quad.

Can you handle the comments done by Wolfgang and Stefano?

It'd be very good to have it merged for 2013.07 but we're getting short on time.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750