From patchwork Wed May 22 10:34:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 164780 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp693599ili; Wed, 22 May 2019 03:35:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZy4D+l4I8yHJziC89/Ss54m05AhACMruJ/+J4hmDGvgk4zu7+ugPzoNrcE9WMLJdGIqFa X-Received: by 2002:aa7:8e55:: with SMTP id d21mr94311504pfr.62.1558521324679; Wed, 22 May 2019 03:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558521324; cv=none; d=google.com; s=arc-20160816; b=mTWRrwwMI4jG7icifQMoTTizsE5jEJojGMTMop7t2MaA5qp/uI+dHhFq6xQTW1Gh44 P7ZwCVhQotGtC6FGq43R13O503fNG+aJUxc/d7bJ/Kjmr0AfdmnE6J4TjNB3P9wFRHHw FBh2sfC8vBSF1E3EgfFcRgkK6VLA3DhZORmPTHRQukaFadhZKvKDMAEVAVv3xiCpdo3o P0unRS9sxGwrrhDTzSSEW4TjXmaP4krMrIZ2Rq/J6Y9dhyzk8ceRezsaUH3Y1IdnqKgV MLW3ypO5z9wwmXhLqSF1nInpfls9ZsV5cXHjdj74CNqICVMk37+T78lxXMkumcrQJrqU xbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=j2RCJ7yrNYeQbws/9vfx06izFXDUW+Uf0IRoS3lMcoE=; b=wnnozBYyJf51oUT96PaIEyrP8H/2hBVhlWeFOdfHycBi1pQRWFq+ontbNRzkYWkipH 40e/yf4zB+vaKE90KUaDvqWCwbq0ZRPoXq93oL8PZ17ovccbBZ23lKfQBieMxC8aOsjZ IRYfQSh/onCBVXBRKYrTB1AGwBtzhva1uPY7X5BHFTEzyqDCzarkYkzLXU+VC2kQAVoU Fqa+/a4t/XUqcXeAibx/bjOvE7A/kg+0bPDZLSGkDTj2muIgcYc+zs7olGll9Dr21u7B 9qL2MRdb0/frFh0oej0MWWAs8ovL6AMahSHKcb0jjyKWwkPJNOdrBIzQrhuE4Jyv46ex IjNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h68si25312309pgc.270.2019.05.22.03.35.23; Wed, 22 May 2019 03:35:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729149AbfEVKfW (ORCPT + 30 others); Wed, 22 May 2019 06:35:22 -0400 Received: from foss.arm.com ([217.140.101.70]:46948 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729035AbfEVKfU (ORCPT ); Wed, 22 May 2019 06:35:20 -0400 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 755C215BF; Wed, 22 May 2019 03:35:20 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 65BBE3F575; Wed, 22 May 2019 03:35:19 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, Suzuki K Poulose Subject: [PATCH v4 02/30] coresight: replicator: Cleanup device tracking Date: Wed, 22 May 2019 11:34:35 +0100 Message-Id: <1558521304-27469-3-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> References: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to use a consistent device naming scheme, clean up the device link tracking in replicator driver. Use the "coresight" device instead of the "real" parent device for all internal purposes. All other requests (e.g, power management, DMA operations) must use the "real" device which is the parent device. Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-replicator.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 8c9ce74..ee6ad34 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -26,13 +26,11 @@ * struct replicator_drvdata - specifics associated to a replicator component * @base: memory mapped base address for this component. Also indicates * whether this one is programmable or not. - * @dev: the device entity associated with this component * @atclk: optional clock for the core parts of the replicator. * @csdev: component vitals needed by the framework */ struct replicator_drvdata { void __iomem *base; - struct device *dev; struct clk *atclk; struct coresight_device *csdev; }; @@ -100,7 +98,7 @@ static int replicator_enable(struct coresight_device *csdev, int inport, if (drvdata->base) rc = dynamic_replicator_enable(drvdata, inport, outport); if (!rc) - dev_dbg(drvdata->dev, "REPLICATOR enabled\n"); + dev_dbg(&csdev->dev, "REPLICATOR enabled\n"); return rc; } @@ -139,7 +137,7 @@ static void replicator_disable(struct coresight_device *csdev, int inport, if (drvdata->base) dynamic_replicator_disable(drvdata, inport, outport); - dev_dbg(drvdata->dev, "REPLICATOR disabled\n"); + dev_dbg(&csdev->dev, "REPLICATOR disabled\n"); } static const struct coresight_ops_link replicator_link_ops = { @@ -196,7 +194,6 @@ static int replicator_probe(struct device *dev, struct resource *res) if (!drvdata) return -ENOMEM; - drvdata->dev = dev; drvdata->atclk = devm_clk_get(dev, "atclk"); /* optional */ if (!IS_ERR(drvdata->atclk)) { ret = clk_prepare_enable(drvdata->atclk);