kboot: Handle ISP/SIO reserved firmware differences

The iova field is different, handle it with a flag.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-09-08 00:03:55 +09:00
parent ab0ef2922e
commit fbe3fcd85a

View file

@ -1518,7 +1518,7 @@ static int dt_vram_reserved_region(const char *dcp_alias, const char *disp_alias
disp_reserved_regions_vram, &region, 1);
}
static int dt_reserve_asc_firmware(const char *adt_path, const char *fdt_path)
static int dt_reserve_asc_firmware(const char *adt_path, const char *fdt_path, bool remap)
{
int ret = 0;
@ -1548,7 +1548,7 @@ static int dt_reserve_asc_firmware(const char *adt_path, const char *fdt_path)
unsigned int num_maps = segments_len / sizeof(*seg);
for (unsigned i = 0; i < num_maps; i++) {
u64 iova = seg->iova;
u64 iova = remap ? seg->remap : seg->iova;
char node_name[64];
snprintf(node_name, sizeof(node_name), "asc-firmware@%lx", seg->phys);
@ -2159,13 +2159,13 @@ int kboot_prepare_dt(void *fdt)
return -1;
if (dt_disable_missing_devs("i2c", "i2c@", 8))
return -1;
if (dt_reserve_asc_firmware("/arm-io/sio", "sio"))
if (dt_reserve_asc_firmware("/arm-io/sio", "sio", true))
return -1;
if (dt_set_sio_fwdata())
return -1;
if (dt_set_isp_fwdata())
if (dt_reserve_asc_firmware("/arm-io/isp", "isp", false))
return -1;
if (dt_reserve_asc_firmware("/arm-io/isp", "isp"))
if (dt_set_isp_fwdata())
return -1;
#ifndef RELEASE
if (dt_transfer_virtios())