Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1880187pxb; Sun, 10 Jan 2021 14:56:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfu8ZAHK4HMUJY39LDyN8UdT4rCXciVJG9KNLwBd8nkZIGZC5lT9zDPWGbjUedq/yZcpuG X-Received: by 2002:aa7:dc0d:: with SMTP id b13mr12315318edu.170.1610319386253; Sun, 10 Jan 2021 14:56:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610319386; cv=none; d=google.com; s=arc-20160816; b=RQenThJoy3ihxxOS9zshpCIu0JcZtJxg8muz+yRCBPxZbiN3HuiVYkUnEWA5pyEA0M g5y2On96TnG8YIIeIRHSbk8kNmRzEhOtGfx8/hH3JwcJCrzuNcI1BKOq+PAuW0k9tv4Y euAd9s4rrv2/0eeG/lyKeXKp7E/shpW61D5I25LDY7C/8P50xcksU0YQCIqR0sQcy2D4 SxKRqHpnj25HAktYsrII40ur0v6Hh9/3lg+Ngw8SrwFOZpoCS+HgdcC/lLV+EPHwr1W/ neEvg/4x05oHkCJw2JTI5N4cM0R5wTGpGQcrbUW+PnKoUpyic9N9gZ6V68nXhvi5vGfP 7qIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xAaLxq4Yy1AGmZ/t4kT6fcJwkulyns4Q5MddUItTStI=; b=Ctwyz4LEkjalOojKtOtSXncLG/mDYFfqbhJASQWC+OXRvEphvweDzfpmRP+yt0ciAu RvheCrWWQ4agshcB2LUZk7wz0vptLWUNDDd2qRxuQoS1TisuszbNI1Txv3UgdWKoCsrH b6cEffZa3ENGlCtccFBPQiyR322FuIud0Xf5GoBtKAFlm4JmAVSk8TpwtNuSYZGA4spr AOf0Mhba0hoFMTR6Rt1nSlS/qoINgd0D6rggSFCvTeN5bjvfyifAfR8CD9Z6MnTqfIOc c/UZm6EUSpMGuuNlx4bovYcaMZ9xyyQhs6MooLEAfCmFRB4Bf7PLKxw+J0b9aiYUa8QF VYyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si6017844eja.375.2021.01.10.14.56.03; Sun, 10 Jan 2021 14:56:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbhAJWwE (ORCPT + 99 others); Sun, 10 Jan 2021 17:52:04 -0500 Received: from foss.arm.com ([217.140.110.172]:39078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727203AbhAJWuh (ORCPT ); Sun, 10 Jan 2021 17:50:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 249C31474; Sun, 10 Jan 2021 14:49:18 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CA1F63F719; Sun, 10 Jan 2021 14:49:16 -0800 (PST) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org, mathieu.poirier@linaro.org, anshuman.khandual@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org, jonathan.zhouwen@huawei.com, catalin.marinas@arm.com, Suzuki K Poulose Subject: [PATCH v7 10/28] coresight: etm4x: Add commentary on the registers Date: Sun, 10 Jan 2021 22:48:32 +0000 Message-Id: <20210110224850.1880240-11-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210110224850.1880240-1-suzuki.poulose@arm.com> References: <20210110224850.1880240-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As we are about define a switch..case table for individual register access by offset for implementing the system instruction support, document the possible set of registers for each group to make it easier to correlate. Cc: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- Changes since v3 - Fix commit description spelling mistake (Mathieu) --- drivers/hwtracing/coresight/coresight-etm4x.h | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index b6854f6fd666..3c2b49ffabc8 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -45,13 +45,13 @@ #define TRCVDSACCTLR 0x0A4 #define TRCVDARCCTLR 0x0A8 /* Derived resources registers */ -#define TRCSEQEVRn(n) (0x100 + (n * 4)) +#define TRCSEQEVRn(n) (0x100 + (n * 4)) /* n = 0-2 */ #define TRCSEQRSTEVR 0x118 #define TRCSEQSTR 0x11C #define TRCEXTINSELR 0x120 -#define TRCCNTRLDVRn(n) (0x140 + (n * 4)) -#define TRCCNTCTLRn(n) (0x150 + (n * 4)) -#define TRCCNTVRn(n) (0x160 + (n * 4)) +#define TRCCNTRLDVRn(n) (0x140 + (n * 4)) /* n = 0-3 */ +#define TRCCNTCTLRn(n) (0x150 + (n * 4)) /* n = 0-3 */ +#define TRCCNTVRn(n) (0x160 + (n * 4)) /* n = 0-3 */ /* ID registers */ #define TRCIDR8 0x180 #define TRCIDR9 0x184 @@ -60,7 +60,7 @@ #define TRCIDR12 0x190 #define TRCIDR13 0x194 #define TRCIMSPEC0 0x1C0 -#define TRCIMSPECn(n) (0x1C0 + (n * 4)) +#define TRCIMSPECn(n) (0x1C0 + (n * 4)) /* n = 1-7 */ #define TRCIDR0 0x1E0 #define TRCIDR1 0x1E4 #define TRCIDR2 0x1E8 @@ -69,9 +69,12 @@ #define TRCIDR5 0x1F4 #define TRCIDR6 0x1F8 #define TRCIDR7 0x1FC -/* Resource selection registers */ +/* + * Resource selection registers, n = 2-31. + * First pair (regs 0, 1) is always present and is reserved. + */ #define TRCRSCTLRn(n) (0x200 + (n * 4)) -/* Single-shot comparator registers */ +/* Single-shot comparator registers, n = 0-7 */ #define TRCSSCCRn(n) (0x280 + (n * 4)) #define TRCSSCSRn(n) (0x2A0 + (n * 4)) #define TRCSSPCICRn(n) (0x2C0 + (n * 4)) @@ -81,11 +84,13 @@ #define TRCPDCR 0x310 #define TRCPDSR 0x314 /* Trace registers (0x318-0xEFC) */ -/* Comparator registers */ +/* Address Comparator registers n = 0-15 */ #define TRCACVRn(n) (0x400 + (n * 8)) #define TRCACATRn(n) (0x480 + (n * 8)) +/* Data Value Comparator Value registers, n = 0-7 */ #define TRCDVCVRn(n) (0x500 + (n * 16)) #define TRCDVCMRn(n) (0x580 + (n * 16)) +/* ContextID/Virtual ContextID comparators, n = 0-7 */ #define TRCCIDCVRn(n) (0x600 + (n * 8)) #define TRCVMIDCVRn(n) (0x640 + (n * 8)) #define TRCCIDCCTLR0 0x680 -- 2.24.1