firmware: Allow fw_platform_init() to return updated FDT location
authorAnup Patel <anup.patel@wdc.com>
Sun, 24 May 2020 04:33:13 +0000 (10:03 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 5 Jun 2020 03:32:34 +0000 (09:02 +0530)
commit86ec5341e421b3f6ac39c75da648b7a22e56f248
treecfb4031238ab67050302a1eadd8eaa84eb8e71fe
parent4ce6b7a82ac2c9f57186c00f23223dd39067555b
firmware: Allow fw_platform_init() to return updated FDT location

Currently, the fw_platform_init() does not return anything but we can
further improve by allowing fw_platform_init() to return updated FDT
location.

It is certainly not mandatory for fw_platform_init() to return a new
location of FDT (or modify FDT). In fact, the fw_platform_init() can
always return the original FDT location (i.e. 'arg1') unmodified.

This new capability of fw_platform_init() will allow platforms to:
1. Have multiple built-in FDTs and select one
2. Modify FDT before using based on platform specific straps or OTP

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
firmware/fw_base.S
platform/generic/platform.c