mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-18 01:43:17 +00:00
isp: Handle high mapped VAs for t602x
This is similar to some of the other hardware we've seen on this SoC... Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
7b3a4b92e0
commit
2a284d694f
2 changed files with 11 additions and 3 deletions
11
src/isp.c
11
src/isp.c
|
@ -93,6 +93,8 @@ int isp_init(void)
|
|||
|
||||
pmgr_set_mode(pmgr_base + pmgr_off, PMGR_PS_PWRGATE);
|
||||
|
||||
bool remap = false;
|
||||
|
||||
/* TODO: confirm versions */
|
||||
switch (ver_rev) {
|
||||
case ISP_VER_T8103:
|
||||
|
@ -123,9 +125,11 @@ int isp_init(void)
|
|||
}
|
||||
break;
|
||||
case ISP_VER_T6020:
|
||||
remap = true;
|
||||
|
||||
switch (os_firmware.version) {
|
||||
case V13_5:
|
||||
heap_top = 0xf00000;
|
||||
heap_top = 0x10000f00000;
|
||||
break;
|
||||
default:
|
||||
printf("isp: unsupported firmware\n");
|
||||
|
@ -143,7 +147,10 @@ int isp_init(void)
|
|||
seg = adt_getprop(adt, isp_node, "segment-ranges", &segments_len);
|
||||
unsigned int count = segments_len / sizeof(*seg);
|
||||
|
||||
heap_iova = seg[count - 1].iova + seg[count - 1].size;
|
||||
if (remap)
|
||||
heap_iova = seg[count - 1].remap + seg[count - 1].size;
|
||||
else
|
||||
heap_iova = seg[count - 1].iova + seg[count - 1].size;
|
||||
heap_size = heap_top - heap_iova;
|
||||
heap_phys = top_of_memory_alloc(heap_size);
|
||||
|
||||
|
|
|
@ -2165,7 +2165,8 @@ int kboot_prepare_dt(void *fdt)
|
|||
return -1;
|
||||
if (dt_set_sio_fwdata())
|
||||
return -1;
|
||||
if (dt_reserve_asc_firmware("/arm-io/isp", "/arm-io/isp0", "isp", false))
|
||||
if (dt_reserve_asc_firmware("/arm-io/isp", "/arm-io/isp0", "isp",
|
||||
chip_id > 0x6020))
|
||||
return -1;
|
||||
if (dt_set_isp_fwdata())
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue