Skip to contentSkip to conversation

Add Boundary Devices Nitrogen6X boards

PATCH Superseded Eric Nelson 6 participants 20 messages Mar 10, 2013 – Mar 11, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

---
Changes for V2:
- Update tXS, tXPR as noted by Beno?t Th?baudeau
- Use struct hdmi_regs and readb()/writeb() as noted by Wolfgang Denk
- Use get_ram_size() instead of imx_ddr_size()
- Remote unneeded CONFIG_ARP_TIMEOUT

 MAINTAINERS                                        |    8 +
 board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg    |   58 ++
 board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg    |   58 ++
 board/boundary/nitrogen6x/6x_bootscript.txt        |   63 ++
 .../boundary/nitrogen6x/6x_bootscript_android.txt  |   64 ++
 .../nitrogen6x/6x_bootscript_android_recovery.txt  |   64 ++
 board/boundary/nitrogen6x/6x_upgrade.txt           |   45 +
 board/boundary/nitrogen6x/800mhz_2x128mx16.cfg     |   58 ++
 board/boundary/nitrogen6x/800mhz_2x256mx16.cfg     |   58 ++
 board/boundary/nitrogen6x/800mhz_4x128mx16.cfg     |   57 ++
 board/boundary/nitrogen6x/800mhz_4x256mx16.cfg     |   58 ++
 board/boundary/nitrogen6x/Makefile                 |   41 +
 board/boundary/nitrogen6x/README                   |   92 ++
 board/boundary/nitrogen6x/clocks.cfg               |   46 +
 board/boundary/nitrogen6x/ddr-setup.cfg            |  112 +++
 board/boundary/nitrogen6x/nitrogen6dl.cfg          |   45 +
 board/boundary/nitrogen6x/nitrogen6dl2g.cfg        |   45 +
 board/boundary/nitrogen6x/nitrogen6q.cfg           |   45 +
 board/boundary/nitrogen6x/nitrogen6q2g.cfg         |   45 +
 board/boundary/nitrogen6x/nitrogen6s.cfg           |   45 +
 board/boundary/nitrogen6x/nitrogen6s1g.cfg         |   45 +
 board/boundary/nitrogen6x/nitrogen6x.c             |  895 ++++++++++++++++++++
 boards.cfg                                         |    6 +
 include/configs/nitrogen6x.h                       |  286 +++++++
 24 files changed, 2339 insertions(+)
 create mode 100644 board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript.txt
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript_android.txt
 create mode 100644 board/boundary/nitrogen6x/6x_bootscript_android_recovery.txt
 create mode 100644 board/boundary/nitrogen6x/6x_upgrade.txt
 create mode 100644 board/boundary/nitrogen6x/800mhz_2x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_2x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_4x128mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/800mhz_4x256mx16.cfg
 create mode 100644 board/boundary/nitrogen6x/Makefile
 create mode 100644 board/boundary/nitrogen6x/README
 create mode 100644 board/boundary/nitrogen6x/clocks.cfg
 create mode 100644 board/boundary/nitrogen6x/ddr-setup.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6dl.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6dl2g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6q.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6q2g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6s.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6s1g.cfg
 create mode 100644 board/boundary/nitrogen6x/nitrogen6x.c
 create mode 100644 include/configs/nitrogen6x.h
MAINTAINERS +8 -0
index 175bbe2..f490d62 100644
@@ -1037,6 +1037,14 @@ Pali Roh?r <[email protected]>
 
 	nokia_rx51	ARM ARMV7 (OMAP34xx SoC)
 
+Eric Nelson <[email protected]>
+	nitrogen6dl		i.MX6DL		1GB
+	nitrogen6dl2g		i.MX6DL		2GB
+	nitrogen6q		i.MX6Q/6D	1GB
+	nitrogen6q2g    	i.MX6Q/6D	2GB
+	nitrogen6s		i.MX6S		512MB
+	nitrogen6s1g		i.MX6S		1GB
+
 -------------------------------------------------------------------------
 
 Unknown / orphaned boards:
board/boundary/nitrogen6x/1066mhz_4x128mx16.cfg new file +58 -0

58 lines not on this page · raw message

board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg new file +58 -0

58 lines not on this page · raw message

board/boundary/nitrogen6x/6x_bootscript.txt new file +63 -0

63 lines not on this page · raw message

board/boundary/nitrogen6x/6x_bootscript_android.txt new file +64 -0

64 lines not on this page · raw message

board/boundary/nitrogen6x/6x_bootscript_android_recovery.txt new file +64 -0

64 lines not on this page · raw message

board/boundary/nitrogen6x/6x_upgrade.txt new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/800mhz_2x128mx16.cfg new file +58 -0

58 lines not on this page · raw message

board/boundary/nitrogen6x/800mhz_2x256mx16.cfg new file +58 -0

58 lines not on this page · raw message

board/boundary/nitrogen6x/800mhz_4x128mx16.cfg new file +57 -0

57 lines not on this page · raw message

board/boundary/nitrogen6x/800mhz_4x256mx16.cfg new file +58 -0

58 lines not on this page · raw message

board/boundary/nitrogen6x/Makefile new file +41 -0

41 lines not on this page · raw message

board/boundary/nitrogen6x/README new file +92 -0

92 lines not on this page · raw message

board/boundary/nitrogen6x/clocks.cfg new file +46 -0

46 lines not on this page · raw message

board/boundary/nitrogen6x/ddr-setup.cfg new file +112 -0

112 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6dl.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6dl2g.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6q.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6q2g.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6s.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6s1g.cfg new file +45 -0

45 lines not on this page · raw message

board/boundary/nitrogen6x/nitrogen6x.c new file +895 -0

895 lines not on this page · raw message

boards.cfg +6 -0
index 7a0b79d..fb3b197 100644
@@ -255,6 +255,12 @@ mx6qsabreauto                arm         armv7       mx6qsabreauto       freesca
 mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6		mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
 mx6qsabresd                  arm         armv7       mx6qsabresd         freescale      mx6		mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
 eco5pk                       arm         armv7       eco5pk              8dtech         omap3
+nitrogen6dl                  arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024
+nitrogen6dl2g                arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg,MX6DL,DDR_MB=2048
+nitrogen6q                   arm         armv7       nitrogen6x          boundary       mx6		nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024
+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,SDRAM_MB=1024
 cm_t35                       arm         armv7       cm_t35              -              omap3
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
include/configs/nitrogen6x.h new file +286 -0

286 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

board/boundary/nitrogen6x/nitrogen6x.c line 3

Quoted 9 lines · Eric Nelson
board/boundary/nitrogen6x/nitrogen6x.c new file +3 -0
new file mode 100644
index 0000000..147bd91
@@ -0,0 +1,895 @@
+int dram_init(void)
+{
+	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);

This will hang a solo if

PHYS_SDRAM_SIZE is bigger than actual memory size

which makes calling get_ram_size pretty useless.

Troy

#2 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Dear Troy,

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

board/boundary/nitrogen6x/nitrogen6x.c line 3

Quoted 9 lines · Eric Nelson
board/boundary/nitrogen6x/nitrogen6x.c new file +3 -0
new file mode 100644
index 0000000..147bd91
@@ -0,0 +1,895 @@
+int dram_init(void)
+{
+	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);

This will hang a solo if

Quoted 3 lines

PHYS_SDRAM_SIZE is bigger than actual memory size

which makes calling get_ram_size pretty useless.

If this is the case, then there is a bug in the code resp. the code is incomplete. get_ram_size() has always been used to detect smaller than the maximum possible (configured) RAM sizes; actually this is it's main purpose.

If this is not really working, then it needs to be fixed.

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
Monday is an awful way to spend one seventh of your life.
#3 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

In reply to Troy Kisky

Hi Troy,

Quoted 14 lines · Troy Kisky

board/boundary/nitrogen6x/nitrogen6x.c line 3

Quoted 10 lines · Eric Nelson
board/boundary/nitrogen6x/nitrogen6x.c new file +3 -0
new file mode 100644
index 0000000..147bd91
@@ -0,0 +1,895 @@
+int dram_init(void)
+{
+    gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);

This will hang a solo if

Quoted 4 lines

PHYS_SDRAM_SIZE is bigger than actual memory size

which makes calling get_ram_size pretty useless.

Since the DDR size must be known in the memory configuration file, this is equivalent to saying:

get_ram_size() will hang if we run the **wrong** U-Boot binary on the device

I think this is true for other reasons as well (SATA?).

The DDR size in this translated from the boards.cfg file, which defines CONFIG_DDR_MB for each configuration and nitrogen6x.h, which uses it to define PHYS_SDRAM_SIZE

+#define PHYS_SDRAM_SIZE (CONFIG_DDR_MB * 1024 * 1024)

But your point about calling get_ram_size() being useless is probably true.

Testing for RAM that we need to configure doesn't add anything.

Regards,

Eric

#4 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

In reply to Eric Nelson

Dear Eric,

MAINTAINERS Pali Roh?r <[email protected]> · line 1046

Quoted 8 lines · In message <1362873856-14785-1-git-send-email-eric.nelson@boundarydevices.com>…
MAINTAINERS +7 -0
+Eric Nelson <[email protected]>
+	nitrogen6dl		i.MX6DL		1GB
+	nitrogen6dl2g		i.MX6DL		2GB
+	nitrogen6q		i.MX6Q/6D	1GB
+	nitrogen6q2g    	i.MX6Q/6D	2GB
+	nitrogen6s		i.MX6S		512MB
+	nitrogen6s1g		i.MX6S		1GB

Why do we need different configurations for example for nitrogen6dl and nitrogen6dl2g? My understanding is that the difference is mainly the RAM size on the boards?

In this case it should be possible to configure U-Boot for the maximum possible RAM size (2 GB here?), then have get_ram_size() detect the actual available amount, and then adjust settings as needed.

At least this is how U-Boot ius supposed to work.

It is a maintenance nightmare if each and every configuration requires a separate U-Boot image. We don't want to have this.

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
A man is not complete until he is married -- then he is finished.
#5 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Hi Wolfgang,

Quoted 4 lines · Wolfgang Denk

Dear Eric,

Quoted 1 line · In message <1362873856-14785-1-git-send-email-eric.nelson@boundarydevices.com>…
Quoted 12 lines

MAINTAINERS Pali Roh?r <[email protected]> · line 1046

Quoted 7 lines
MAINTAINERS +7 -0
+Eric Nelson <[email protected]>
+	nitrogen6dl		i.MX6DL		1GB
+	nitrogen6dl2g		i.MX6DL		2GB
+	nitrogen6q		i.MX6Q/6D	1GB
+	nitrogen6q2g    	i.MX6Q/6D	2GB
+	nitrogen6s		i.MX6S		512MB
+	nitrogen6s1g		i.MX6S		1GB

Why do we need different configurations for example for nitrogen6dl and nitrogen6dl2g? My understanding is that the difference is mainly the RAM size on the boards?

The difference is entirely the RAM size.

More specifically, it's the difference in the DDR density populated on the board.

Quoted 4 lines

In this case it should be possible to configure U-Boot for the maximum possible RAM size (2 GB here?), then have get_ram_size() detect the actual available amount, and then adjust settings as needed.

I'm not certain.

The JEDEC spec for the DDR devices we're using have quite different settings in a couple of areas. In particular, the tRFC value is quite different between densities.

They do appear to be minimums though, so we may be able to configure for the slowest value, run get_ram_size(), then reset that value once we determine whether the larger or smaller parts were populated on the board.

Quoted 5 lines

At least this is how U-Boot ius supposed to work.

It is a maintenance nightmare if each and every configuration requires a separate U-Boot image. We don't want to have this.

Well...

That throws a wrinkle into the whole patch set, since all of this code presumes that we're running from DDR and other calibration data was also gathered based on the actual parts used.

If this is a hard requirement, I don't see a solution that doesn't require the use of SPL, which will clearly take a while.

Please advise,

Eric

#6 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Dear Eric Nelson,

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

In this case it should be possible to configure U-Boot for the maximum possible RAM size (2 GB here?), then have get_ram_size() detect the actual available amount, and then adjust settings as needed.

I'm not certain.

The JEDEC spec for the DDR devices we're using have quite different settings in a couple of areas. In particular, the tRFC value is quite different between densities.

Well, of course. Different memory types / sizes will require different initialization. But this you already have in place. Now go the final step and auto-select the configuration instead of having the user (and manufacturer, and service, etc.) all suffer from the pain of always needing to know which exact configuration is needed on some board.

Quoted 4 lines

That throws a wrinkle into the whole patch set, since all of this code presumes that we're running from DDR and other calibration data was also gathered based on the actual parts used.

This is wrong then and needs to be fixed. get_ram_size() should be used before relocation into RAM.

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
The C-shell doesn't parse. It adhoculates.
    - Casper.Dik at Holland.Sun.COM in <[email protected]>
#7 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Hi Wolfgang,

Quoted 14 lines · Wolfgang Denk

Dear Eric Nelson,

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

In this case it should be possible to configure U-Boot for the maximum possible RAM size (2 GB here?), then have get_ram_size() detect the actual available amount, and then adjust settings as needed.

I'm not certain.

The JEDEC spec for the DDR devices we're using have quite different settings in a couple of areas. In particular, the tRFC value is quite different between densities.

Quoted 7 lines

Well, of course. Different memory types / sizes will require different initialization. But this you already have in place. Now go the final step and auto-select the configuration instead of having the user (and manufacturer, and service, etc.) all suffer from the pain of always needing to know which exact configuration is needed on some board.

What we don't have is auto-detection and implementing this logic requires that we execute code outside of DDR (i.e. through SPL in internal RAM).

There's no question that a (more) universal binary would be helpful, but in practice, checking the DDR parts isn't that different from double-checking the CPU variant populated on a board.

Troy's attempt at handling the CPU portion of things was nacked, which is what prompted me to this architecture of multiple CPU configurations.

Quoted 8 lines
Quoted 4 lines

That throws a wrinkle into the whole patch set, since all of this code presumes that we're running from DDR and other calibration data was also gathered based on the actual parts used.

This is wrong then and needs to be fixed. get_ram_size() should be used before relocation into RAM.

Either you or I are missing something.

As it stands, there is no "execute before relocation into RAM". The CPU's ROM boot loader processes the settings in the DCD (essentially a set of register writes) and then copies the U-Boot code into DDR for execution.

The register writes need to configure the DDR before the copy.

The only way to change this is to use a first level loader that executes code within the internal RAM so the setup can be conditional.

Are you saying that submissions of board files that don't support SPL will be nacked, or only boards that want to support multiple memory configurations without SPL?

Please advise,

Eric

#8 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Dear Eric,

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

What we don't have is auto-detection and implementing this logic requires that we execute code outside of DDR (i.e. through SPL in internal RAM).

Correct.

Quoted 3 lines

There's no question that a (more) universal binary would be helpful, but in practice, checking the DDR parts isn't that different from double-checking the CPU variant populated on a board.

I'm not sure what you want to tell me here. The thing is that you don't want to maintain a dozen of different configurations, resulting in a number of different, incompatible binary images, and you and your users will always live in fear they might install the wrong image and brick a system (OK, when you can boot from SDCard or similar recovery will be less painful, but you still suffer from the maintenance efforts).

Quoted 1 line

Troy's attempt at handling the CPU portion of things was nacked,

I don't remember this. But I guess the reason was in the implementation, not in the idea?

Quoted 2 lines

which is what prompted me to this architecture of multiple CPU configurations.

But this doesn't scale.

Quoted 4 lines
Quoted 2 lines

This is wrong then and needs to be fixed. get_ram_size() should be used before relocation into RAM.

Either you or I are missing something.

In any case I'm missing time to provide longer explanations...

Quoted 4 lines

As it stands, there is no "execute before relocation into RAM". The CPU's ROM boot loader processes the settings in the DCD (essentially a set of register writes) and then copies the U-Boot code into DDR for execution.

I understand this, and I'm trying to point out that this is an approach that is not useful in cases like yours where you have to support a large number of different configurations.

I probably should point out that with such a setup you MUST NOT use get_ram_size(), as it will write and modify the memory you are executing from, so depending on a number of things it may happily crash your system. get_ram_size() has always to be used before running any code from the RAM that is going to be tested.

Quoted 3 lines

The only way to change this is to use a first level loader that executes code within the internal RAM so the setup can be conditional.

Correct. In your situation this is the approach that shouldbe taken.

Quoted 3 lines

Are you saying that submissions of board files that don't support SPL will be nacked, or only boards that want to support multiple memory configurations without SPL?

Please note that I did not NAK anything. I'm just trying to point out deficiencies (and in my opinion prety major deficiencies) in the submitted code, and to provide suggestions how to fix these. In my experience, it is easier to get such fixes done before the code goes into mainline - once it's in, both your own motivation and any backing you can get from management levels for the required efforts for such a rework will be in a much poorer state.

So I'm just aking suggestions. Do you by chancew feel you heard me use that sweet, innocent tone of voice before? Well, then I can stop here :-)

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
What is research but a blind date with knowledge?      -- Will Harvey
#9 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Thanks Wolfgang,

Quoted 14 lines · Wolfgang Denk

Dear Eric,

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

What we don't have is auto-detection and implementing this logic requires that we execute code outside of DDR (i.e. through SPL in internal RAM).

Correct.

Quoted 3 lines

There's no question that a (more) universal binary would be helpful, but in practice, checking the DDR parts isn't that different from double-checking the CPU variant populated on a board.

Quoted 8 lines

I'm not sure what you want to tell me here. The thing is that you don't want to maintain a dozen of different configurations, resulting in a number of different, incompatible binary images, and you and your users will always live in fear they might install the wrong image and brick a system (OK, when you can boot from SDCard or similar recovery will be less painful, but you still suffer from the maintenance efforts).

I understand the point, but think the pain is manageable and mostly ours.

While we'd like to snap our fingers and have a "does everything right" boot loader, that will take a while ;)

Quoted 5 lines
Quoted 1 line

Troy's attempt at handling the CPU portion of things was nacked,

I don't remember this. But I guess the reason was in the implementation, not in the idea?

Well, at least the use of i.MX plugins to do the job. The general response was something along the lines of:

**if** we want to support multiple CPU variants in a single binary, then it should be done with SPL.

While I believe this can be done, it hasn't yet, and will likely require some of the same changes to allow sets of register values to be expressed as data instead of code.

It appeared that the NAK stemmed from a desire for less complexity.

This patch set is the simplest implementation we can think of that still allows a single board file and directory to support multiple CPU options and memory configurations.

Quoted 5 lines
Quoted 2 lines

which is what prompted me to this architecture of multiple CPU configurations.

But this doesn't scale.

It scales better than where we were: having a single blob of hex data in board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg.

This step has broken things up into parts so that we **can** express multiple memory configurations within a single board directory, and I hope it moves the ball forward a step or two.

Our hope in getting this main-lined was that other upcoming Solo and Dual-Lite platforms could share some of the bits.

Quoted 16 lines
Quoted 4 lines
Quoted 2 lines

This is wrong then and needs to be fixed. get_ram_size() should be used before relocation into RAM.

Either you or I are missing something.

In any case I'm missing time to provide longer explanations...

Quoted 4 lines

As it stands, there is no "execute before relocation into RAM". The CPU's ROM boot loader processes the settings in the DCD (essentially a set of register writes) and then copies the U-Boot code into DDR for execution.

I understand this, and I'm trying to point out that this is an approach that is not useful in cases like yours where you have to support a large number of different configurations.

Quoted 6 lines

I probably should point out that with such a setup you MUST NOT use get_ram_size(), as it will write and modify the memory you are executing from, so depending on a number of things it may happily crash your system. get_ram_size() has always to be used before running any code from the RAM that is going to be tested.

;) The addition of get_ram_size() was in response to your comment about the Wandboard submission, which does build upon the .cfg file structure of the nitrogen6x.

I guess that's what I get for adding it on the day of submission:
it looked harmless though not very useful.

Quoted 10 lines
Quoted 3 lines

The only way to change this is to use a first level loader that executes code within the internal RAM so the setup can be conditional.

Correct. In your situation this is the approach that shouldbe taken.

Quoted 3 lines

Are you saying that submissions of board files that don't support SPL will be nacked, or only boards that want to support multiple memory configurations without SPL?

Quoted 8 lines

Please note that I did not NAK anything. I'm just trying to point out deficiencies (and in my opinion prety major deficiencies) in the submitted code, and to provide suggestions how to fix these. In my experience, it is easier to get such fixes done before the code goes into mainline - once it's in, both your own motivation and any backing you can get from management levels for the required efforts for such a rework will be in a much poorer state.

I guess I misunderstood then.

Quoted 4 lines

So I'm just aking suggestions. Do you by chancew feel you heard me use that sweet, innocent tone of voice before? Well, then I can stop here :-)

I'm sorry if I sound frustrated.

This is feedback I'd hoped to get to the RFC version back in January, and it will be some time before we're in a position to add SPL into the mix.

I'll wait for further feedback before determining if a V3 patch is warranted.

Regards,

Eric

#10 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Dear Eric,

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

I understand the point, but think the pain is manageable and mostly ours.

When I say it doesn't scale, I'm not only thinking about yourown efforts, and your customers.

I also think about things like the increase of build and test time for _everybody_ who performs tests on U-Boot - instead of one board, we now have to build - how many? 6? - configurations. If we allow this now, others will copy this approach (and we cannot really reject it then). I really would like to avoid setting such a precedent here.

Quoted 2 lines

While we'd like to snap our fingers and have a "does everything right" boot loader, that will take a while ;)

I'm well aware of this.

Quoted 5 lines

Well, at least the use of i.MX plugins to do the job. The general response was something along the lines of:

**if** we want to support multiple CPU variants in a single binary, then it should be done with SPL.

This may or mayu not make sense. It certainly depends on the specific requirements of the SoC / architecture in question.

Quoted 3 lines

This patch set is the simplest implementation we can think of that still allows a single board file and directory to support multiple CPU options and memory configurations.

I agree that supporting multiple SoCs indeed adds complexity. However, supporting different memory sizes has been supported by U-Boot (and actually already by PPCBoot) since day one, so this is not really considered rocket science. Also, SPL is not exactly new technology any more.

Quoted 4 lines

This step has broken things up into parts so that we **can** express multiple memory configurations within a single board directory, and I hope it moves the ball forward a step or two.

It does. But source base is one thing. Havnig to deal with a large number of configurations to build and test is another one, and here you put additional burdon on a large number of prople.

Quoted 2 lines

Our hope in getting this main-lined was that other upcoming Solo and Dual-Lite platforms could share some of the bits.

Understood and appreciated. But I also see this ias a strong reason to come up with a clean design, and not create bad examples which others without doubt will interpret as persuasive precedent.

Quoted 1 line

I'm sorry if I sound frustrated.

You don't, and if you did I could very well understand how you feel.

I hope you can understand my position, too.

Quoted 1 line

This is feedback I'd hoped to get to the RFC version back in January,

Sorry I missed it then.

Quoted 4 lines

and it will be some time before we're in a position to add SPL into the mix.

I'll wait for further feedback before determining if a V3 patch is warranted.

I would also apprciate if others could comment - Stefano? Albert? Tom?

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 program, therefore I am.
#11 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Quoted 2 lines · Wolfgang Denk

Dear Eric,

Hi Wolfgang, hi Eric,

sorry to jump late in the discussion.

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

I understand the point, but think the pain is manageable and mostly ours.

When I say it doesn't scale, I'm not only thinking about yourown efforts, and your customers.

I also think about things like the increase of build and test time for _everybody_ who performs tests on U-Boot - instead of one board, we now have to build - how many? 6? - configurations. If we allow this now, others will copy this approach (and we cannot really reject it then). I really would like to avoid setting such a precedent here.

Quoted 2 lines

While we'd like to snap our fingers and have a "does everything right" boot loader, that will take a while ;)

I'm well aware of this.

Quoted 5 lines

Well, at least the use of i.MX plugins to do the job. The general response was something along the lines of:

**if** we want to support multiple CPU variants in a single binary, then it should be done with SPL.

This may or mayu not make sense. It certainly depends on the specific requirements of the SoC / architecture in question.

Quoted 3 lines

This patch set is the simplest implementation we can think of that still allows a single board file and directory to support multiple CPU options and memory configurations.

Quoted 5 lines

I agree that supporting multiple SoCs indeed adds complexity. However, supporting different memory sizes has been supported by U-Boot (and actually already by PPCBoot) since day one, so this is not really considered rocket science. Also, SPL is not exactly new technology any more.

Firstly I sumarize something from your previous posting in this thread. As remark about first Wolfgangs's post, there is an issue that does not allow to use get_ram_size() to tune the RAM settings, as we are usual to do with other architectures. In fact, the processor itself reads these headers (in i.MX jargon the DCD tables) at the beginning of the image and sets itself the RAM controller, copying at the end u-boot from storage to RAM - without any intervention by U-Boot code. When get_ram_size() is called, the code already runs from RAM - this is has nothing to do with relocation.

This is why Eric pushes several configuration files, whose changes are due to the different RAM chips.

The way Troy / Eric tried to manage this was to add the "plugin" facility to the imximage. However, as you have already read in the thread, this adds not only complexity, but it is also *very* special for the i.MX, and cannot be reused at all for other processors. I do not like that i.MX becomes an island in the U-Boot world and I have discouraged the usage of i.MX plugins vs SPL.

The roadmap for me is that this complexity can be easy managed (and also having different SOCs with a single image, if desired) using SPL. This is now a well known technology and can add some important features borrowed by other SOCs (falcon mode, booting from different storages, etc.).

This at the end to explain Wolfgang why I was against adding "plugins" when the RFC patchset was set - without you have to read the whole discussion, that was pretty long ;-).

Quoted 25 lines
Quoted 5 lines

This step has broken things up into parts so that we **can** express multiple memory configurations within a single board directory, and I hope it moves the ball forward a step or two.

It does. But source base is one thing. Havnig to deal with a large number of configurations to build and test is another one, and here you put additional burdon on a large number of prople.

Quoted 2 lines

Our hope in getting this main-lined was that other upcoming Solo and Dual-Lite platforms could share some of the bits.

Understood and appreciated. But I also see this ias a strong reason to come up with a clean design, and not create bad examples which others without doubt will interpret as persuasive precedent.

Quoted 1 line

I'm sorry if I sound frustrated.

You don't, and if you did I could very well understand how you feel.

I hope you can understand my position, too.

Quoted 1 line

This is feedback I'd hoped to get to the RFC version back in January,

Quoted 9 lines

Sorry I missed it then.

Quoted 4 lines

and it will be some time before we're in a position to add SPL into the mix.

I'll wait for further feedback before determining if a V3 patch is warranted.

I would also apprciate if others could comment - Stefano? Albert? Tom?

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

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
=====================================================================
#12 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Hi Stefano,

Quoted 11 lines · Stefano Babic

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

Just to make sure I understand the plan:

Do you mean that you are willing to accept current Eric's series for adding nitrogen support into 2013.04, and after this we should work on converting it to the SPL mechanism for 2013.07?

Thanks,

Fabio Estevam

#13 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Quoted 16 lines · Fabio Estevam

Hi Stefano,

Quoted 11 lines · Stefano Babic

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

Quoted 5 lines

Just to make sure I understand the plan:

Do you mean that you are willing to accept current Eric's series for adding nitrogen support into 2013.04, and after this we should work on converting it to the SPL mechanism for 2013.07?

IMHO, yes. The long term solution is using SPL, as well as it is already used in other SOCs. But at the moment, I tend to not block the current series, taking into account that we have not yet a i.MX6 board with SPL.

Best 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
=====================================================================
#14 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Quoted 3 lines · Stefano Babic

IMHO, yes. The long term solution is using SPL, as well as it is already used in other SOCs. But at the moment, I tend to not block the current series, taking into account that we have not yet a i.MX6 board with SPL.

Thanks, Stefano. Sounds like a good approach.

Regards,

Fabio Estevam

#15 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

In reply to Stefano Babic

Thanks Stefano,

Quoted 19 lines · Stefano Babic
Quoted 18 lines · Fabio Estevam

Hi Stefano,

Quoted 11 lines · Stefano Babic

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

Just to make sure I understand the plan:

Quoted 8 lines
Quoted 3 lines

Do you mean that you are willing to accept current Eric's series for adding nitrogen support into 2013.04, and after this we should work on converting it to the SPL mechanism for 2013.07?

IMHO, yes. The long term solution is using SPL, as well as it is already used in other SOCs. But at the moment, I tend to not block the current series, taking into account that we have not yet a i.MX6 board with SPL.

Then I'll forward a V3 (without get_ram_size()).

Do you want me to restrict the number of configurations to the "standard" memory configurations?

Please advise,

Eric

#16 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Quoted 32 lines · Eric Nelson

Thanks Stefano,

Quoted 20 lines · Stefano Babic
Quoted 19 lines · Fabio Estevam

Hi Stefano,

Quoted 9 lines · Stefano Babic

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric
posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

Quoted 3 lines

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

Just to make sure I understand the plan:

Quoted 8 lines
Quoted 3 lines

Do you mean that you are willing to accept current Eric's series for adding nitrogen support into 2013.04, and after this we should work on converting it to the SPL mechanism for 2013.07?

IMHO, yes. The long term solution is using SPL, as well as it is already used in other SOCs. But at the moment, I tend to not block the current series, taking into account that we have not yet a i.MX6 board with SPL.

Quoted 4 lines

Then I'll forward a V3 (without get_ram_size()).

Do you want me to restrict the number of configurations to the "standard" memory configurations?

Well, this could avoid that we add now a lot of files with the hope that later they will be cleanued up, and then this does not happen - and further configurations will be added later after switching to SPL.

Best 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
=====================================================================
#17 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

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

Quoted 40 lines · Stefano Babic
Quoted 39 lines · Eric Nelson

Thanks Stefano,

Quoted 28 lines · Stefano Babic
Quoted 20 lines · Fabio Estevam

Hi Stefano,

Quoted 10 lines · Stefano Babic

As set previously, my position is, since RFC patches were pushed in January, that some kind of complexity can be well managed with SPL instead of with very SOC specific code. However, in the meantime I said explicitely that I was not against the current patchset in the form Eric posted now. I understand this can be seen as a temporary solution, but let's increase the number of users using these boards, and taking into account that some other pending patches can help to switch to SPL.

Quoted 4 lines

In fact, there also other patchsets that I hope will be merged soon and will make the swicth to SPL easier - I mean Benoit's patches regarding NAND on MX5 and dropping old spl code from some boards.

Quoted 6 lines

Just to make sure I understand the plan:

Do you mean that you are willing to accept current Eric's series for adding nitrogen support into 2013.04, and after this we should work on converting it to the SPL mechanism for 2013.07?

Quoted 5 lines

IMHO, yes. The long term solution is using SPL, as well as it is already used in other SOCs. But at the moment, I tend to not block the current series, taking into account that we have not yet a i.MX6 board with SPL.

Then I'll forward a V3 (without get_ram_size()).

Quoted 7 lines
Quoted 2 lines

Do you want me to restrict the number of configurations to the "standard" memory configurations?

Well, this could avoid that we add now a lot of files with the hope that later they will be cleanued up, and then this does not happen
- and further configurations will be added later after switching to SPL.

Lets go this route AND make sure it's well documented enough that people with their own custom HW can easily adapt the existing examples to meet their setup (and yes, in the near future, work towards migration to SPL).

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

iQIcBAEBAgAGBQJRPeyfAAoJENk4IS6UOR1WqFYP/RsEjuooD6TzhFc9KoULRFlG IjkOvlzF8DIAVL3Zm3/Z4AOm6NkJeE5ZH47An4579Xz2ENmWYYHjeUF6ffbBMXmD 7wiwhdY99gnKEgXMJDWBzlqUCBHJucuIWX1bJIZqIElLos0VgC3UCZlwH/TQBHBx ZaP+m35BZErtElV0Lp6ezLp7HvBbXww9kb7Tif5z/T9fMirXV7biLGVT1Rm0ENVB OiCHHpF2k7JKviRPXrEGRHuFteyKj0XRi4AY8UQ5OWvi7HYEA0dQ9lAejHzRvBVA xBU0fsj1/dIasaSGn9bCwcG86A/H96BlAbYMsKlEEw0PIg0NiogGt0FObpAlxtSd 6z3LA6f2KfD3WVTO3hHyv1miMBvOxH12QQZ9jUo5k9AMnxM0zRsUi/fw7+NE1ifr L+Z9j38HfW9iUPyn1yU2IketMdpj2wYJFUb2GxOJJhLvueQutnlg9OMymBnUeTpk PoD5ukL1d2WIC3uhxY8lG28PSxqscua5gJKB1AnPJquSId3ST6NYid8vTolyqruT WXRISvm/XlXoD9If883+JxDJEY+4vt/pagDKfBpLEJRlttZdr1aTUE9+SpPZN3vO DO+p/NeZ1O6HW+9B6nm6YQGypv3b1bF0lmf1nM+A9FZ7L/vh/mzs4q7U5HmNcg0m 69t+jnn8PZxBQI/SAsQA
=aQs3
-----END PGP SIGNATURE-----

#18 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

In reply to Wolfgang Denk

Thanks Wolfgang,

Quoted 7 lines · Wolfgang Denk

Dear Eric,

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

I understand the point, but think the pain is manageable and mostly ours.

Quoted 9 lines

When I say it doesn't scale, I'm not only thinking about yourown efforts, and your customers.

I also think about things like the increase of build and test time for _everybody_ who performs tests on U-Boot - instead of one board, we now have to build - how many? 6? - configurations. If we allow this now, others will copy this approach (and we cannot really reject it then). I really would like to avoid setting such a precedent here.

Would it help if we restrict the number of boards directly in boards.cfg?

We can easily have local patches for the non-standard memory configurations in our repository, and this will at least allow build tests to include the processor variants.

<snip>

Quoted 9 lines
Quoted 4 lines

This step has broken things up into parts so that we **can** express multiple memory configurations within a single board directory, and I hope it moves the ball forward a step or two.

It does. But source base is one thing. Havnig to deal with a large number of configurations to build and test is another one, and here you put additional burdon on a large number of prople.

Quoted 7 lines
Quoted 2 lines

Our hope in getting this main-lined was that other upcoming Solo and Dual-Lite platforms could share some of the bits.

Understood and appreciated. But I also see this ias a strong reason to come up with a clean design, and not create bad examples which others without doubt will interpret as persuasive precedent.

Our hope is that the things we're adding are useful, and not a burden.

We'll be happy to pursue the SPL route, but this won't be something that we can devote cycles to in the next few weeks.

Regards,

Eric

#19 lore raw

PATCH v2 1/1 Add Boundary Devices Nitrogen6X boards

Dear Eric,

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

Would it help if we restrict the number of boards directly in boards.cfg?

Not really. Thi sjust papers over the problem, but does not solve it.

Quoted 2 lines

We'll be happy to pursue the SPL route, but this won't be something that we can devote cycles to in the next few weeks.

Understood. 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
"It is easier to port a shell than a shell script."      - Larry Wall