mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-18 17:53:10 +00:00
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:
parent
ab0ef2922e
commit
fbe3fcd85a
1 changed files with 5 additions and 5 deletions
10
src/kboot.c
10
src/kboot.c
|
@ -1518,7 +1518,7 @@ static int dt_vram_reserved_region(const char *dcp_alias, const char *disp_alias
|
||||||
disp_reserved_regions_vram, ®ion, 1);
|
disp_reserved_regions_vram, ®ion, 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;
|
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);
|
unsigned int num_maps = segments_len / sizeof(*seg);
|
||||||
|
|
||||||
for (unsigned i = 0; i < num_maps; i++) {
|
for (unsigned i = 0; i < num_maps; i++) {
|
||||||
u64 iova = seg->iova;
|
u64 iova = remap ? seg->remap : seg->iova;
|
||||||
|
|
||||||
char node_name[64];
|
char node_name[64];
|
||||||
snprintf(node_name, sizeof(node_name), "asc-firmware@%lx", seg->phys);
|
snprintf(node_name, sizeof(node_name), "asc-firmware@%lx", seg->phys);
|
||||||
|
@ -2159,13 +2159,13 @@ int kboot_prepare_dt(void *fdt)
|
||||||
return -1;
|
return -1;
|
||||||
if (dt_disable_missing_devs("i2c", "i2c@", 8))
|
if (dt_disable_missing_devs("i2c", "i2c@", 8))
|
||||||
return -1;
|
return -1;
|
||||||
if (dt_reserve_asc_firmware("/arm-io/sio", "sio"))
|
if (dt_reserve_asc_firmware("/arm-io/sio", "sio", true))
|
||||||
return -1;
|
return -1;
|
||||||
if (dt_set_sio_fwdata())
|
if (dt_set_sio_fwdata())
|
||||||
return -1;
|
return -1;
|
||||||
if (dt_set_isp_fwdata())
|
if (dt_reserve_asc_firmware("/arm-io/isp", "isp", false))
|
||||||
return -1;
|
return -1;
|
||||||
if (dt_reserve_asc_firmware("/arm-io/isp", "isp"))
|
if (dt_set_isp_fwdata())
|
||||||
return -1;
|
return -1;
|
||||||
#ifndef RELEASE
|
#ifndef RELEASE
|
||||||
if (dt_transfer_virtios())
|
if (dt_transfer_virtios())
|
||||||
|
|
Loading…
Reference in a new issue