From patchwork Sat Apr 6 11:21:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 10888129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D66B21515 for ; Sat, 6 Apr 2019 11:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95A5328A1E for ; Sat, 6 Apr 2019 11:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8921F28AA5; Sat, 6 Apr 2019 11:22:28 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 235B328AAC for ; Sat, 6 Apr 2019 11:22:28 +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=DXAs6+IVmVLO+dvic0LWvAXoYLqGrJL2xtDt2Yec/+I=; b=OzP4NfGlqq9+VS3WKcEonds0CK vURNDPuBGJCOTj0NGdUkUvTdphuylJZSfGUJ5OBJG96JYWVg4PpPwJ7nh4DCQmZ69SVHGolb1fAkv kqRFKqppTrZw49lOiTqfAIku5geC9gtg/I/IaXoXkNmbxCKwy53tVDXtu2nrsEdNn69yw37vRbkZd CI/TFteR3OdanYMrJI12vGZQKTdJ/YpbEsDQK27c8aevQRp/RX4aPPgZSVm5Z5BhrHSoTm1v8e+Qu urf1swk9balL7xZDgMVnB3gaD6l9eFz/C/NkicMrxGmgA7CIpjvkXyjfxLPNvvnsf8RxODDNi0F5L NsKgHJzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjP1-0003Yy-8X; Sat, 06 Apr 2019 11:22:27 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjOw-0003SZ-Ok for linux-arm-kernel@lists.infradead.org; Sat, 06 Apr 2019 11:22:24 +0000 Received: by mail-yw1-xc44.google.com with SMTP id w66so3274114ywd.4 for ; Sat, 06 Apr 2019 04:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zIWMF1R93QZItw73bSxup0eAGPLoi4yPEdVTTG3P0l8=; b=a20QgqD4uW4B3Rs+6cjMACWRmeB4oPCY/j9zmrWNWt42djjcOWINIptpdt7OniFRTs hCTf7GKg5bDurD9n4yyKFPyj3y3AwVVn0pFZ2U3aJfmqQXOmlyvMzilLMPHeoiQkENZG 1qPgKsJIZ+Z4OIhhjgrUZNhJSNTx/885ovv+3uq6Gifm5lvxnNBAPy/3DIkZuUUaW/Me cfsepwG7vyTr9bvLQit9BJrjvv5x4mgQn1m5srNmD5OTpgQhBHP5/KXCx43TInY7+phK 3QrpNJ4sdScZ0/g1d1Jq/W3CNMd9Iak0JU05Tg0av4pu83fwhpybOyBWW4f7Vx8nvQQb NVlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zIWMF1R93QZItw73bSxup0eAGPLoi4yPEdVTTG3P0l8=; b=HQZaWEaxy727f2UXDSFOQP3SMB6j824Zt/WI1PNYU4yIVMTDKiX01DEULSAW28U9Lw 65viJTeCxiXwyZn95Lg+GPOaH0y1IHJ4a3FootR5qPJCavEfxVzu1KIemNWuQoRRZ2P3 Kzlx9XShqVi8S0nPg+2ioE4ca51orUeQ1IkRO3ot19hh6/3Iq30LGyfypo7q7k8Ja0gs B6GADWMLCmNFhQ1irPSaDfy6ukdT/dgEtVCM9p7TtEToAYXwgvzEebY9gj/1eAByggUi gaH8m80NZea/Y70DYSm2N1YupvgUQih22K2hgYCQsDb1CfiZEpcSoayPAdPlCUVflo+K 9f2Q== X-Gm-Message-State: APjAAAU+8MwKjvuf0oPDoV8vZvYmQcSNt46p5d5gAgiu+0sQSI5WCzNF mVNGncL0bDf7Hczd8oeFTM81dA== X-Google-Smtp-Source: APXvYqwgF+DBaVZpWvKYikGIZNq1CHKcP+h0/bYMEdXtStb9fERIdJp9VuYgiq+xcG++kR7KEjeEjw== X-Received: by 2002:a0d:fb87:: with SMTP id l129mr14992561ywf.432.1554549741641; Sat, 06 Apr 2019 04:22:21 -0700 (PDT) Received: from localhost.localdomain (li931-65.members.linode.com. [45.56.113.65]) by smtp.gmail.com with ESMTPSA id w22sm12729360yww.58.2019.04.06.04.22.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 04:22:20 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Suzuki K Poulose , Rob Herring , Mark Rutland , Alexander Shishkin , Wanglai Shi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/4] dt-bindings: arm: coresight: Add new compatible for static replicator Date: Sat, 6 Apr 2019 19:21:42 +0800 Message-Id: <20190406112145.15184-2-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190406112145.15184-1-leo.yan@linaro.org> References: <20190406112145.15184-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190406_042222_876971_5B3DD47B X-CRM114-Status: GOOD ( 13.64 ) 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: Leo Yan 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 CoreSight uses below bindings for replicator: Static replicator, aka. non-configurable replicator: "arm,coresight-replicator"; Dynamic replicator, aka. configurable replicator: "arm,coresight-dynamic-replicator", "arm,primecell"; The compatible string "arm,coresight-replicator" is not an explicit naming to express the replicator is 'static'. To unify the naming convention, this patch introduces a new compatible string "arm,coresight-static-replicator" for the static replicator; the compatible string "arm,coresight-replicator" is still kept thus we can support the old DT binding, but tag it as obsolete and suggest to use the new compatible string. As result CoreSight replicator have below bindings: Static replicator: "arm,coresight-replicator"; (obsolete) "arm,coresight-static-replicator"; Dynamic replicator: "arm,coresight-dynamic-replicator", "arm,primecell"; Signed-off-by: Leo Yan --- Documentation/devicetree/bindings/arm/coresight.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt index f8aff65ab921..f8f794869af2 100644 --- a/Documentation/devicetree/bindings/arm/coresight.txt +++ b/Documentation/devicetree/bindings/arm/coresight.txt @@ -69,7 +69,11 @@ its hardware characteristcs. * compatible: Currently supported value is (note the absence of the AMBA markee): - - "arm,coresight-replicator" + - Coresight Non-configurable Replicator, the compatible string + "arm,coresight-replicator" is obsolete, keep it to support + the old DT bindings: + "arm,coresight-replicator"; + "arm,coresight-static-replicator"; * port or ports: see "Graph bindings for Coresight" below. @@ -169,7 +173,7 @@ Example: /* non-configurable replicators don't show up on the * AMBA bus. As such no need to add "arm,primecell". */ - compatible = "arm,coresight-replicator"; + compatible = "arm,coresight-static-replicator"; out-ports { #address-cells = <1>; From patchwork Sat Apr 6 11:21:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 10888131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF79E1515 for ; Sat, 6 Apr 2019 11:22:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB31320453 for ; Sat, 6 Apr 2019 11:22:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FAFB28A1E; Sat, 6 Apr 2019 11:22:49 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 485B020453 for ; Sat, 6 Apr 2019 11:22:49 +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=9JI3hlOKL3UY2M/noOQ0GL9ecjswgCoDQggFc8oEnO8=; b=PoUMF+lFtyTWiczNK/vtiuVcEU f6H9xfOWOvd2+AZyGQfSBHr5pj+XYcppGfV5lkcOT6RplslfeXvAppr5+e/Tat3bcuPc+rIRJ2REg DoNmTY8V/WeyJkx5u3TMigDWuvKYBQsRIOcCRo8wEfLwDqSsteooqYKobru6KttWKTF96rBvo/sdV xd3D5fBiJYeYZe7x1f6w/K7yemlwQC+Uc9XRWsCKB2J6TfM1hjY0Ln9g2dNiG8XCOQs9uh96gJHc8 ugCzMi34T1CMzcfpltYgZq7Gl7WkH9V4qA/0f0ZHznMPgl6N5aFF7ToZ2aHCnjBi/Y/4u03qAhig+ zovzHX8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjPH-0003x4-IY; Sat, 06 Apr 2019 11:22:43 +0000 Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjP2-0003ah-Ku for linux-arm-kernel@lists.infradead.org; Sat, 06 Apr 2019 11:22:33 +0000 Received: by mail-yb1-xb42.google.com with SMTP id l124so1899134ybf.9 for ; Sat, 06 Apr 2019 04:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gLR19HUc+gmFjS967MFA8MMpurGf3MGUCdDqqoTyKSg=; b=coGSFv8K1L/KQk7yOFkkw+BoZ0QXgZirUaQOqnqT4WFiK6AKev8A8EPZC/iZyVSxJY 6H8ZBBzuJa75AwcskBk+kv0slv1O4R9yOcfbmxgafT+xtHf+PKXMTufk5TX5CtGkJsmJ bpb9NasXW1OJ2FFAJNDU17PI6T9vkGLO9++s72KTiZcl/sbpLBQ1z0uUH96tkpfJTOPD BpQzHOtGErPnSYLVzvFtNFK4jzrib5YVi/JXvATqj8/4lTn3JHLSRRx8qrNhaYDh6zFG /sU/42o41b64q3vSuXyS62FC/8K2X99daZLHdPmJegW8qQ4U0Iw7fjRZD6UGZbgQtMfr MDRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gLR19HUc+gmFjS967MFA8MMpurGf3MGUCdDqqoTyKSg=; b=g6TVGkROSNxueQp11uQQwImcqw6kw/X69mPhcpWB2lpsAfLBS4X+A766Z/D59b4JHr tpxoaFOvghMJUBDIKC1q2aJRbukXTuBbyCBhmEPEt1mUQPTai1kaEPc9vWG77qi5Eqvg rwDP8ATtOmI0Bw1h2vP/ZvThg/dxXqXboahpuavWPQ3yIgvZHKUx7PqEO3OUJtpjz0c3 tY1EnxLRx//SUtPcO23PxCxUd07/OJ066ojbqjgqMihjsV5NmAYLDJ66n306dFyqISoG PtLlipOc92hFocZRpviJ+VbeqCfqqWnPna6q4WXI3CYcSZBEILtLXGohQMiM9MH86ryQ okRA== X-Gm-Message-State: APjAAAWIzcZ3JKTPyZY6vhKejFol3w7KAgk9FiPfg6QjMh67ZT4QiZFJ DlQE1R/4Gxbela68HpN30jR6Yg== X-Google-Smtp-Source: APXvYqwmNU3mGjBEISnJD2cFa6v/OnnTtU19DfRUI5IV7Rwsb8LE1oGJ7ixqz7IP0SpUkcbjDn2ORQ== X-Received: by 2002:a25:cc86:: with SMTP id l128mr4507046ybf.266.1554549747464; Sat, 06 Apr 2019 04:22:27 -0700 (PDT) Received: from localhost.localdomain (li931-65.members.linode.com. [45.56.113.65]) by smtp.gmail.com with ESMTPSA id w22sm12729360yww.58.2019.04.06.04.22.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 04:22:26 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Suzuki K Poulose , Rob Herring , Mark Rutland , Alexander Shishkin , Wanglai Shi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/4] coresight: replicator: Add new device id for static replicator Date: Sat, 6 Apr 2019 19:21:43 +0800 Message-Id: <20190406112145.15184-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190406112145.15184-1-leo.yan@linaro.org> References: <20190406112145.15184-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190406_042228_979412_4B0A7D05 X-CRM114-Status: GOOD ( 13.89 ) 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: Leo Yan 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 This patch adds a device id for the new static replicator compatible string; it changes the driver name from "coresight-replicator" to "coresight-static-replicator" as well. Signed-off-by: Leo Yan --- drivers/hwtracing/coresight/coresight-replicator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 4e0da85efd2d..e6a03642bbdb 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -285,13 +285,14 @@ static const struct dev_pm_ops replicator_dev_pm_ops = { static const struct of_device_id static_replicator_match[] = { {.compatible = "arm,coresight-replicator"}, + {.compatible = "arm,coresight-static-replicator"}, {} }; static struct platform_driver static_replicator_driver = { .probe = static_replicator_probe, .driver = { - .name = "coresight-replicator", + .name = "coresight-static-replicator", .of_match_table = static_replicator_match, .pm = &replicator_dev_pm_ops, .suppress_bind_attrs = true, From patchwork Sat Apr 6 11:21:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 10888133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91BC01515 for ; Sat, 6 Apr 2019 11:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50BC920453 for ; Sat, 6 Apr 2019 11:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 434AC28A1E; Sat, 6 Apr 2019 11:22:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 C3D1620453 for ; Sat, 6 Apr 2019 11:22:57 +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=fxIyx8lVhoavpH2ws0YSGv8NtWu6pZffOXFuJaFkR6E=; b=oPGdslBwpDSipDqgCRRkw6UPyq aGy3OrJmsPVWhlpF2ns+Y4xcqZMHeVFCdC2WH44Wth3x/iynZ+nOtYiNlfZM91TtWV++YcygvYD8g YUsNM8JJ1lLr92N3lLLwYkg7kPTq+P8LRFYUb8i6Z36h55ZNMNxZtBqIboHYMk8SMzZrfVlLLKuJH dT4K0uH9UI9vvG5K+Xm3tXDUCJsfYFbqj1+XXMXiAmFtfpkjVnGnbZ2L2MCi56DOEbAnnW5OTUFFw 2iRbJnv//7+Xf9/b964qHPbcHdk/ymeBFuZd+M2Zu76C6M0FDgIraP7GlkXuCoSZ9RDbP3GrDiy4o XGi2HvHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjPT-00048z-3u; Sat, 06 Apr 2019 11:22:55 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjP6-0003iN-Su for linux-arm-kernel@lists.infradead.org; Sat, 06 Apr 2019 11:22:40 +0000 Received: by mail-yw1-xc43.google.com with SMTP id w66so3274207ywd.4 for ; Sat, 06 Apr 2019 04:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MF+LyKhdoU3hTyItL4k9rMey7QhjKplrEVwhrLx8K+k=; b=GKaTd1XNwC+NCs4UdvfIhT9EeA1ihEtU8RMheZ4131dQvjG9XcTr94HaBLw1kKAWIR 8DrOBuT2lBXjMbhbqL4GT8MuwdecJ96PsJfyT11XdBptVnPpkheKYFFF1oojvVLQGj6Z QA6O+6ZabG2zkzMX0BI8h7nY3F+QHGAScnQqXvYSnVQLs/5P50Jqz9Je0653ARtQt8TY eW1T0mdvjWxv1u5s0qQMyIKMhMkEa2n4AHuZY6KJSeduX6K2H5XzXlNM2PTeISttqqt9 oGGJKEsodWjb2+eMsEeszLS/EB06mj8fG8s7ykRNnkZ02iuN+nPjulPd6njjFDnS6p8e 3MCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MF+LyKhdoU3hTyItL4k9rMey7QhjKplrEVwhrLx8K+k=; b=pDNSoOCR9VZ/rA4vAUI0kGINn8DggUPtBNhB6+CIvzqPDXO+Cfp39WR+gcTg5fn/ZN K6tKRWxdCmkvKLlqeszt4lq9WZvx98IRIhH+0UTeh0c+BuVYK9GjTRGK4zlXxPImi2NP WA3HFiMju836VDHHmH6D0GqmYb20Tls+UgBFxibE/k+aHu6NGXlBelHRHRLftD+qTynS bD71fimcTvzCU2DLS1WfXrHWR6OhZ8olVJ7yN9HAfoWchuQRIQ/uElrz0x1MhzjzNtgk XmxC+dq66xAyXU/kaef0MCxPvlSLyFNJsEU51tgevkG930ciJiL+MaIXcb/QniCuoWdx Rmjw== X-Gm-Message-State: APjAAAVLmp25ngWrBlhqoMgrIWN4a9jue/3l/T0/grtSpbw2yWSG789+ awNBjsHK4G+lj2c7Df5qa5OrmQ== X-Google-Smtp-Source: APXvYqyruaCUsy2DQlE5OPs7Vn5PK28AuHEcTi9eg3GAgkrzqijYXxsrWHq3XswqPJ3iCC+qzQS1Aw== X-Received: by 2002:a81:9982:: with SMTP id q124mr14774369ywg.390.1554549751987; Sat, 06 Apr 2019 04:22:31 -0700 (PDT) Received: from localhost.localdomain (li931-65.members.linode.com. [45.56.113.65]) by smtp.gmail.com with ESMTPSA id w22sm12729360yww.58.2019.04.06.04.22.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 04:22:31 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Suzuki K Poulose , Rob Herring , Mark Rutland , Alexander Shishkin , Wanglai Shi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/4] dt-bindings: arm: coresight: Unify funnel DT binding Date: Sat, 6 Apr 2019 19:21:44 +0800 Message-Id: <20190406112145.15184-4-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190406112145.15184-1-leo.yan@linaro.org> References: <20190406112145.15184-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190406_042233_700175_DD75B1AA X-CRM114-Status: GOOD ( 15.36 ) 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: Leo Yan 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 Following the same fashion with replicator DT binding, this patch is to unify the DT binding for funnel to support static and dynamic modes; finally we get the funnel DT binding as below: Before patch: Static funnel, aka. non-configurable funnel: Not supported; Dynamic funnel, aka. configurable funnel: "arm,coresight-funnel", "arm,primecell"; After patch: Static funnel: "arm,coresight-static-funnel"; Dynamic funnel: "arm,coresight-funnel", "arm,primecell"; (obsolete) "arm,coresight-dynamic-funnel", "arm,primecell"; At the end of this patch, it gives an example for static funnel DT binding, and updates the dynamic funnel example. Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Wanglai Shi Signed-off-by: Leo Yan --- .../devicetree/bindings/arm/coresight.txt | 52 +++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt index f8f794869af2..f8ad11a17cd5 100644 --- a/Documentation/devicetree/bindings/arm/coresight.txt +++ b/Documentation/devicetree/bindings/arm/coresight.txt @@ -8,7 +8,8 @@ through the intermediate links connecting the source to the currently selected sink. Each CoreSight component device should use these properties to describe its hardware characteristcs. -* Required properties for all components *except* non-configurable replicators: +* Required properties for all components *except* non-configurable replicators + and non-configurable funnels: * compatible: These have to be supplemented with "arm,primecell" as drivers are using the AMBA bus interface. Possible values include: @@ -24,8 +25,11 @@ its hardware characteristcs. discovered at boot time when the device is probed. "arm,coresight-tmc", "arm,primecell"; - - Trace Funnel: + - Trace Programmable Funnel, the compatible string + "arm,coresight-funnel" is obsolete, keep it to support + the old DT bindings: "arm,coresight-funnel", "arm,primecell"; + "arm,coresight-dynamic-funnel", "arm,primecell"; - Embedded Trace Macrocell (version 3.x) and Program Flow Trace Macrocell: @@ -65,7 +69,7 @@ its hardware characteristcs. "stm-stimulus-base", each corresponding to the areas defined in "reg". * Required properties for devices that don't show up on the AMBA bus, such as - non-configurable replicators: + non-configurable replicators and non-configurable funnels: * compatible: Currently supported value is (note the absence of the AMBA markee): @@ -75,6 +79,9 @@ its hardware characteristcs. "arm,coresight-replicator"; "arm,coresight-static-replicator"; + - Coresight Non-configurable Funnel: + "arm,coresight-static-funnel"; + * port or ports: see "Graph bindings for Coresight" below. * Optional properties for ETM/PTMs: @@ -204,8 +211,45 @@ Example: }; }; + funnel { + /* + * non-configurable funnel don't show up on the AMBA + * bus. As such no need to add "arm,primecell". + */ + compatible = "arm,coresight-static-funnel"; + clocks = <&crg_ctrl HI3660_PCLK>; + clock-names = "apb_pclk"; + + out-ports { + port { + combo_funnel_out: endpoint { + remote-endpoint = <&top_funnel_in>; + }; + }; + }; + + in-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + combo_funnel_in0: endpoint { + remote-endpoint = <&cluster0_etf_out>; + }; + }; + + port@1 { + reg = <1>; + combo_funnel_in1: endpoint { + remote-endpoint = <&cluster1_etf_out>; + }; + }; + }; + }; + funnel@20040000 { - compatible = "arm,coresight-funnel", "arm,primecell"; + compatible = "arm,coresight-dynamic-funnel", "arm,primecell"; reg = <0 0x20040000 0 0x1000>; clocks = <&oscclk6a>; From patchwork Sat Apr 6 11:21:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 10888193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5856922 for ; Sat, 6 Apr 2019 11:37:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9420528A4E for ; Sat, 6 Apr 2019 11:37:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8787E28A59; Sat, 6 Apr 2019 11:37:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 DD41F28A4E for ; Sat, 6 Apr 2019 11:37:57 +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=bdrqxiJOoRdLhYToyPObZzGyol3vSSbQyYYMtUFJnR0=; b=hTj1w+U2jl3YymoeidTfd9ejB9 JGk34HnP5I1dz4AA4GWcl+eNtCo3dSg7DRPXd27fmTYE6pOnSeYbtD54Fm9r+pVV4h0B2e9dcBhzN xicy+zxx6YUnSybVMmwd/GBhAJw8vFKRrXQVUn1gTOKkozaH0MB2gmoDZWim6WeR4xznKwQxoGQaH UzCKVTqKbKj4JCXwJ25W+Cr4vP7sa7B7/+Ml0GW//rgtiQ1DGBtaJU7gnmxvpdTvzfCB9yiZWNpqN ygykiaUsq6COly/gRNBeCXrXnqnHaBWifDNrdbHFJ5rPV5H8aJvunFTxoNG/XfEGa+75URFC8vUr5 bj0LzUmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCje0-0002R9-Tg; Sat, 06 Apr 2019 11:37:56 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCjPC-0003s3-Tj for linux-arm-kernel@lists.infradead.org; Sat, 06 Apr 2019 11:22:57 +0000 Received: by mail-yw1-xc43.google.com with SMTP id p64so3267804ywg.7 for ; Sat, 06 Apr 2019 04:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4LpYRL6amcq1y1zo/McGCepepBd+6zq1F9/XI0pWbWY=; b=wWxaRb40D0nkGfztICIU4j026UzE7ocN8AtAYEA8pCkUGYLCR4QoxCHjBG9GB0VvTA DBBHq87i/otSdRUyHHVwSwirB3/P9d1J5QH+/Gv043QjbnFBUPK+mhBcCZRZ2efv2TSg yP8Qb6clB2ZVZhz2ibessyTH7Jr7reva7D064QN4FO/ODDHkko7Ifd2+6T316j+e41ip k/lf/MrIsivgH7lxyFjNc9W3WzVRubCqdxUCb/Nt68jjzVqn9QsgiAjCg4vJhtJdB126 7nqIf4Ovo6P9tbo23lqPggyafdKxkSUqtdUvwnTImIFKl8A6euWGpmoXisYo6cpYqL8/ 6rlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4LpYRL6amcq1y1zo/McGCepepBd+6zq1F9/XI0pWbWY=; b=mdai8uTBs/m7Mkh48k8W+TjPyQ9dfjcTe072R8U/sEy/2gPIPgssHK3J4orXqZWQE8 1Ujqsbw2NCofM5uZC0DTr098uvZ//B20n6dO2YMjqqXqTdF0nr4IsZmvnM9nDbdfuLvL 7visO4swx7EsUR8aHG/qpYS+gHNj1TPYj3z+fOFaKmCTBdwAtRhboCJFAO30kS4oDjZP jB5KJAHP8LVa3T1lnnZ1d/bDT2KnQYoR1VSmJC9goW1v2APBs0I3CwNhw6g39EfOWWmn BRtJ7b+ioRcePdwuhJ10gc49Jo8/Ox2GnQ5II2pMjxCdTk7w2p61Qh5n89OVK3XmnLfN IDTw== X-Gm-Message-State: APjAAAX6b3PKTw9VI9at0Ckq2TUnvuBS+oTW7bHoBMNeS3YxBKQrHI+p fLHQEjfQ3JJOp/7EskzqgRs7nw== X-Google-Smtp-Source: APXvYqyuc6KSGW/uvBF2LfpdGNjPJWpgqVA4v17WKWmjAFeO7cRqPCJOUurFKfhX0BYtkIZ0WepRvw== X-Received: by 2002:a81:a00e:: with SMTP id x14mr12492599ywg.281.1554549757934; Sat, 06 Apr 2019 04:22:37 -0700 (PDT) Received: from localhost.localdomain (li931-65.members.linode.com. [45.56.113.65]) by smtp.gmail.com with ESMTPSA id w22sm12729360yww.58.2019.04.06.04.22.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 04:22:37 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Suzuki K Poulose , Rob Herring , Mark Rutland , Alexander Shishkin , Wanglai Shi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 4/4] coresight: funnel: Support static funnel Date: Sat, 6 Apr 2019 19:21:45 +0800 Message-Id: <20190406112145.15184-5-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190406112145.15184-1-leo.yan@linaro.org> References: <20190406112145.15184-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190406_042239_378007_2B76722F X-CRM114-Status: GOOD ( 22.97 ) 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: Leo Yan 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 Since CoreSight hardware topology can use a 'hidden' funnel in the trace data path, this kind funnel doesn't have register for accessing and is used by default from hardware design perspective. Below is an example for related hardware topology: +------+ +------+ | cpu0 |->| ETM |-\ +------+ +------+ \-> +--------+ +-----+ ...... | Funnel |->| ETF |-\ Hidden funnel +------+ +------+ /-> +--------+ +-----+ \ | | cpu3 |->| ETM |-/ \ V +------+ +------+ \-> +--------+ | Funnel |-> ... +------+ +------+ /-> +--------+ | cpu4 |->| ETM |-\ / +------+ +------+ \-> +--------+ +-----+ / ...... | Funnel |->| ETF |-/ +------+ +------+ /-> +--------+ +-----+ | cpu7 |->| ETM |-/ +------+ +------+ The CoreSight funnel driver only supports dynamic funnel with registration register resource, thus it cannot support for the static funnel case and it's impossible to create trace data path for this case. This patch is to extend CoreSight funnel driver to support both for static funnel and dynamic funnel. For the dynamic funnel it reuses the code existed in the driver, for static funnel the driver will support device probe if without providing register resource and the driver skips registers accessing when detect the register base is NULL. Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Wanglai Shi Suggested-by: Suzuki K Poulose Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose --- .../hwtracing/coresight/coresight-funnel.c | 112 +++++++++++++----- 1 file changed, 85 insertions(+), 27 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 927925151509..2030d2596d90 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,7 @@ struct funnel_drvdata { unsigned long priority; }; -static int funnel_enable_hw(struct funnel_drvdata *drvdata, int port) +static int dynamic_funnel_enable_hw(struct funnel_drvdata *drvdata, int port) { u32 functl; int rc = 0; @@ -71,17 +72,19 @@ static int funnel_enable_hw(struct funnel_drvdata *drvdata, int port) static int funnel_enable(struct coresight_device *csdev, int inport, int outport) { - int rc; + int rc = 0; struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); - rc = funnel_enable_hw(drvdata, inport); + if (drvdata->base) + rc = dynamic_funnel_enable_hw(drvdata, inport); if (!rc) dev_dbg(drvdata->dev, "FUNNEL inport %d enabled\n", inport); return rc; } -static void funnel_disable_hw(struct funnel_drvdata *drvdata, int inport) +static void dynamic_funnel_disable_hw(struct funnel_drvdata *drvdata, + int inport) { u32 functl; @@ -103,7 +106,8 @@ static void funnel_disable(struct coresight_device *csdev, int inport, { struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); - funnel_disable_hw(drvdata, inport); + if (drvdata->base) + dynamic_funnel_disable_hw(drvdata, inport); dev_dbg(drvdata->dev, "FUNNEL inport %d disabled\n", inport); } @@ -177,54 +181,67 @@ static struct attribute *coresight_funnel_attrs[] = { }; ATTRIBUTE_GROUPS(coresight_funnel); -static int funnel_probe(struct amba_device *adev, const struct amba_id *id) +static int funnel_probe(struct device *dev, struct resource *res) { int ret; void __iomem *base; - struct device *dev = &adev->dev; struct coresight_platform_data *pdata = NULL; struct funnel_drvdata *drvdata; - struct resource *res = &adev->res; struct coresight_desc desc = { 0 }; - struct device_node *np = adev->dev.of_node; + struct device_node *np = dev->of_node; if (np) { pdata = of_get_coresight_platform_data(dev, np); if (IS_ERR(pdata)) return PTR_ERR(pdata); - adev->dev.platform_data = pdata; + dev->platform_data = pdata; } drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM; - drvdata->dev = &adev->dev; - drvdata->atclk = devm_clk_get(&adev->dev, "atclk"); /* optional */ + drvdata->dev = dev; + drvdata->atclk = devm_clk_get(dev, "atclk"); /* optional */ if (!IS_ERR(drvdata->atclk)) { ret = clk_prepare_enable(drvdata->atclk); if (ret) return ret; } - dev_set_drvdata(dev, drvdata); - /* Validity for the resource is already checked by the AMBA core */ - base = devm_ioremap_resource(dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); + /* + * Map the device base for dynamic-funnel, which has been + * validated by AMBA core. + */ + if (res) { + base = devm_ioremap_resource(dev, res); + if (IS_ERR(base)) { + ret = PTR_ERR(base); + goto out_disable_clk; + } + drvdata->base = base; + desc.groups = coresight_funnel_groups; + } - drvdata->base = base; - pm_runtime_put(&adev->dev); + dev_set_drvdata(dev, drvdata); desc.type = CORESIGHT_DEV_TYPE_LINK; desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_MERG; desc.ops = &funnel_cs_ops; desc.pdata = pdata; desc.dev = dev; - desc.groups = coresight_funnel_groups; drvdata->csdev = coresight_register(&desc); + if (IS_ERR(drvdata->csdev)) { + ret = PTR_ERR(drvdata->csdev); + goto out_disable_clk; + } + + pm_runtime_put(dev); - return PTR_ERR_OR_ZERO(drvdata->csdev); +out_disable_clk: + if (ret && !IS_ERR_OR_NULL(drvdata->atclk)) + clk_disable_unprepare(drvdata->atclk); + return ret; } #ifdef CONFIG_PM @@ -253,7 +270,48 @@ static const struct dev_pm_ops funnel_dev_pm_ops = { SET_RUNTIME_PM_OPS(funnel_runtime_suspend, funnel_runtime_resume, NULL) }; -static const struct amba_id funnel_ids[] = { +static int static_funnel_probe(struct platform_device *pdev) +{ + int ret; + + pm_runtime_get_noresume(&pdev->dev); + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + + /* Static funnel do not have programming base */ + ret = funnel_probe(&pdev->dev, NULL); + + if (ret) { + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_disable(&pdev->dev); + } + + return ret; +} + +static const struct of_device_id static_funnel_match[] = { + {.compatible = "arm,coresight-static-funnel"}, + {} +}; + +static struct platform_driver static_funnel_driver = { + .probe = static_funnel_probe, + .driver = { + .name = "coresight-static-funnel", + .of_match_table = static_funnel_match, + .pm = &funnel_dev_pm_ops, + .suppress_bind_attrs = true, + }, +}; +builtin_platform_driver(static_funnel_driver); + +static int dynamic_funnel_probe(struct amba_device *adev, + const struct amba_id *id) +{ + return funnel_probe(&adev->dev, &adev->res); +} + +static const struct amba_id dynamic_funnel_ids[] = { { .id = 0x000bb908, .mask = 0x000fffff, @@ -266,14 +324,14 @@ static const struct amba_id funnel_ids[] = { { 0, 0}, }; -static struct amba_driver funnel_driver = { +static struct amba_driver dynamic_funnel_driver = { .drv = { - .name = "coresight-funnel", + .name = "coresight-dynamic-funnel", .owner = THIS_MODULE, .pm = &funnel_dev_pm_ops, .suppress_bind_attrs = true, }, - .probe = funnel_probe, - .id_table = funnel_ids, + .probe = dynamic_funnel_probe, + .id_table = dynamic_funnel_ids, }; -builtin_amba_driver(funnel_driver); +builtin_amba_driver(dynamic_funnel_driver);