Re: [PATCH V3 08/10] coresight: tmc: Move ACPI support from AMBA driver to platform driver
From: Anshuman Khandual <hidden>
Date: 2023-12-11 07:39:18
Also in:
linux-acpi, lkml
On 12/8/23 21:01, James Clark wrote:
On 08/12/2023 05:39, Anshuman Khandual wrote:quoted
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 <lpieralisi@kernel.org> Cc: Sudeep Holla <redacted> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Mike Leach <redacted> Cc: James Clark <redacted> 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 <redacted> # Boot and driver probe only Acked-by: Sudeep Holla <redacted> # For ACPI related changes Signed-off-by: Anshuman Khandual <redacted> --- 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 <linux/of.h> #include <linux/coresight.h> #include <linux/amba/bus.h> +#include <linux/platform_device.h> +#include <linux/acpi.h> #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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel