u-boot/arch/arm/mach-snapdragon
Sam Day 782641f872
mach-snapdragon: pass fdt to qcom_parse_memory
commit fc37a73e66 ("fdt: Swap the signature for
board_fdt_blob_setup()") introduced a subtle change to the Snapdragon
implementation, removing the assignment to gd->fdt_blob partway through
the function.

This breaks qcom_parse_memory() which was also called during
board_fdt_blob_setup().

The underlying issue here is that qcom_parse_memory is using the of_ api
to traverse a devicetree, which relies on the fdt_blob in global data.

Rather than relying on this subtle behaviour, explicitly pass the FDT
that should be consulted for a /memory node.

Using the OF API is typically preferable because it's easier to read,
but using the lower level fdt_ methods instead here doesn't add too much
complexity, I think.

Finally, a minor tweak was made to board_fdt_blob_setup to use the
passed fdt blob pointer instead of gd->fdt_blob, which removes the last
of the references to global data in this area.

Fixes: fc37a73e66 (fdt: Swap the signature for board_fdt_blob_setup())
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Sam Day <me@samcday.com>
Link: https://lore.kernel.org/r/20250122-qcom-parse-memory-updates-v2-1-98dfcac821d7@samcday.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-01-22 16:45:02 +01:00
..
include/mach arm: mach-snapdragon: gpio: introduce msm_special_pin_data 2024-07-05 12:04:48 +02:00
board.c mach-snapdragon: pass fdt to qcom_parse_memory 2025-01-22 16:45:02 +01:00
capsule_update.c mach-snapdragon: implement capsule update support 2024-11-20 17:57:58 +01:00
Kconfig mach-snapdragon: implement capsule update support 2024-11-20 17:57:58 +01:00
Makefile mach-snapdragon: implement capsule update support 2024-11-20 17:57:58 +01:00
of_fixup.c mach-snapdragon: implement ft_board_setup() for USB role selection 2024-04-23 13:29:30 +02:00
qcom-priv.h mach-snapdragon: implement capsule update support 2024-11-20 17:57:58 +01:00