From patchwork Tue Aug 8 08:22:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 132856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2378112vqr; Tue, 8 Aug 2023 13:30:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcwG9uCib1lHKdO3vczzJEr+qDo4QHhalmHvtsU8rQsJC7RQUgX5nWUuEoKQk+1jXTgIDR X-Received: by 2002:a05:6a20:f3aa:b0:140:7b6a:68fe with SMTP id qr42-20020a056a20f3aa00b001407b6a68femr588430pzb.35.1691526646268; Tue, 08 Aug 2023 13:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691526646; cv=none; d=google.com; s=arc-20160816; b=F3nlmXy89imR8T9f9NIzoALPxDbi02iPZfF6RI9hmH9+vkG+zrAkEFx+mPo759WkDg gif149T4GGZrg7cCU2lBezryCnFC/WodyMC+yGxq3Pc3MrpEE+QzBP+YK8u/YrYnyeff hdgd2ggT0oxJWp7D2/hIw8YGPpwoHmAwAP7Hg1ht/KxmjvidgX5yRvAdBOS/3RLMU63R ZtyKeIzbdv+l47UzuK67xNbqaorVE1cYInGMb2JZxrSU6D+bD8AG/DC2lDn6KIwa0Iln OUPNKXE6Uj52GOVYClA2vbaLg9JqYH2J4RdpaG44V3DzetM1P0sFty1aiU4OoNd1M1L1 k25g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4UhGJvisDVMQMCZv8SkHZ/CXNnJ+ricqwiek4ORpzZ8=; fh=Amix3fM17tr65VI1fISDYxtFdk/MRmRQCaXTbLjGJHs=; b=qy7kLmFOZ9HARC4a5KdCbwkaU25VpvyYobDJ79STM9ZEUU91CdnNLowYmb7vfgB/gX msizTow/5x3AGpnBZkLky1fa3+TSHh0W97cZN/dRCo8sE1Yxh0rkeFTc40iArJiNo9Sh vzMH07LQt8A7I4L/zD7/2xbbTqhbM25sfJqhgHjn9quwnoiIV0QzH+vX9pyKPo3ia/OI pLYCV7xCbZRig5QpzJzD7NKqVkrPNVJtM8d5rpaozQtdG2mJYFb02iWIXcDMFhp1F9hz dL5HQ54nES/RSIbMQyBSNqEyaCX7W9LzTbVcrjb5UqEVPjYpJEmhsNJYFWBP1LwxTDTH S9xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kf15-20020a17090305cf00b001b8698149f2si7646852plb.588.2023.08.08.13.30.31; Tue, 08 Aug 2023 13:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235964AbjHHTS5 (ORCPT + 99 others); Tue, 8 Aug 2023 15:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235971AbjHHTSW (ORCPT ); Tue, 8 Aug 2023 15:18:22 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F2FF15B9E for ; Tue, 8 Aug 2023 09:41:10 -0700 (PDT) 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 CDA3B14BF; Tue, 8 Aug 2023 01:24:00 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.40.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E78953F64C; Tue, 8 Aug 2023 01:23:13 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: yangyicong@huawei.com, Anshuman Khandual , Sami Mujawar , Catalin Marinas , Will Deacon , Mark Rutland , Mike Leach , Leo Yan , Alexander Shishkin , James Clark , coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 4/4] coresight: trbe: Enable ACPI based TRBE devices Date: Tue, 8 Aug 2023 13:52:47 +0530 Message-Id: <20230808082247.383405-5-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230808082247.383405-1-anshuman.khandual@arm.com> References: <20230808082247.383405-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773694244117587440 X-GMAIL-MSGID: 1773694244117587440 This detects and enables ACPI based TRBE devices via the dummy platform device created earlier for this purpose. Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-trbe.c | 9 +++++++++ drivers/hwtracing/coresight/coresight-trbe.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 9455d62ca620..9c59e2652b20 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1548,7 +1548,16 @@ static const struct of_device_id arm_trbe_of_match[] = { }; MODULE_DEVICE_TABLE(of, arm_trbe_of_match); +#ifdef CONFIG_ACPI +static const struct platform_device_id arm_trbe_acpi_match[] = { + { ARMV8_TRBE_PDEV_NAME, 0 }, + { } +}; +MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); +#endif + static struct platform_driver arm_trbe_driver = { + .id_table = ACPI_PTR(arm_trbe_acpi_match), .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_trbe_of_match), diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 77cbb5c63878..fce1735d5c58 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -7,11 +7,13 @@ * * Author: Anshuman Khandual */ +#include #include #include #include #include #include +#include #include #include