Skip to content

Commit 6aca060

Browse files
hoshinolinamarcan
authored andcommitted
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 <[email protected]>
1 parent 0b7708f commit 6aca060

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/isp.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ int isp_init(void)
9494

9595
pmgr_set_mode(pmgr_base + pmgr_off, PMGR_PS_PWRGATE);
9696

97+
bool remap = false;
98+
9799
/* TODO: confirm versions */
98100
switch (ver_rev) {
99101
case ISP_VER_T8103:
@@ -124,9 +126,11 @@ int isp_init(void)
124126
}
125127
break;
126128
case ISP_VER_T6020:
129+
remap = true;
130+
127131
switch (os_firmware.version) {
128132
case V13_5:
129-
heap_top = 0xf00000;
133+
heap_top = 0x10000f00000;
130134
break;
131135
default:
132136
printf("isp: unsupported firmware\n");
@@ -144,7 +148,10 @@ int isp_init(void)
144148
seg = adt_getprop(adt, isp_node, "segment-ranges", &segments_len);
145149
unsigned int count = segments_len / sizeof(*seg);
146150

147-
heap_iova = seg[count - 1].iova + seg[count - 1].size;
151+
if (remap)
152+
heap_iova = seg[count - 1].remap + seg[count - 1].size;
153+
else
154+
heap_iova = seg[count - 1].iova + seg[count - 1].size;
148155
heap_size = heap_top - heap_iova;
149156
heap_phys = top_of_memory_alloc(heap_size);
150157

src/kboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ int kboot_prepare_dt(void *fdt)
22232223
return -1;
22242224
if (dt_set_sio_fwdata())
22252225
return -1;
2226-
if (dt_reserve_asc_firmware("/arm-io/isp", "/arm-io/isp0", "isp", false))
2226+
if (dt_reserve_asc_firmware("/arm-io/isp", "/arm-io/isp0", "isp", chip_id > 0x6020))
22272227
return -1;
22282228
if (dt_set_isp_fwdata())
22292229
return -1;

0 commit comments

Comments
 (0)