From: Ruiqiang Hao <ruiqiang....@windriver.com>

The tweak of TRCIDR1 introduced by commit 233b9a7d036d ("coresight:
etm4x: Add support for Marvell OcteonTX2") was dropped by commit
7b579662e78d (coresight: etm4x: Drop the useless tweak of TRCIDR1),
This will loss the original Ignore Packet feature, so we use a tweak
of TRCDEVARCH to support this feature again.

Signed-off-by: Ruiqiang Hao <ruiqiang....@windriver.com>
---
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c 
b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index d5d1136ab83d..9c01ed6b4b8a 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -990,6 +990,15 @@ static bool etm4_init_iomem_access(struct etmv4_drvdata 
*drvdata,
 {
        u32 devarch = readl_relaxed(drvdata->base + TRCDEVARCH);
 
+       /* OcteonTX2 hardware reports version as ETMv4.2 but it supports
+        * Ignore Packet feature of ETMv4.3. Hence, treat this as comaptible
+        * with ETMv4.3.
+        */
+       if (drvdata->etm_quirks & CORESIGHT_QUIRK_ETM_TREAT_ETMv43) {
+               devarch &= ~ETM_DEVARCH_REVISION_MASK;
+               devarch |= 0x3 << ETM_DEVARCH_REVISION_SHIFT;
+       }
+
        /*
         * All ETMs must implement TRCDEVARCH to indicate that
         * the component is an ETMv4. Even though TRCIDR1 also
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12423): 
https://lists.yoctoproject.org/g/linux-yocto/message/12423
Mute This Topic: https://lists.yoctoproject.org/mt/98528771/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to