On Tue, Nov 21, 2023 at 10:55 PM Dmitry Malkin <dmi...@bedrocksystems.com> wrote: > > rpi5: get_board is no longer works. Print model name from > FW FDT
Diito > rpi5 deprecated some calls/tags for MBOX. Better to use FW FDT. > However it does not give all information. Is that deprecation documented somewhere, in a forum post or something? > Signed-off-by: Dmitry Malkin <dmi...@bedrocksystems.com> > --- > v2: > new patch > --- > board/raspberrypi/rpi/rpi.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c > index cd823ad746..6b678c5d23 100644 > --- a/board/raspberrypi/rpi/rpi.c > +++ b/board/raspberrypi/rpi/rpi.c > @@ -429,6 +429,7 @@ static void get_board_revision(void) > int ret; > const struct rpi_model *models; > uint32_t models_count; > + const char *fdt_model; > > BCM2835_MBOX_INIT_HDR(msg); > BCM2835_MBOX_INIT_TAG(&msg->get_board_rev, GET_BOARD_REV); > @@ -437,6 +438,11 @@ static void get_board_revision(void) > if (ret) { > printf("bcm2835: Could not query board revision\n"); > /* Ignore error; not critical */ > + if (fdt_magic(fw_dtb_pointer) == FDT_MAGIC) { > + fdt_model = fdt_getprop((void *)fw_dtb_pointer, 0, "model", > NULL); > + if (fdt_model != 0) > + printf("FW FDT model : %s\n", fdt_model); > + } > return; > } > > -- > 2.40.1