ARM: 8837/1: coresight: etmv4: Update ID register table to add UCI support
authorMike Leach <mike.leach@linaro.org>
Wed, 13 Feb 2019 13:41:51 +0000 (14:41 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 26 Feb 2019 11:23:50 +0000 (11:23 +0000)
Adds macro to enable UCI entries to be added to AMBA ID tables.

Updates the ID register tables to contain a UCI entry for the A35 ETM
device to allow correct matching of driver in the amba bus code.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/hwtracing/coresight/coresight-etm4x.c
drivers/hwtracing/coresight/coresight-priv.h

index 53e2fb6..dd9b9b5 100644 (file)
@@ -1067,18 +1067,21 @@ err_arch_supported:
        return ret;
 }
 
-#define ETM4x_AMBA_ID(pid)                     \
-       {                                       \
-               .id     = pid,                  \
-               .mask   = 0x000fffff,           \
+static struct amba_cs_uci_id uci_id_etm4[] = {
+       {
+               /*  ETMv4 UCI data */
+               .devarch        = 0x47704a13,
+               .devarch_mask   = 0xfff0ffff,
+               .devtype        = 0x00000013,
        }
+};
 
 static const struct amba_id etm4_ids[] = {
-       ETM4x_AMBA_ID(0x000bb95d),              /* Cortex-A53 */
-       ETM4x_AMBA_ID(0x000bb95e),              /* Cortex-A57 */
-       ETM4x_AMBA_ID(0x000bb95a),              /* Cortex-A72 */
-       ETM4x_AMBA_ID(0x000bb959),              /* Cortex-A73 */
-       ETM4x_AMBA_ID(0x000bb9da),              /* Cortex-A35 */
+       CS_AMBA_ID(0x000bb95d),         /* Cortex-A53 */
+       CS_AMBA_ID(0x000bb95e),         /* Cortex-A57 */
+       CS_AMBA_ID(0x000bb95a),         /* Cortex-A72 */
+       CS_AMBA_ID(0x000bb959),         /* Cortex-A73 */
+       CS_AMBA_UCI_ID(0x000bb9da, uci_id_etm4),        /* Cortex-A35 */
        {},
 };
 
index 02a1f52..fd69ad2 100644 (file)
@@ -183,6 +183,14 @@ static inline int etm_writel_cp14(u32 off, u32 val) { return 0; }
                        }                               \
        }
 
+/* coresight AMBA ID, full UCI structure: id table entry. */
+#define CS_AMBA_UCI_ID(pid, uci_ptr)   \
+       {                               \
+               .id     = pid,          \
+               .mask   = 0x000fffff,   \
+               .data   = uci_ptr       \
+       }
+
 /* extract the data value from a UCI structure given amba_id pointer. */
 static inline void *coresight_get_uci_data(const struct amba_id *id)
 {