Skip to content

Commit

Permalink
mach-snapdragon: do carveouts for qcs404 only
Browse files Browse the repository at this point in the history
The newly introduced carve_out_reserved_memory causes issues when
U-Boot is chained from the lk2nd bootloader. lk2nd provides a
simple-framebuffer device and marks the framebuffer region as no-map in
the supplied /reserved-memory. Consequently, the simple_video driver
triggers a page fault when it tries to write to this region.

As per Caleb's advice, this simple patch only does the carveouts for the
qcs404 SoC for which it was originally designed. The intent is to do the
carveouts for more Qualcomm SoCs in future.

Signed-off-by: Caleb Connolly <[email protected]>
  • Loading branch information
samcday authored and calebccff committed May 14, 2024
1 parent 5c5565c commit 3ceaa82
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions arch/arm/mach-snapdragon/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,12 @@ void enable_caches(void)
gd->arch.tlb_addr = tlb_addr;
gd->arch.tlb_size = tlb_size;

carveout_start = get_timer(0);
/* Takes ~20-50ms on SDM845 */
carve_out_reserved_memory();
debug("carveout time: %lums\n", get_timer(carveout_start));

/* We do the carveouts only for QCS404, for now. */
if (fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcs404") == 0) {
carveout_start = get_timer(0);
/* Takes ~20-50ms on SDM845 */
carve_out_reserved_memory();
debug("carveout time: %lums\n", get_timer(carveout_start));
}
dcache_enable();
}

0 comments on commit 3ceaa82

Please sign in to comment.