Skip to contentSkip to conversation

: Please pull u-boot-i2c

GIT PULL Heiko Schocher 4 participants 5 messages Jan 29, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

Hello Tom,

please pull from u-boot-i2c:

The following changes since commit 54b08efcf2f4ff532ce99c53f341a59c193331a5:

README.mips: update known issues and TODOs (2013-01-16 10:52:08 +0100)

are available in the git repository at:

git://git.denx.de/u-boot-i2c.git master

for you to fetch changes up to 019be4af642cf59df0fa97082e5d9e290d26f997:

Remove unused CONFIG_SYS_I2C_BUS[_SELECT] (2013-01-29 06:40:01 +0100)

----------------------------------------------------------------
Marek Vasut (1):
i2c: mxs: Staticize the functions in the driver

Michael Jones (1):
Remove unused CONFIG_SYS_I2C_BUS[_SELECT]

 drivers/i2c/mxs_i2c.c              | 8 ++++----
 include/configs/am3517_crane.h     | 2 --
 include/configs/am3517_evm.h       | 2 --
 include/configs/cm_t35.h           | 2 --
 include/configs/devkit8000.h       | 2 --
 include/configs/dig297.h           | 2 --
 include/configs/igep00x0.h         | 2 --
 include/configs/mcx.h              | 1 -
 include/configs/omap3_beagle.h     | 2 --
 include/configs/omap3_evm_common.h | 2 --
 include/configs/omap3_logic.h      | 2 --
 include/configs/omap3_mvblx.h      | 2 --
 include/configs/omap3_pandora.h    | 2 --
 include/configs/omap3_sdp3430.h    | 2 --
 include/configs/omap3_zoom1.h      | 2 --
 include/configs/omap3_zoom2.h      | 2 --
 include/configs/omap4_common.h     | 2 --
 include/configs/tam3517-common.h   | 2 --
 include/configs/tricorder.h        | 2 --

19 Dateien ge?ndert, 4 Zeilen hinzugef?gt(+), 39 Zeilen entfernt(-)

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#1 lore raw

[U-Boot] CONFIG_SYS_TEXT_BASE and relocaddr

Hi all,
in U-Boot version 2012.10 I used to skip "relocate_code" setting CONFIG_SYS_TEXT_BASE to relocaddr (obtained from bdinfo command). This since some hardware is able to configure SDRAM and load U-Boot directly to SDRAM, so relocation is useless and time consuming. Now I'm using latest git version and this isn't working anymore. Can someone explain me way? And what is the suggested way to skip relocation now.
Thanks in advance
Best regards
Luca Ellero

#2 lore raw

[U-Boot] CONFIG_SYS_TEXT_BASE and relocaddr

Dear Luca Ellero,

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

in U-Boot version 2012.10 I used to skip "relocate_code" setting CONFIG_SYS_TEXT_BASE to relocaddr (obtained from bdinfo command). This since some hardware is able to configure SDRAM and load U-Boot directly to SDRAM, so relocation is useless and time consuming.

You are wrong. relocation is not useless, even in your case. there are quite a number of configuration options that will put stuff above the U-Boot image, directly at the end of RAM (things like protected RAM, shared frame buffer, shared log buffer, etc.). In these cases, the relocation address may even be dynamic (i. e. depending on settings of environment variables, and thus unknown at compile time).

Quoted 3 lines

Now I'm using latest git version and this isn't working anymore. Can someone explain me way? And what is the suggested way to skip relocation now.

Don't.

Best regards,

Wolfgang Denk

Signature · 9 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 Empire didn't encourage its subjects to go far away, in case they
saw things that might disturb them. For the same reason it had  built
a  wall  around  the  entire country, patrolled by the Heavenly Guard
whose main function was to tread heavily on the fingers of any  inha-
bitants who felt they might like to step outside for five minutes for
a breath of fresh air.                      - Terry Pratchett, _Mort_
#3 lore raw

[U-Boot] CONFIG_SYS_TEXT_BASE and relocaddr

Dear Wolfgang,

Quoted 16 lines · Wolfgang Denk

Dear Luca Ellero,

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

in U-Boot version 2012.10 I used to skip "relocate_code" setting CONFIG_SYS_TEXT_BASE to relocaddr (obtained from bdinfo command). This since some hardware is able to configure SDRAM and load U-Boot directly to SDRAM, so relocation is useless and time consuming.

You are wrong. relocation is not useless, even in your case. there are quite a number of configuration options that will put stuff above the U-Boot image, directly at the end of RAM (things like protected RAM, shared frame buffer, shared log buffer, etc.). In these cases, the relocation address may even be dynamic (i. e. depending on settings of environment variables, and thus unknown at compile time).

Quoted 5 lines
Quoted 3 lines

Now I'm using latest git version and this isn't working anymore. Can someone explain me way? And what is the suggested way to skip relocation now.

Don't.

Got your point ;-)
Thanks
I'm asking that since I'm digging on ARM SDRAM configuration and found a bug on getting top of SDRAM (where u-boot will be relocated).

On ARM architectures top of SDRAM will always be:

CONFIG_SYS_SDRAM_BASE + gd->ram_size

anyway this can be wrong since SDRAM can be composed by more that one bank in not-contiguous address space. (CONFIG_SYS_SDRAM_BASE + gd->ram_size) can land to not existent SDRAM addresses and can be very dangerous since it can potentially corrupt real SDRAM (in most cases SDRAM is aliased so writing to some not-existent address can write to real address).

My proposed patch is something like this:
---------------------------------------------------------

arch/arm/lib/board.c +9 -1
index cfe32cc..7525caf 100644
@@ -333,7 +333,18 @@ void board_init_f(ulong bootflag)
  	gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
  #endif
 
+#if defined(PHYS_SDRAM_2) && defined(PHYS_SDRAM_2_SIZE)
+	if ( CONFIG_NR_DRAM_BANKS > 1 &&
+		(PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE) != PHYS_SDRAM_2 )
+		addr =  PHYS_SDRAM_2 + PHYS_SDRAM_2_SIZE;
+	else
+		addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
+#else
  	addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
+#endif
+
 
---------------------------------------------------------
 

I know that some arch use more than 2 banks but implementing all macros checks to PHYS_SDRAM_* leads to some macro hell. So the point here is:

if (n banks > 2) and they are not contiguous, relocate u-boot at the end of 2nd bank even if there are more than 2 banks.

Please suggest me if this is the right way to follow or suggest me some more appropriate way to correct this bug
Thanks again
Regards
Luca Ellero

#4 lore raw
In reply to Heiko Schocher
Quoted 42 lines · Heiko Schocher

Hello Tom,

please pull from u-boot-i2c:

The following changes since commit 54b08efcf2f4ff532ce99c53f341a59c193331a5:

README.mips: update known issues and TODOs (2013-01-16 10:52:08 +0100)

are available in the git repository at:

git://git.denx.de/u-boot-i2c.git master

for you to fetch changes up to 019be4af642cf59df0fa97082e5d9e290d26f997:

Remove unused CONFIG_SYS_I2C_BUS[_SELECT] (2013-01-29 06:40:01 +0100)

----------------------------------------------------------------
Marek Vasut (1):
i2c: mxs: Staticize the functions in the driver

Michael Jones (1):
Remove unused CONFIG_SYS_I2C_BUS[_SELECT]

 drivers/i2c/mxs_i2c.c              | 8 ++++----
 include/configs/am3517_crane.h     | 2 --
 include/configs/am3517_evm.h       | 2 --
 include/configs/cm_t35.h           | 2 --
 include/configs/devkit8000.h       | 2 --
 include/configs/dig297.h           | 2 --
 include/configs/igep00x0.h         | 2 --
 include/configs/mcx.h              | 1 -
 include/configs/omap3_beagle.h     | 2 --
 include/configs/omap3_evm_common.h | 2 --
 include/configs/omap3_logic.h      | 2 --
 include/configs/omap3_mvblx.h      | 2 --
 include/configs/omap3_pandora.h    | 2 --
 include/configs/omap3_sdp3430.h    | 2 --
 include/configs/omap3_zoom1.h      | 2 --
 include/configs/omap3_zoom2.h      | 2 --
 include/configs/omap4_common.h     | 2 --
 include/configs/tam3517-common.h   | 2 --
 include/configs/tricorder.h        | 2 --
Quoted 1 line

19 Dateien ge?ndert, 4 Zeilen hinzugef?gt(+), 39 Zeilen entfernt(-)

Applied to u-boot/master, thanks!

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/20130129/850c1838/attachment.pgp>