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

Commit 3f2c1cc5 authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Yabin Cui
Browse files

UPSTREAM: coresight: tmc: Report DMA setup failures



(Upstream commit 08be874775f13a0acffff864440d10b8b1397912).

If we failed to setup the DMA mask for TMC-ETR, report the
error before failing the probe.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 140266694
Change-Id: I4567bb57138de35f2b7383edc58a944cf9cc8098
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
parent 25a0dd67
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -340,6 +340,8 @@ static inline bool tmc_etr_can_use_sg(struct tmc_drvdata *drvdata)
static int tmc_etr_setup_caps(struct tmc_drvdata *drvdata,
			     u32 devid, void *dev_caps)
{
	int rc;

	u32 dma_mask = 0;

	/* Set the unadvertised capabilities */
@@ -369,7 +371,10 @@ static int tmc_etr_setup_caps(struct tmc_drvdata *drvdata,
		dma_mask = 40;
	}

	return dma_set_mask_and_coherent(drvdata->dev, DMA_BIT_MASK(dma_mask));
	rc = dma_set_mask_and_coherent(drvdata->dev, DMA_BIT_MASK(dma_mask));
	if (rc)
		dev_err(drvdata->dev, "Failed to setup DMA mask: %d\n", rc);
	return rc;
}

static int tmc_probe(struct amba_device *adev, const struct amba_id *id)