From patchwork Thu Aug 17 05:54:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 136297 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp2623000vqi; Sun, 20 Aug 2023 12:34:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbi3660mt/muAiZUaBk6S9F8xkyIO8yFCQbt53KoF2nA1tdHsYUwjJN/hqYMYBFqYSv2Os X-Received: by 2002:a05:6a20:9702:b0:137:e595:830f with SMTP id hr2-20020a056a20970200b00137e595830fmr2438172pzc.57.1692560081261; Sun, 20 Aug 2023 12:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692560081; cv=none; d=google.com; s=arc-20160816; b=Z2N378HEXEcZCRmf4vpf9UgP4O522FazwnRBIhkin0ZmIBprSQkA4Hs+xbbACA1NdX AZ7ml+rHSUofmKtbh1Q4cTaRa1Tz+QmK6YbZYuGJOHYAlNk+rCOLYP+gb+6ZouM4zGhv NGuudLOwCZUK2PWXaMj09IBzCmwx1GmcDc5b4jOFAyWhsBy0bCx3iAYNrJQuVIWpjywF cydcIKHR8xiUtRLgktHdTRh89w76uRi02zeqjgnZrgLIoAPAXsMgRoYUZ05vPw8pgbWl rnnzKb3UbqDu4LdYTi07xnTOhpOMSUbswjgMlehqewdWd2epPKyEBjOX1rQLOVO3Hpf0 /ybw== 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=R+6L5SSzXvjigRUsUVM/tANfIKHFEkX5t3ufsGtsituj1brv3UpKQGukFK3zABQoy8 BMDxk7mC13Ic6MmKrcVG3tzZZmrffwoGZ7VMCeo3f2bymO4vUTi7dlGsOkj9+qJZs+uo fIHuErFRuZugWro/EvYuqHC4qm85KJxcqvRWgnDModFHgVQxZqa1Xqs7fy2f19WG+475 lGcizhuRkrfdzN/fmWNSh9a7DQkWENRTI0kBZ/FWjXTe8jK75fewnVf890Ugp1e6v5hi FrBWEGOJ2J8hias15Yz3H4hCz/Re67dj1Nkbj489CvVmXv3F5m/sWN8PzRTxX67uxY5H vlvQ== 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id je7-20020a170903264700b001b86ddfd49bsi5361182plb.6.2023.08.20.12.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Aug 2023 12:34:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 48101372160; Sat, 19 Aug 2023 12:09:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348162AbjHQFzA (ORCPT + 99 others); Thu, 17 Aug 2023 01:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348138AbjHQFys (ORCPT ); Thu, 17 Aug 2023 01:54:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E507D211E for ; Wed, 16 Aug 2023 22:54:46 -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 88808D75; Wed, 16 Aug 2023 22:55:27 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.56.113]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3ADCA3F762; Wed, 16 Aug 2023 22:54:40 -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 V5 4/4] coresight: trbe: Enable ACPI based TRBE devices Date: Thu, 17 Aug 2023 11:24:05 +0530 Message-Id: <20230817055405.249630-5-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230817055405.249630-1-anshuman.khandual@arm.com> References: <20230817055405.249630-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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: 1774777879820474225 X-GMAIL-MSGID: 1774777879820474225 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