Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 456490bd authored by Satyajit Desai's avatar Satyajit Desai
Browse files

coresight-tmc: Add support to set default mem_type



Add support to read device tree property to select mem_type for
ETR-MEM configuration.

Change-Id: I15f7b52fdaa83041c2e0d4fde6326f6c9edbbc2d
Signed-off-by: default avatarSatyajit Desai <sadesai@codeaurora.org>
parent 16496105
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -436,8 +436,11 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
		if (ret)
			drvdata->size = SZ_1M;

		drvdata->mem_size = drvdata->size;
		if (of_property_read_bool(np, "arm,sg-enable"))
			drvdata->memtype  = TMC_ETR_MEM_TYPE_SG;
		else
			drvdata->memtype  = TMC_ETR_MEM_TYPE_CONTIG;
		drvdata->mem_size = drvdata->size;
		drvdata->mem_type = drvdata->memtype;
	} else {
		drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4;