omap3-overo: Code cleanup and reduce the size of MLO binary.
v2 cover omap3-overo: Code cleanup and reduce the size of MLO binary.
This is the v2 of the two-patch series. v1 can be found here:
http://lists.denx.de/pipermail/u-boot/2015-April/211651.html
The only change in this version is that the earlier version missed printing the board revision, so fixed that.
Arun Bharadwaj (2):
This separates the SPL-specific code from the u-boot-specific code
for the Overo board following the discussion at
http://lists.denx.de/pipermail/u-boot/2015-April/211622.html
u-boot breaks for the Overo boards since the following commit:
a6b541b09022acb6f7c2754100ae26bd44eed1d9
board/overo/Makefile | 6 +- board/overo/common.c | 341 +++++++++++++++++++++++++++++++++++++++++++++++++++ board/overo/overo.c | 117 +----------------- board/overo/overo.h | 266 +--------------------------------------- board/overo/spl.c | 60 +++++++++ 5 files changed, 411 insertions(+), 379 deletions(-) create mode 100644 board/overo/common.c create mode 100644 board/overo/spl.c
Signature · 1 line
2.1.4
PATCH v2 1/2 This separates the SPL-specific code from the u-boot-specific code for the Overo board following the discussion at http://lists.denx.de/pipermail/u-boot/2015-April/211622.html
The code is split up into spl.c, overo.c and common.c (which has the code common to both)
--- board/overo/Makefile | 6 +- board/overo/common.c | 355 +++++++++++++++++++++++++++++++++++++++++++++++++++ board/overo/overo.c | 117 +---------------- board/overo/overo.h | 266 +------------------------------------- board/overo/spl.c | 60 +++++++++ 5 files changed, 425 insertions(+), 379 deletions(-) create mode 100644 board/overo/common.c create mode 100644 board/overo/spl.c
board/overo/Makefile +5 -1
@@ -5,4 +5,8 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := overo.o +ifdef CONFIG_SPL_BUILD +obj-y := spl.o common.o +else +obj-y := overo.o common.o +endif
board/overo/common.c new file +355 -0
355 lines not on this page · raw message
board/overo/overo.c +3 -114
141 lines not on this page · raw message
board/overo/overo.h +2 -264
278 lines not on this page · raw message
board/overo/spl.c new file +60 -0
60 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 1/2 This separates the SPL-specific code from the u-boot-specific code for the Overo board following the discussion at http://lists.denx.de/pipermail/u-boot/2015-April/211622.html
Quoted 4 lines · Arun Bharadwaj
The code is split up into
spl.c,overo.candcommon.c(which has the code common to both)Signed-off-by Arun Bharadwaj <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150510/2aea0c67/attachment.sig>
PATCH v2 2/2 u-boot breaks for the Overo boards since the following commit: a6b541b09022acb6f7c2754100ae26bd44eed1d9
In reply to Arun BharadwajThis is because the gd pointer is not set early enough anymore, such that the i2c_set_bus_num in get_board_revision can safely execute. This results in a console hang at SPL and the boot does not proceed.
This piece of code is anyway necessary only for really old Overo boards with revision numbers <= 2410 and not required for the newer boards. For these older boards, u-boot v2014.10 still works fine.
--- board/overo/common.c | 14 -------------- 1 file changed, 14 deletions(-)
board/overo/common.c +0 -14
@@ -310,20 +310,6 @@ int get_board_revision(void) {int revision; -#ifdef CONFIG_SYS_I2C_OMAP34XX -unsigned char data; - -/* board revisions <= R2410 connect 4030 irq_1 to gpio112 */ -/* these boards should return a revision number of 0 */ -/* the code below forces a 4030 RTC irq to ensure that gpio112 is low */ -i2c_set_bus_num (TWL4030_I2C_BUS ); - data =0x01 ; -i2c_write (0x4B ,0x29 ,1 , &data,1 ); - data =0x0c ; -i2c_write (0x4B ,0x2b ,1 , &data,1 ); -i2c_read (0x4B ,0x2a ,1 , &data,1 ); -#endif -if (!gpio_request (112 ,"" ) && !gpio_request (113 ,"" ) && !gpio_request (115 ,"" )) {
Signature · 1 line
2.1.4
PATCH 2/2 u-boot breaks for the Overo boards since the following commit: a6b541b09022acb6f7c2754100ae26bd44eed1d9
Quoted 10 lines · Arun Bharadwaj
This is because the gd pointer is not set early enough anymore, such that the
i2c_set_bus_numinget_board_revisioncan safely execute. This results in a console hang at SPL and the boot does not proceed.This piece of code is anyway necessary only for really old Overo boards with revision numbers <= 2410 and not required for the newer boards. For these older boards, u-boot v2014.10 still works fine.
Signed-off-by Arun Bharadwaj <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150510/6a7f15ab/attachment.sig>