liebherr: btt: shrink spl_board_init
authorRasmus Villemoes <ravi@prevas.dk>
Thu, 23 Oct 2025 08:47:59 +0000 (10:47 +0200)
committerFabio Estevam <festevam@gmail.com>
Thu, 30 Oct 2025 15:39:12 +0000 (12:39 -0300)
commit4772cf97f083a5fcdcbd497b42edc4d46f6a17e9
tree50c8dacacf14b7d3c1ae0c3d46af3a9a04e4adbf
parent8690133debf5d2caa624a658ac33fb43b9329bbd
liebherr: btt: shrink spl_board_init

This board is very tight on space in SPL; in fact with my compiler it
ends up just exactly on the wrong side:

spl/u-boot-spl.bin exceeds file size limit:
  limit:  0xa000 bytes
  actual: 0xa014 bytes
  excess: 0x14 bytes

The repeated "lookup and request" pattern in spl_board_init() suggests
a low-hanging fruit for reducing the code size. This reduces the
object size of spl/board/liebherr/btt/btt.o by 300 bytes.

I've left the lack of error handling as-is; there isn't really
anything to do if it fails, so I suppose the printfs are the best that
can be done.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
board/liebherr/btt/btt.c