Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2134331rdb; Thu, 7 Dec 2023 21:40:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVWc/KJXCJRhFjfYKThd1LdDt1MdgB0LxFsC2Mx4MNRLX7E+j6T7gXzWNgjcqQAUif6vRU X-Received: by 2002:a17:902:ab57:b0:1d1:e0b6:1acc with SMTP id ij23-20020a170902ab5700b001d1e0b61accmr2261831plb.5.1702014001134; Thu, 07 Dec 2023 21:40:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702014001; cv=none; d=google.com; s=arc-20160816; b=AXFpK1mddUBBHVHc2z/ha4GMVO9MIrPcrsoB3BsJI41vwO8T+gLkCdlDXqYmLXelh0 D8LaBP+ng8X4Sj+f3oSlsTgHprQfcSpSqed8PoR1CVdUn/1efl3lNLJkJLKn5ADVL7Yc p/8u6TZKT0OP9gUmxgNv2skt01ttcWPOX6DMGNZz5tNUK0apqKBGtw24VsaZyeu9JAv6 TpS6oAmR8vSmvuLwhQbOgMJi+LrzQyjBDScxtKTb1awW0EuHAW8blq3ggI1CO1rBIpMh xSuIJDdwF97uLbk+57fuNvz7cj7Qw+a6Yric6+03X2nlOgR2mpjrpwWKZ3ltcT2SBONH SsFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Fd3MaJQujdcrOWa8yLJZEXm5DxB45t9I786ySpNbyz8=; fh=78ZiYAsMqkMiOIWlhjjSgWn2SS9khyeUqw/r/4rUn1M=; b=PrI/oIQ46adodvZUr8S4e14HC0Y93CS84GBViPKPO8PFAAIYDSusokna8BQ911D2Ws 3o6XlBYxLCux8FQcGLA8GxyILP42nXLysvI04kC6UPMWEkmjwot1hFrk5VSNdU3vP+xP cf6l5Sp3SvePAB4Xvbq3wrBjs3sNKgoLt6OiuFvSqiJ0Bf6VJZvDpqK57qloxux36IUd mPRZ46WDJH2NS+idAHkG3pWUsa9JWMZOzWYtwdCoZYgL2I4obLzQGvCx6V7mN78UFuwS XCgBTN8V43gD3ApTXOLojv2cOnQkAr6HLua41MjG6ruqnpjPlnTNfOTPTkvP5ZeQewzQ RmZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t18-20020a170902e85200b001cfff65b7d7si1015227plg.256.2023.12.07.21.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 21:40:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 0CDB780E06B6; Thu, 7 Dec 2023 21:40:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229476AbjLHFjs (ORCPT + 99 others); Fri, 8 Dec 2023 00:39:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233083AbjLHFjr (ORCPT ); Fri, 8 Dec 2023 00:39:47 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9240C171C; Thu, 7 Dec 2023 21:39:52 -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 8DEC611FB; Thu, 7 Dec 2023 21:40:37 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C8C813F5A1; Thu, 7 Dec 2023 21:39:47 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Lorenzo Pieralisi , Sudeep Holla , Mike Leach , James Clark , 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 Subject: [PATCH V3 00/10] coresight: Move remaining AMBA ACPI devices into platform driver Date: Fri, 8 Dec 2023 11:09:29 +0530 Message-Id: <20231208053939.42901-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 21:40:00 -0800 (PST) This moves remaining AMBA ACPI devices into respective platform drivers for enabling ACPI based power management support. This series applies on latest coresight/next branch. This series has been built, and boot tested on a DT based coresight platform. Although this still requires some more testing on ACPI based coresight platforms. https://git.gitlab.arm.com/linux-arm/linux-anshuman.git (amba_other_acpi_migration_v3) Cc: Lorenzo Pieralisi Cc: Sudeep Holla Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-stm32@st-md-mailman.stormreply.com Changes in V3: - Split coresight_init_driver/remove_driver() helpers into a separate patch - Added 'drvdata->pclk' comments in replicator, funnel, tpiu, tmc, and stm devices - Updated funnel, and replicator drivers to use these new helpers - Check for drvdata instead of drvdata->pclk in suspend and resume paths in catu, tmc and debug devices - Added patch to extract device name from AMBA pid based table lookup for stm - Added patch to extract device properties from AMBA pid based table look for tmc - Dropped pm_runtime_put() from common __probe() functions - Handled pm_runtime_put() in AMBA driver in success path - Handled pm_runtime_put() in platform driver in both success and error paths Changes in V2: https://lore.kernel.org/all/20231201062053.1268492-1-anshuman.khandual@arm.com/ - Dropped redundant devm_ioremap_resource() hunk from tmc_platform_probe() - Defined coresight_[init|remove]_driver() for both AMBA/platform drivers - Changed catu, tmc, tpiu, stm and debug coresight drivers to use the new helpers avoiding build issues arising from module_amba_driver(), and module_platform_driver() being on the same file Changes in V1: https://lore.kernel.org/all/20231027072943.3418997-1-anshuman.khandual@arm.com/ - Replaced all IS_ERR() instances with IS_ERR_OR_NULL() as per Suzuki Changes in RFC: https://lore.kernel.org/all/20230921042040.1334641-1-anshuman.khandual@arm.com/ Anshuman Khandual (10): coresight: stm: Extract device name from AMBA pid based table lookup coresight: tmc: Extract device properties from AMBA pid based table lookup coresight: Add helpers registering/removing both AMBA and platform drivers coresight: replicator: Move ACPI support from AMBA driver to platform driver coresight: funnel: Move ACPI support from AMBA driver to platform driver coresight: catu: Move ACPI support from AMBA driver to platform driver coresight: tpiu: Move ACPI support from AMBA driver to platform driver coresight: tmc: Move ACPI support from AMBA driver to platform driver coresight: stm: Move ACPI support from AMBA driver to platform driver coresight: debug: Move ACPI support from AMBA driver to platform driver drivers/acpi/arm64/amba.c | 8 - drivers/hwtracing/coresight/coresight-catu.c | 140 +++++++++++++--- drivers/hwtracing/coresight/coresight-catu.h | 1 + drivers/hwtracing/coresight/coresight-core.c | 29 ++++ .../hwtracing/coresight/coresight-cpu-debug.c | 141 ++++++++++++++-- .../hwtracing/coresight/coresight-funnel.c | 87 +++++----- drivers/hwtracing/coresight/coresight-priv.h | 10 ++ .../coresight/coresight-replicator.c | 81 ++++----- drivers/hwtracing/coresight/coresight-stm.c | 115 +++++++++++-- .../hwtracing/coresight/coresight-tmc-core.c | 156 +++++++++++++++--- drivers/hwtracing/coresight/coresight-tmc.h | 2 + drivers/hwtracing/coresight/coresight-tpiu.c | 99 +++++++++-- include/linux/coresight.h | 7 + 13 files changed, 713 insertions(+), 163 deletions(-) -- 2.25.1