
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

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

Dear Luca Ellero,
In message 51078BFD.60906@gmail.com 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).
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

Dear Wolfgang,
On 29/01/2013 10.48, Wolfgang Denk wrote:
Dear Luca Ellero,
In message 51078BFD.60906@gmail.com 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).
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: ---------------------------------------------------------
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index cfe32cc..7525caf 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -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

On Tue, Jan 29, 2013 at 08:41:26AM +0100, Heiko Schocher wrote:
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(-)
Applied to u-boot/master, thanks!
participants (4)
-
Heiko Schocher
-
Luca Ellero
-
Tom Rini
-
Wolfgang Denk