From patchwork Mon Jun 12 14:36:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 9781261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 882AE60244 for ; Mon, 12 Jun 2017 14:38:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A170281B7 for ; Mon, 12 Jun 2017 14:38:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BD93283C7; Mon, 12 Jun 2017 14:38:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5175E281B7 for ; Mon, 12 Jun 2017 14:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OgUlvTyUTlQKJ4qhGupetj/aJnOtz/Y4Ypv7r4G8+HE=; b=Nd3sc+o5ohQBIGTBuenrtLPiHr KJV1YZAYWz6k0rK5UBu2qG5cojOmevIAA5fYoRxrpHT0s48ZUXBiGGSMFUnDv/ZkEEskqOloNmQkd HvZNTop0JUOEOn7V/CXqMQDtxkLSq/k8Sn7iU+x/hOQkFBGSEu+S951z7C9ptXuAD1ebdc8bqG29U YToaJE+8lGsFZrTBxNxjpp2IugxbyBXfBq465xZVLUEgWHO2ft9zGOK214MIpmxhI3FL1ajjBWzW3 LcI7A8Jyo/j3FAfgk4GbaXo+zEn1+jN7iN8VWlEqCAQadryYh9SRD92JRx8q03SCnxwaYqm1W4b9/ pt9GTeYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKQUU-0000ZK-Na; Mon, 12 Jun 2017 14:38:50 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKQTh-0007y4-E6 for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2017 14:38:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E734D1688; Mon, 12 Jun 2017 07:37:41 -0700 (PDT) Received: from e107814-lin.cambridge.arm.com (e107814-lin.cambridge.arm.com [10.1.206.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2D8673F557; Mon, 12 Jun 2017 07:37:41 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/12] coresight replicator: Expose replicator management registers Date: Mon, 12 Jun 2017 15:36:46 +0100 Message-Id: <1497278211-5001-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497278211-5001-1-git-send-email-suzuki.poulose@arm.com> References: <1497278211-5001-1-git-send-email-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170612_073801_521104_3A7D1334 X-CRM114-Status: UNSURE ( 7.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, Suzuki K Poulose MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Expose the idfilter* registers of the programmable replicator. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- .../hwtracing/coresight/coresight-replicator-qcom.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-replicator-qcom.c b/drivers/hwtracing/coresight/coresight-replicator-qcom.c index b029a5f..4dd18e0 100644 --- a/drivers/hwtracing/coresight/coresight-replicator-qcom.c +++ b/drivers/hwtracing/coresight/coresight-replicator-qcom.c @@ -95,6 +95,26 @@ static const struct coresight_ops replicator_cs_ops = { .link_ops = &replicator_link_ops, }; +coresight_simple_func(struct replicator_state, NULL, idfilter0, + REPLICATOR_IDFILTER0); +coresight_simple_func(struct replicator_state, NULL, idfilter1, + REPLICATOR_IDFILTER1); +static struct attribute *replicator_mgmt_attrs[] = { + &dev_attr_idfilter0.attr, + &dev_attr_idfilter1.attr, + NULL, +}; + +static const struct attribute_group replicator_mgmt_group = { + .attrs = replicator_mgmt_attrs, + .name = "mgmt", +}; + +static const struct attribute_group *replicator_groups[] = { + &replicator_mgmt_group, + NULL, +}; + static int replicator_probe(struct amba_device *adev, const struct amba_id *id) { int ret; @@ -139,6 +159,7 @@ static int replicator_probe(struct amba_device *adev, const struct amba_id *id) desc.ops = &replicator_cs_ops; desc.pdata = adev->dev.platform_data; desc.dev = &adev->dev; + desc.groups = replicator_groups; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) return PTR_ERR(drvdata->csdev);