[U-Boot] Regression: SDP4430 - Fails to boot - bisect indicates i2c adaptation

Hi,
I happened to try SDP4430 out a earlier today with tip of u-boot mainline and it refused to even bring up SPL logs. Last working tag happens to be v2013.10 Earliest fail tag happens to be v2014.01-rc1
A bisect showed the following: http://pastebin.mozilla.org/3962513
"i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework"
At commit 6789e84ecaa8f45d053084e08c381284a04abff7 it does indeed fail to boot up, git reset --hard HEAD^ allows the board to boot up successfully.

Commit 6789e84ecaa8f45d053084e08c381284a04abff7 (i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework) intended to make I2C driver compatible with latest changes. It unfortunately has had a impact on size on SPL as well. For example on SDP4430, 32032 bytes before/MLO 35416 bytes after/MLO
With this mentioned commit, MLO stops booting on SDP4430 as only 32K is accessible for non-secure (bootloader) s/w on GP devices and the size increase to 56K fails boot.
On the latest u-boot commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf, MLO is now at size 35592 bytes, However, I2C is not necessary for SPL to function as we use SR_I2C for controlling the PMIC. Disabling I2C reduces MLO to 32224 bytes which allows OMAP4 GP platform to boot up.
Since this is common for all OMAP4 platforms, remove the need for I2C for SPL builds in the common config.
Signed-off-by: Nishanth Menon nm@ti.com ---
Though I originally reported this for SDP4430[1], a test on PandaBoard-ES also indicated fail to boot!
Tested on PandaBoard-ES and SDP4430 Build result: http://pastebin.mozilla.org/3963101
Test log: SDP4430: http://pastebin.mozilla.org/3963123 PandaBoard-ES: http://pastebin.mozilla.org/3963134
[1] http://marc.info/?l=u-boot&m=138914031918099&w=2
include/configs/omap4_common.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index ea56eeb..7cfd471 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -154,4 +154,10 @@ #define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#ifdef CONFIG_SPL_BUILD +/* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */ +#undef CONFIG_SYS_I2C +#undef CONFIG_SYS_I2C_OMAP24XX +#endif + #endif /* __CONFIG_OMAP4_COMMON_H */

Hi Nishanth, On Wednesday 08 January 2014 07:36 AM, Nishanth Menon wrote:
Commit 6789e84ecaa8f45d053084e08c381284a04abff7 (i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework) intended to make I2C driver compatible with latest changes. It unfortunately has had a impact on size on SPL as well. For example on SDP4430, 32032 bytes before/MLO 35416 bytes after/MLO
With this mentioned commit, MLO stops booting on SDP4430 as only 32K is accessible for non-secure (bootloader) s/w on GP devices and the size increase to 56K fails boot.
On the latest u-boot commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf, MLO is now at size 35592 bytes, However, I2C is not necessary for SPL to function as we use SR_I2C for controlling the PMIC. Disabling I2C reduces MLO to 32224 bytes which allows OMAP4 GP platform to boot up.
Since this is common for all OMAP4 platforms, remove the need for I2C for SPL builds in the common config.
Signed-off-by: Nishanth Menon nm@ti.com
Though I originally reported this for SDP4430[1], a test on PandaBoard-ES also indicated fail to boot!
Tested on PandaBoard-ES and SDP4430 Build result: http://pastebin.mozilla.org/3963101
Test log: SDP4430: http://pastebin.mozilla.org/3963123 PandaBoard-ES: http://pastebin.mozilla.org/3963134
[1] http://marc.info/?l=u-boot&m=138914031918099&w=2
include/configs/omap4_common.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index ea56eeb..7cfd471 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -154,4 +154,10 @@ #define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#ifdef CONFIG_SPL_BUILD +/* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */ +#undef CONFIG_SYS_I2C +#undef CONFIG_SYS_I2C_OMAP24XX +#endif
#endif /* __CONFIG_OMAP4_COMMON_H */
correct. Thanks for the fix. Also with size remaining still as 32224 bytes OMAP4 HS devices might not boot up. Anyways thats separate and something more like this patch has to be removed.
Reviewed-by: Sricharan R r.sricharan@ti.com
Regards, Sricharan

On Tue, Jan 07, 2014 at 08:06:56PM -0600, Nishanth Menon wrote:
Commit 6789e84ecaa8f45d053084e08c381284a04abff7 (i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework) intended to make I2C driver compatible with latest changes. It unfortunately has had a impact on size on SPL as well. For example on SDP4430, 32032 bytes before/MLO 35416 bytes after/MLO
Ah toolchain fun, that's why I hadn't seen this, all of mine build around 32KiB.
So, where is the 38KiB max size we set valid, on OMAP4 devices?

HI
On Wed, Jan 8, 2014 at 1:58 PM, Tom Rini trini@ti.com wrote:
On Tue, Jan 07, 2014 at 08:06:56PM -0600, Nishanth Menon wrote:
Commit 6789e84ecaa8f45d053084e08c381284a04abff7 (i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework) intended to make I2C driver compatible with latest changes. It unfortunately has had a impact on size on SPL as well. For example on SDP4430, 32032 bytes before/MLO 35416 bytes after/MLO
Ah toolchain fun, that's why I hadn't seen this, all of mine build around 32KiB.
So, where is the 38KiB max size we set valid, on OMAP4 devices?
I'm working on a different version of u-boot for omap4460 and my spl is very big
/* Defines for SPL */ #define CONFIG_SPL #if 0 #define CONFIG_SPL_TEXT_BASE 0x40303080 #define CONFIG_SPL_MAX_SIZE (38 * 1024) #else #define CONFIG_SPL_TEXT_BASE 0x40303080 #define CONFIG_SPL_MAX_SIZE ((40 * 1024) + 512) #endif
With this size I can boot from serial and from sdcard.
Michael
-- Tom
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Wed, Jan 8, 2014 at 6:58 AM, Tom Rini trini@ti.com wrote:
Ah toolchain fun, that's why I hadn't seen this, all of mine build around 32KiB.
arm-linux-gnueabi-gcc --version arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So, where is the 38KiB max size we set valid, on OMAP4 devices?
as I mentioned in my commit message,
32k limit is on OMAP4 devices -> Default accessible "non-secure" SRAM out of the total of 56K is only 32K.
Sricharan already pointed at http://git.denx.de/?p=u-boot/u-boot-arm.git;a=commit;h=dcc23576384dbb875a442...
Any further savings will be great. Regards, Nishanth Menon

On Tue, Jan 07, 2014 at 08:06:56PM -0600, Nishanth Menon wrote:
Commit 6789e84ecaa8f45d053084e08c381284a04abff7 (i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework) intended to make I2C driver compatible with latest changes. It unfortunately has had a impact on size on SPL as well. For example on SDP4430, 32032 bytes before/MLO 35416 bytes after/MLO
With this mentioned commit, MLO stops booting on SDP4430 as only 32K is accessible for non-secure (bootloader) s/w on GP devices and the size increase to 56K fails boot.
On the latest u-boot commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf, MLO is now at size 35592 bytes, However, I2C is not necessary for SPL to function as we use SR_I2C for controlling the PMIC. Disabling I2C reduces MLO to 32224 bytes which allows OMAP4 GP platform to boot up.
Since this is common for all OMAP4 platforms, remove the need for I2C for SPL builds in the common config.
Signed-off-by: Nishanth Menon nm@ti.com Reviewed-by: Sricharan R r.sricharan@ti.com
Applied to u-boot-ti/master, thanks!

Hi Nishanth, On Wednesday 08 January 2014 05:48 AM, Nishanth Menon wrote:
Hi,
I happened to try SDP4430 out a earlier today with tip of u-boot mainline and it refused to even bring up SPL logs. Last working tag happens to be v2013.10 Earliest fail tag happens to be v2014.01-rc1
A bisect showed the following: http://pastebin.mozilla.org/3962513
"i2c, omap24xx: convert driver to new mutlibus/mutliadapter framework"
This is already reported and a patch is already sent for this. This patch is in u-boot-arm and ll soon get merged in u-boot. http://git.denx.de/?p=u-boot/u-boot-arm.git;a=commit;h=dcc23576384dbb875a442...
Thanks and regards, Lokesh
At commit 6789e84ecaa8f45d053084e08c381284a04abff7 it does indeed fail to boot up, git reset --hard HEAD^ allows the board to boot up successfully.
participants (5)
-
Lokesh Vutla
-
Michael Trimarchi
-
Nishanth Menon
-
Sricharan R
-
Tom Rini