Skip to content

Commit 8e3015e

Browse files
Suzuki K Poulosegregkh
authored andcommitted
coresight: ETM: Add support for Arm Cortex-A73 and Cortex-A35
[ Upstream commit 5cedd22 ] Add ETM PIDs of the Arm cortex-A CPUs to the white list of ETMs. While at it add a helper macro to make it easier to add the new entries. Cc: Mathieu Poirier <mathieu.poirier@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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4334c6e commit 8e3015e

1 file changed

Lines changed: 14 additions & 17 deletions

File tree

drivers/hwtracing/coresight/coresight-etm4x.c

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,8 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
10341034
}
10351035

10361036
pm_runtime_put(&adev->dev);
1037-
dev_info(dev, "%s initialized\n", (char *)id->data);
1037+
dev_info(dev, "CPU%d: ETM v%d.%d initialized\n",
1038+
drvdata->cpu, drvdata->arch >> 4, drvdata->arch & 0xf);
10381039

10391040
if (boot_enable) {
10401041
coresight_enable(drvdata->csdev);
@@ -1052,23 +1053,19 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
10521053
return ret;
10531054
}
10541055

1056+
#define ETM4x_AMBA_ID(pid) \
1057+
{ \
1058+
.id = pid, \
1059+
.mask = 0x000fffff, \
1060+
}
1061+
10551062
static const struct amba_id etm4_ids[] = {
1056-
{ /* ETM 4.0 - Cortex-A53 */
1057-
.id = 0x000bb95d,
1058-
.mask = 0x000fffff,
1059-
.data = "ETM 4.0",
1060-
},
1061-
{ /* ETM 4.0 - Cortex-A57 */
1062-
.id = 0x000bb95e,
1063-
.mask = 0x000fffff,
1064-
.data = "ETM 4.0",
1065-
},
1066-
{ /* ETM 4.0 - A72, Maia, HiSilicon */
1067-
.id = 0x000bb95a,
1068-
.mask = 0x000fffff,
1069-
.data = "ETM 4.0",
1070-
},
1071-
{ 0, 0},
1063+
ETM4x_AMBA_ID(0x000bb95d), /* Cortex-A53 */
1064+
ETM4x_AMBA_ID(0x000bb95e), /* Cortex-A57 */
1065+
ETM4x_AMBA_ID(0x000bb95a), /* Cortex-A72 */
1066+
ETM4x_AMBA_ID(0x000bb959), /* Cortex-A73 */
1067+
ETM4x_AMBA_ID(0x000bb9da), /* Cortex-A35 */
1068+
{},
10721069
};
10731070

10741071
static struct amba_driver etm4x_driver = {

0 commit comments

Comments
 (0)