Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2414992rdb; Fri, 8 Dec 2023 07:31:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaLwBr/kn2iXxLFHh3nkYv9zQynMGNMhnep3qmT68MGgAiPOTENT9aOmzhgo+3rDUcFxWc X-Received: by 2002:a17:903:245:b0:1d0:c1fe:694c with SMTP id j5-20020a170903024500b001d0c1fe694cmr252270plh.47.1702049507041; Fri, 08 Dec 2023 07:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702049507; cv=none; d=google.com; s=arc-20160816; b=U6tQlJfHdPbK48/Jdrl0qHUduX/m6Z3WyMw+QOnjsCi4eLhLQK956Lh8vDbFXuwr68 yotLdQRAETYef8wuxfmjqSdrapnRjAx6sak1Bb0QJ55uoYjd992VP3G/vnUwL8Tkl2RP i9E4cNvHioAquBEqu4+Qy61gU0cpy4fi153ZdqPfWoeHfU8dGu2PDZ0uw+n1wlHUbVuW lyEb0QjsWGAmZPMxryiI3RPlYEwFn2/icwF4aIWYQL7sLCutX4Xdgsc3Y8uhxPnJJkJT bCOtPVzVw60DNEJjcij+DPSJPnFG1spFLwzkguYRwJfVtL6nEwg5CTrdFYKv2ttziMNI lnfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=ypRGsHfxGByMsYLK+0TI38j752+JsixdtGhjGy7Wt34=; fh=DNJVuSSgB2G6amXbP+7fIejaD/RGwDj3qwwUFzEyOr4=; b=RpoKvA7RmLXvobp9WqkguzdhhnEukOv82LuhtW9zMmot33bC30zK3u6RUwuGNDXXpH 9P158VDkRvNLkwaHazdy19QVWNRynvVgNWTrl/MJnOKtFB4g0hEF+72BJXzaWGPkAzke 3+QX1iI+pPPGORJZZ4Mile0IiTjKthnLEVWMNtoIW/n60UBfzrIIZh/R1uJMmi83clfm bW9Yk37t6yICldfTKdmijDCjFRwV05p1mEGNP/Oatpluq9lujMuy9H4G2TcvEn52I3pt Ud80Hev5ItX0WqTjLVepO4XgzL/Rzd/Ve7MW2Phr7E7nWMnOzi4uSrhGYSzwv6iaPX7p 6W+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s10-20020a632c0a000000b005c663502394si1667856pgs.609.2023.12.08.07.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 07:31:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 90CC381CFF3B; Fri, 8 Dec 2023 07:31:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233552AbjLHPbb (ORCPT + 99 others); Fri, 8 Dec 2023 10:31:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233549AbjLHPba (ORCPT ); Fri, 8 Dec 2023 10:31:30 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 493E41732; Fri, 8 Dec 2023 07:31:36 -0800 (PST) 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 6CE9D106F; Fri, 8 Dec 2023 07:32:21 -0800 (PST) Received: from [192.168.1.3] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 527983F6C4; Fri, 8 Dec 2023 07:31:34 -0800 (PST) Message-ID: <22cfb197-b8bd-46c5-f3cb-ea04b95c0792@arm.com> Date: Fri, 8 Dec 2023 15:31:32 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V3 08/10] coresight: tmc: Move ACPI support from AMBA driver to platform driver To: Anshuman Khandual , linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Lorenzo Pieralisi , Sudeep Holla , Mike Leach , Maxime Coquelin , Alexandre Torgue , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com References: <20231208053939.42901-1-anshuman.khandual@arm.com> <20231208053939.42901-9-anshuman.khandual@arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20231208053939.42901-9-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 07:31:44 -0800 (PST) On 08/12/2023 05:39, Anshuman Khandual wrote: > Add support for the tmc devices in the platform driver, which can then be > used on ACPI based platforms. This change would now allow runtime power > management for ACPI based systems. The driver would try to enable the APB > clock if available. > > Cc: Lorenzo Pieralisi > Cc: Sudeep Holla > Cc: Suzuki K Poulose > Cc: Mike Leach > Cc: James Clark > Cc: linux-acpi@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Cc: coresight@lists.linaro.org > Tested-by: Sudeep Holla # Boot and driver probe only > Acked-by: Sudeep Holla # For ACPI related changes > Signed-off-by: Anshuman Khandual > --- > Changes in V3: > > - Added commnets for 'drvdata->pclk' > - Used coresight_init_driver()/coresight_remove_driver() helpers instead > - Dropped pm_runtime_put() from __tmc_probe() > - Added pm_runtime_put() on success path in tmc_probe() > - Added pm_runtime_put() on success/error paths in tmc_platform_probe() > - Check for drvdata instead of drvdata->pclk in suspend and resume paths > > drivers/acpi/arm64/amba.c | 2 - > .../hwtracing/coresight/coresight-tmc-core.c | 137 ++++++++++++++++-- > drivers/hwtracing/coresight/coresight-tmc.h | 2 + > 3 files changed, 124 insertions(+), 17 deletions(-) > > diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c > index 6d24a8f7914b..d3c1defa7bc8 100644 > --- a/drivers/acpi/arm64/amba.c > +++ b/drivers/acpi/arm64/amba.c > @@ -22,10 +22,8 @@ > static const struct acpi_device_id amba_id_list[] = { > {"ARMH0061", 0}, /* PL061 GPIO Device */ > {"ARMH0330", 0}, /* ARM DMA Controller DMA-330 */ > - {"ARMHC501", 0}, /* ARM CoreSight ETR */ > {"ARMHC502", 0}, /* ARM CoreSight STM */ > {"ARMHC503", 0}, /* ARM CoreSight Debug */ > - {"ARMHC97C", 0}, /* ARM CoreSight SoC-400 TMC, SoC-600 ETF/ETB */ > {"", 0}, > }; > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c > index ad61d02f5f75..8482830d73ef 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-core.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c > @@ -23,6 +23,8 @@ > #include > #include > #include > +#include > +#include > > #include "coresight-priv.h" > #include "coresight-tmc.h" > @@ -437,24 +439,17 @@ static u32 tmc_etr_get_max_burst_size(struct device *dev) > return burst_size; > } > > -static int tmc_probe(struct amba_device *adev, const struct amba_id *id) > +static int __tmc_probe(struct device *dev, struct resource *res, void *dev_caps) I don't think the dev_caps argument is used anymore since the v3 changes.