Commit 06cbc5e4 authored by Andrew Davis's avatar Andrew Davis Committed by Mathieu Poirier
Browse files

remoteproc: k3-r5: Use IO memset to clear TCMs



While it should be safe to use normal memset() on these memories as they
are mapped as Normal Non-Cached, using the memset_io() provides stronger
guarantees on access alignment and fixes a sparse check warning. Switch
to memset_io() here.

Signed-off-by: default avatarAndrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20241021204557.929823-1-afd@ti.com


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent be3e6529
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -487,10 +487,10 @@ static int k3_r5_rproc_prepare(struct rproc *rproc)
	 * can be effective on all TCM addresses.
	 */
	dev_dbg(dev, "zeroing out ATCM memory\n");
	memset(core->mem[0].cpu_addr, 0x00, core->mem[0].size);
	memset_io(core->mem[0].cpu_addr, 0x00, core->mem[0].size);

	dev_dbg(dev, "zeroing out BTCM memory\n");
	memset(core->mem[1].cpu_addr, 0x00, core->mem[1].size);
	memset_io(core->mem[1].cpu_addr, 0x00, core->mem[1].size);

	return 0;
}