]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/hwtracing/coresight/coresight-tmc.c
coresight: tmc: Configure DMA mask appropriately
[karo-tx-linux.git] / drivers / hwtracing / coresight / coresight-tmc.c
index d8517d2a968caf8f97e1a2e5c89c9167a12bc58d..864488793f091b0a258cf1c10b6c0ce4d6066a95 100644 (file)
@@ -362,6 +362,13 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
                desc.type = CORESIGHT_DEV_TYPE_SINK;
                desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
                desc.ops = &tmc_etr_cs_ops;
+               /*
+                * ETR configuration uses a 40-bit AXI master in place of
+                * the embedded SRAM of ETB/ETF.
+                */
+               ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
+               if (ret)
+                       goto out;
        } else {
                desc.type = CORESIGHT_DEV_TYPE_LINKSINK;
                desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_FIFO;