Skip to content

Commit 116d96a

Browse files
authored
Refactor ect_dump_raw_blob to use dynamic addresses
Signed-off-by: Crecker <104427569+Creeeeger@users.noreply.github.com>
1 parent f785110 commit 116d96a

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

drivers/soc/samsung/ect_parser.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,19 +2656,21 @@ void ect_init_map_io(void)
26562656

26572657
static void ect_dump_raw_blob(void)
26582658
{
2659-
void __iomem *base;
2660-
size_t size = ECT_SIZE;
2661-
size_t max_dump = ECT_SIZE;
2662-
2663-
base = ioremap(ECT_PHYS_ADDR, size);
2664-
if (!base) {
2665-
pr_err("[ect-raw] failed to ioremap 0x%x (size 0x%zx)\n",
2666-
ECT_PHYS_ADDR, size);
2667-
return;
2668-
}
2669-
2670-
pr_info("[ect-raw] dumping ECT blob at phys=0x%x size=0x%zx\n",
2671-
ECT_PHYS_ADDR, size);
2659+
void __iomem *base;
2660+
phys_addr_t phys = ect_early_vm.phys_addr ?
2661+
ect_early_vm.phys_addr : ECT_PHYS_ADDR;
2662+
size_t size = ect_early_vm.size ? ect_early_vm.size : ECT_SIZE;
2663+
size_t max_dump = size;
2664+
2665+
base = ioremap(phys, size);
2666+
if (!base) {
2667+
pr_err("[ect-raw] failed to ioremap 0x%llx (size 0x%zx)\n",
2668+
(unsigned long long)phys, size);
2669+
return;
2670+
}
2671+
2672+
pr_info("[ect-raw] dumping ECT blob at phys=0x%llx size=0x%zx\n",
2673+
(unsigned long long)phys, size);
26722674

26732675
print_hex_dump(KERN_INFO, "[ect-raw] ",
26742676
DUMP_PREFIX_OFFSET, 16, 1,

0 commit comments

Comments
 (0)