From patchwork Tue May 7 10:52:29 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: 163485 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp1183740ilm; Tue, 7 May 2019 03:53:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzopuvQTmp5uZ/QKmrGCdbA0Pt3yR17fcAKWU83La9uoqs2+77E2Zbto7l9jiAxnqCEEPsu X-Received: by 2002:a65:478a:: with SMTP id e10mr39093203pgs.310.1557226428124; Tue, 07 May 2019 03:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557226428; cv=none; d=google.com; s=arc-20160816; b=Kl77WFDTWuM2doB/uFA3laIm0Q5NpVzC5PdOEg6rxt4pWyj+L6RWjksaHrY9p+CSo4 0gdmJpDZ8Zmalit5doHmMQWBc8KQ203nc1k1Oa5cW+luH4WrNWebkjFC4O0cOl23tqiD udO+iOhvsjc/BzBftqhLIgdVmTSSW3SabbewzK47+eMF3A/d7rLSczrU6L2ppGsl9Air clAR1YzuvBCecENDHFOQVpp0g9I+iJy9OfeqHIn8iJfTHVwEV19eZN/3vjpfHjZBX31I BxSUDJnxdO+mmGmtsAxBr1KFzfyV0ycedY7pP1iWEl6UqcPaT2PQVHOxgTiMpAFI1kpD CRRQ== 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=KZ6EL07l9YRgDG9dc5SZZfT4WwugRNgL4zoo0kQzBTBWxhcUAcZN09Hiqz3Uj6oI+E tRabT16e1NTel6drazmbBbSNB27x9EHa8H/yQd4ZeRUUhvewUI9RqodjOkCiqlFlMFyO xiJ/XxvDqZCHc010CwmjD1cHvYZE9uWp3EaW5ceI647e0vo6F0O7/OrAKIFpnE7CLXhB hZsQknj5RQZhd5b81UvEifXnU2hEO4vlxUCkaSKmYxwriMcfYksaR9EHIY11NrgF2xjU /YIGO0PH/DF4iVqyPmRl+5WHYrQUaTouzfv+RDsrs8y/G2Mst0HCLSPtc0zOTV8sm/ZW /NTQ== 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 m79si18939528pfi.81.2019.05.07.03.53.47; Tue, 07 May 2019 03:53:48 -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 S1726860AbfEGKxq (ORCPT + 30 others); Tue, 7 May 2019 06:53:46 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50044 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfEGKxo (ORCPT ); Tue, 7 May 2019 06:53:44 -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 B0995374; Tue, 7 May 2019 03:53:43 -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 7D0A63F5AF; Tue, 7 May 2019 03:53:42 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, rjw@rjwysocki.net, mathieu.poirier@linaro.org, Suzuki K Poulose Subject: [PATCH v3 02/30] coresight: replicator: Cleanup device tracking Date: Tue, 7 May 2019 11:52:29 +0100 Message-Id: <1557226378-10131-3-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557226378-10131-1-git-send-email-suzuki.poulose@arm.com> References: <1557226378-10131-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);