OSDN Git Service

coresight: Extend the PIDR mask to cover relevant bits in PIDR2
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 10 Oct 2017 20:32:12 +0000 (14:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Oct 2017 13:03:06 +0000 (15:03 +0200)
As per coresight standards, PIDR2 register has the following format :

 [2-0] - JEP106_bits6to4
 [3] - JEDEC, designer ID is specified by JEDEC.

However some of the drivers only use mask of 0x3 for the PIDR2 leaving
bits [3-2] unchecked, which could potentially match the component for
a different device altogether. This patch fixes the mask and the
corresponding id bits for the existing devices.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-dynamic-replicator.c
drivers/hwtracing/coresight/coresight-etb10.c
drivers/hwtracing/coresight/coresight-etm3x.c
drivers/hwtracing/coresight/coresight-funnel.c
drivers/hwtracing/coresight/coresight-stm.c
drivers/hwtracing/coresight/coresight-tmc.c
drivers/hwtracing/coresight/coresight-tpiu.c

index accc205..8f4357e 100644 (file)
@@ -199,8 +199,8 @@ static const struct dev_pm_ops replicator_dev_pm_ops = {
 
 static const struct amba_id replicator_ids[] = {
        {
-               .id     = 0x0003b909,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb909,
+               .mask   = 0x000fffff,
        },
        {
                /* Coresight SoC-600 */
index 56ecd7a..e03e589 100644 (file)
@@ -748,8 +748,8 @@ static const struct dev_pm_ops etb_dev_pm_ops = {
 
 static const struct amba_id etb_ids[] = {
        {
-               .id     = 0x0003b907,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb907,
+               .mask   = 0x000fffff,
        },
        { 0, 0},
 };
index e5b1ec5..39f42fd 100644 (file)
@@ -901,33 +901,33 @@ static const struct dev_pm_ops etm_dev_pm_ops = {
 
 static const struct amba_id etm_ids[] = {
        {       /* ETM 3.3 */
-               .id     = 0x0003b921,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb921,
+               .mask   = 0x000fffff,
                .data   = "ETM 3.3",
        },
        {       /* ETM 3.5 - Cortex-A5 */
-               .id     = 0x0003b955,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb955,
+               .mask   = 0x000fffff,
                .data   = "ETM 3.5",
        },
        {       /* ETM 3.5 */
-               .id     = 0x0003b956,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb956,
+               .mask   = 0x000fffff,
                .data   = "ETM 3.5",
        },
        {       /* PTM 1.0 */
-               .id     = 0x0003b950,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb950,
+               .mask   = 0x000fffff,
                .data   = "PTM 1.0",
        },
        {       /* PTM 1.1 */
-               .id     = 0x0003b95f,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb95f,
+               .mask   = 0x000fffff,
                .data   = "PTM 1.1",
        },
        {       /* PTM 1.1 Qualcomm */
-               .id     = 0x0003006f,
-               .mask   = 0x0003ffff,
+               .id     = 0x000b006f,
+               .mask   = 0x000fffff,
                .data   = "PTM 1.1",
        },
        { 0, 0},
index 77642e0..fd3c396 100644 (file)
@@ -248,8 +248,8 @@ static const struct dev_pm_ops funnel_dev_pm_ops = {
 
 static const struct amba_id funnel_ids[] = {
        {
-               .id     = 0x0003b908,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb908,
+               .mask   = 0x000fffff,
        },
        {
                /* Coresight SoC-600 */
index 92a780a..15e7ef3 100644 (file)
@@ -917,13 +917,13 @@ static const struct dev_pm_ops stm_dev_pm_ops = {
 
 static const struct amba_id stm_ids[] = {
        {
-               .id     = 0x0003b962,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb962,
+               .mask   = 0x000fffff,
                .data   = "STM32",
        },
        {
-               .id     = 0x0003b963,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb963,
+               .mask   = 0x000fffff,
                .data   = "STM500",
        },
        { 0, 0},
index 2ff4a66..0ea04f5 100644 (file)
@@ -439,8 +439,8 @@ out:
 
 static const struct amba_id tmc_ids[] = {
        {
-               .id     = 0x0003b961,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb961,
+               .mask   = 0x000fffff,
        },
        {
                /* Coresight SoC 600 TMC-ETR/ETS */
index d7a3e45..bef49a3 100644 (file)
@@ -194,8 +194,8 @@ static const struct dev_pm_ops tpiu_dev_pm_ops = {
 
 static const struct amba_id tpiu_ids[] = {
        {
-               .id     = 0x0003b912,
-               .mask   = 0x0003ffff,
+               .id     = 0x000bb912,
+               .mask   = 0x000fffff,
        },
        {
                .id     = 0x0004b912,