platform: generic: Pass FDT to early/final_init overrides

Several of these override functions access the FDT blob. Explicitly
indicate which callbacks are allowed to modify the FDT blob by passing
the parameter as a possibly-const pointer. This also reduces code size
by deduplicating the call to fdt_get_address().

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-07-30 21:58:54 -07:00
committed by Anup Patel
parent 3f964652d9
commit 6e5db7b09c
11 changed files with 25 additions and 29 deletions

View File

@@ -21,7 +21,7 @@
#define SOPHGO_SG2042_TIMER_SIZE 0x10000UL
#define SOPHGO_SG2042_TIMER_NUM 16
static int sophgo_sg2042_early_init(bool cold_boot,
static int sophgo_sg2042_early_init(bool cold_boot, const void *fdt,
const struct fdt_match *match)
{
thead_register_tlb_flush_trap_handler();