From patchwork Tue Aug 1 09:40:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 129146 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2567864vqg; Tue, 1 Aug 2023 03:17:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7PlBeZofAjkHgjqa+d2cOg/nH8nFdeo7xmqMtYLGD+7UOhFu56OD4e7aCaFjrrCHF6mFU X-Received: by 2002:a05:6a20:8e06:b0:13c:bda3:79c3 with SMTP id y6-20020a056a208e0600b0013cbda379c3mr14014891pzj.4.1690885070387; Tue, 01 Aug 2023 03:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690885070; cv=none; d=google.com; s=arc-20160816; b=Ec1KQ7ZjE3gWQkOX2OjalSr5MrpKcSXZnMRebI+cj6WN+K8BMg22VMP0V2fXnLAhGT zhx2MrTCmKL6sKH7J9Og8SFnny+0Gnnss+WwcKuFKxcSdZwpay3FiQEzs5QGijxqPysH MoAJVNGpV31ohZolR/RxbLumLJEfHuPd82LmFa1mp++ehvy4pWoPzKHDwW0EmEA7TAze fFB0yEWOWfM4HnM1hnlrh72Xj1lzM9LkV7mc+2t5pFDTowN3Kt2XIYpIzdTTE1xAHmTc k2qctKywylBnURBYbdnzdP8ZIWdQ0uSjVAnjECnepeUIKdWD3FWNo3Tzx8TJWxaRNQJe s6Cg== 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=iwb9CBNT4/f2vEJHLhafIA+pbYuYRXfDO81UdeO66WU=; fh=I47RsEx4oWrJNqdaPKjoPx+4i7IV/wZ1HDIWc2+KU6M=; b=dtpX5vlqpIDa14nRkvnQUEcph97gWRAIii4kkUtMRaeC8uy/KfExgcPEyRShIo9CD+ 7zyzpnr6IDPB6SQ1KpD1oDcvt8tggaKyCOvLtyhf/H1zE2ypUn1fZGXdbXEfG3rOJdPt iolrgCZO5y9IYtutN+/dHsb8EVQRftpeZYYJImkY/ZYMtgVc7Ib0FvWtcbkHGBd4ZbSq JL/UjhAqYHPvszWcFG/3ach/3zmnfQYQKxf5qDG11DD3bWWf+BAo3q3BUuFe8LXy8WTC BGTvIsa8on/6HdYmPCx9+N/ZMyj40hLw3oOQxHrBqgKsVwy+Mnhtnu1AnsY9mlk4yJU8 h6vw== 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 x62-20020a636341000000b0055336060fa0si8534082pgb.378.2023.08.01.03.17.37; Tue, 01 Aug 2023 03:17:50 -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 S233455AbjHAJoI (ORCPT + 99 others); Tue, 1 Aug 2023 05:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233408AbjHAJno (ORCPT ); Tue, 1 Aug 2023 05:43:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 437E56192 for ; Tue, 1 Aug 2023 02:41:24 -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 5B0551650; Tue, 1 Aug 2023 02:42:04 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.53.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 454B63F5A1; Tue, 1 Aug 2023 02:41:16 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Mike Leach , Leo Yan , Alexander Shishkin , coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 4/4] coresight: trbe: Enable ACPI based TRBE devices Date: Tue, 1 Aug 2023 15:10:52 +0530 Message-Id: <20230801094052.750416-5-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230801094052.750416-1-anshuman.khandual@arm.com> References: <20230801094052.750416-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,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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773021503994860016 X-GMAIL-MSGID: 1773021503994860016 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 | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index e1d9d06e7725..f884883e9018 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1537,7 +1537,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 = 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..94e67009848a 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include