Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3807479rdb; Sun, 10 Dec 2023 23:39:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMRSze4LwqhWOcubfrD00IybInjx6DTnrJfusvMtvtmInskragBgZIh1xnxoVXpNXlRWPS X-Received: by 2002:a05:6808:1918:b0:3b9:dcfa:7891 with SMTP id bf24-20020a056808191800b003b9dcfa7891mr2665700oib.0.1702280382067; Sun, 10 Dec 2023 23:39:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702280382; cv=none; d=google.com; s=arc-20160816; b=vGj0c8r1irJ6eDRiGqd55p0ScuyAoMPMfX+9UsUgWupr75bVWnsmSSN8AiJfiahSOE 4ZyiZl3lcAgQq8C94rOjkmRGm3VG5ObjM3fkjt160IkMELIrXhLDq3gVebR7TMoZMA14 tIxJi6HMOFNmpm00+tqRNEaZx+VHwuQCCHuWyMAVIZxpi1mLDqMlwauHUYcHKjlgyR/P tn+zYGs6+6t/usYtf6blKG5s2aPc3lN4JAkMKyknZ+vTJDShN4TVWy/SPdFDQWT1Vau1 sM/4opgVjtjjVqE3YPN34z/dy/+2HhAZnaaz/YI3jeu/0SKHCVaxN49t7dxinYGJklJJ XicQ== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ENQSCWmRGITv5JEwW/aqGQS80a5MNp9u3kXkzol/UrQ=; fh=bYYeCqBxkLtl1kWsk8OOCkbj3abGxVAJF1rZR07HU1c=; b=QI1BWXtkVCXkRpwua/LBwB4mhIxcsJ4FVM8Mz0GaDAgYekA0R4OnyXKRWMq+ka7XtA e8DVRtyQ9FNp+rZPvy3nk/WzEC7cEgg8rN5fRRgztx6BcHvIwE0T8IrWS5ZeTOavtCUL qVZ05kRuySm8UtSi8g4zBvakWsTSpubgGh7AuXfjSy3u+hdFrmWLgFDfEmA9/H29swD+ YNCRvKtXAqpUbO/eQJLoTG4MoTsL6TvmQhrBzS4ys6IF9mrvFPWCgcFZURlbqlsOeYJs mTDFctGTz5sDKKoHHORIwcFqrnojN2Zb9SsKMzNNulr9AqnDcYE/UTZsrEW1R5wmJQG5 AHbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 6-20020a630f46000000b00578b487825asi5588183pgp.208.2023.12.10.23.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 23:39:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 83E0E8068A04; Sun, 10 Dec 2023 23:39:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233683AbjLKHjJ (ORCPT + 99 others); Mon, 11 Dec 2023 02:39:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbjLKHjI (ORCPT ); Mon, 11 Dec 2023 02:39:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0D99DB; Sun, 10 Dec 2023 23:39:14 -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 CC7FD1007; Sun, 10 Dec 2023 23:40:00 -0800 (PST) Received: from [10.162.41.8] (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DCB9A3F762; Sun, 10 Dec 2023 23:39:10 -0800 (PST) Message-ID: <5c9371bd-9f29-408f-9419-df2209e55f7e@arm.com> Date: Mon, 11 Dec 2023 13:09:08 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 08/10] coresight: tmc: Move ACPI support from AMBA driver to platform driver Content-Language: en-US To: James Clark , 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> <22cfb197-b8bd-46c5-f3cb-ea04b95c0792@arm.com> From: Anshuman Khandual In-Reply-To: <22cfb197-b8bd-46c5-f3cb-ea04b95c0792@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 groat.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 (groat.vger.email [0.0.0.0]); Sun, 10 Dec 2023 23:39:24 -0800 (PST) On 12/8/23 21:01, James Clark wrote: > > 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. Sure, will drop the argument.