board: samsung: e850-96: Add routines for checking boot dev
authorSam Protsenko <semen.protsenko@linaro.org>
Tue, 18 Nov 2025 23:21:15 +0000 (17:21 -0600)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 26 Nov 2025 08:55:57 +0000 (17:55 +0900)
commit1d9aafa751dd76bd3088b746d53004d04fcb9b6c
tree0e8e61be7a8a7b70e646a3478e0d058b938ae52f
parentf737f0675f0b3b942c3f302eebcfd716d87139c5
board: samsung: e850-96: Add routines for checking boot dev

Implement functionality to check the current boot device (a device where
the SoC ROM code is loading the bootloaders from). The boot device order
can be changed using the SW1 DIP switch on the E850-96 board (which
controls XOM SoC lines), as stated in [1].

The boot device information is requested from EL3 software using the
corresponding SMC call, which in turn reads it from iRAM memory, which
was written by the ROM code. New routines decode that data and allow the
user to check the current boot device, boot order, etc. That API can be
used further to implement different code flows depending on the current
boot device, e.g.:

  - on eMMC boot: obtain the firmware binaries from eMMC
  - on USB boot: download the firmware over USB instead

No functional change; this patch only adds new functionality but it's
not used yet.

[1] doc/board/samsung/e850-96.rst

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/e850-96/Makefile
board/samsung/e850-96/bootdev.c [new file with mode: 0644]
board/samsung/e850-96/bootdev.h [new file with mode: 0644]