mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 20:26:13 +02:00
Although less common, ADSP SoM boards can be operated standalone without a carrier board. The SoM can be powered over USB-C by moving the jumper on JP1. The board configuration needs to be heavily refactored to reduce the number of defconfigs and leverage the devicetree. The TI DP83867 support, which is dependent on that configuration, needs to be removed. Until then this change allows the same U-Boot binary to work correctly both with carrier boards and the standalone SoM. The carrier board initialization code in somcrr_ezkit.c and somcrr_ezlite.c calls gpio_hog_lookup_name() to find ethernet control GPIOs, but does not check if the lookup succeeds before using the returned pointers. When running on a standalone SoM without a carrier board, these GPIO hogs do not exist in the device tree. The gpio_hog_lookup_name() function returns -ENODEV and sets the pointer to NULL, but the code continues to call dm_gpio_set_value() with uninitialized pointers, causing a synchronous abort exception: "Synchronous Abort" handler, esr 0x96000004 elr: 00000000960326c4 lr : 0000000096038d5c (reloc) Signed-off-by: Philip Molloy <philip.molloy@analog.com> Reviewed-by: Greg Malysa <malysagreg@gmail.com>