Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3894037pxb; Tue, 10 Nov 2020 02:53:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxHPLwRc70p5NZTt1DUp/RySfqUPIpLd8kW+zK4WoKHP6aXWUSKQumugJMs3e8Palm5mEa X-Received: by 2002:a17:906:3c17:: with SMTP id h23mr12446134ejg.374.1605005581109; Tue, 10 Nov 2020 02:53:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605005581; cv=none; d=google.com; s=arc-20160816; b=1Gz/akeVcXzHtubKwGOLpqDefljnRJpWGtB1lLQSRn7JY7Qg+VD8ybCRFfAjQmHkBu vui5meGrLzOGkpzkLb5Ko6bFk3+tF/c7oLL0iDSmZ3465ssSLk1p06f4awYzmXomxKpr OChTXxILQlIMx82KZ76IJV1oXpuCAKtIjXhoUENENRI4tBwzFB4GdiF2fGZSbhezBPRx ZbPYsnrHlsXzpXNOkDqc6ximpM3EDy2Mbnf5LkArVjKH/QmJg3NLzaWJWsiObzw0fO5X VPXB80Tz5C1hqxPsg8x9op6s+u1EYq8uAbUhgaWGkI8xLOSLTYA3b1KGf+WPCb67qHZ7 4Itw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DvXAV1Gg9HZuhwk8F5wY89W7YAboytEOlos+6qFztt8=; b=zWHV6WYyjsPS6sWn/kAX2NU38B9Ra/2/GCI2UX1HTBKU9QULp6B6HvtxmotWnlDwOQ 5prKbi1uEufTe8FYjYo2xv4YQCdOmo58Q/B7WGiUwE8NFuxt9+kU2hQvWM8SYsJ3+Ugo N0/9nmAlLNOMrjmjL91M1EqqG2jsJg1vJnPLdJVXLKJFlQbnDOKdZXrGzwTgbrbB3kn+ d1e3q6O6r1618T3RaC1IsgTj02ueyzf62FbMSBrpjDg0coyvFFllzHqtxfJnyfA15GcC Nb6+ZqkhQEPREOqTpbfaz9K1WDBrbwdaXxXC/eIg6fiBXEcEea3/JDX42Hb60IM4m9VS mkBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si8787183edh.40.2020.11.10.02.52.38; Tue, 10 Nov 2020 02:53:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbgKJKup (ORCPT + 99 others); Tue, 10 Nov 2020 05:50:45 -0500 Received: from foss.arm.com ([217.140.110.172]:53788 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbgKJKuo (ORCPT ); Tue, 10 Nov 2020 05:50:44 -0500 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 10A0B11D4; Tue, 10 Nov 2020 02:50:44 -0800 (PST) Received: from [10.57.23.123] (unknown [10.57.23.123]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 34C3C3F6CF; Tue, 10 Nov 2020 02:50:43 -0800 (PST) Subject: Re: [PATCH v3 25/26] coresight: etm4x: Add support for sysreg only devices To: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <20201028220945.3826358-1-suzuki.poulose@arm.com> <20201028220945.3826358-27-suzuki.poulose@arm.com> <20201109204657.GD3396611@xps15> From: Suzuki K Poulose Message-ID: <9566bf8c-3e05-7a81-d487-647a057ae4f1@arm.com> Date: Tue, 10 Nov 2020 10:50:36 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.1 MIME-Version: 1.0 In-Reply-To: <20201109204657.GD3396611@xps15> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/9/20 8:46 PM, Mathieu Poirier wrote: > On Wed, Oct 28, 2020 at 10:09:44PM +0000, Suzuki K Poulose wrote: >> Add support for devices with system instruction access only. >> They don't have a memory mapped interface and thus are not >> AMBA devices. >> >> Cc: Mathieu Poirier >> Cc: Mike Leach >> Signed-off-by: Suzuki K Poulose >> --- >> .../coresight/coresight-etm4x-core.c | 50 +++++++++++++++++-- >> 1 file changed, 45 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> index 25fab5513604..50a574228866 100644 >> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c >> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> @@ -26,6 +26,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -1623,9 +1624,6 @@ static int etm4_probe(struct device *dev, void __iomem *base) >> return -ENOMEM; >> } >> >> - if (fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) >> - drvdata->skip_power_up = true; >> - >> drvdata->base = base; >> >> spin_lock_init(&drvdata->spinlock); >> @@ -1648,6 +1646,11 @@ static int etm4_probe(struct device *dev, void __iomem *base) >> if (!drvdata->arch) >> return -EINVAL; >> >> + /* Skip programming TRCPDCR for system instructions. */ > > It would be nice to mention that TRCPDCR is not available in system instruction > mode. Sure. > >> + if (!desc.access.io_mem || >> + fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) >> + drvdata->skip_power_up = true; >> + >> etm4_init_trace_id(drvdata); >> etm4_set_default(&drvdata->config); >> >> @@ -1706,6 +1709,20 @@ static int etm4_probe_amba(struct amba_device *adev, const struct amba_id *id) >> return ret; >> } >> >> +static int etm4_probe_platform_dev(struct platform_device *pdev) >> +{ >> + int ret; >> + >> + pm_runtime_get_noresume(&pdev->dev); >> + pm_runtime_set_active(&pdev->dev); >> + pm_runtime_enable(&pdev->dev); >> + >> + ret = etm4_probe(&pdev->dev, NULL); >> + >> + pm_runtime_put(&pdev->dev); >> + return ret; >> +} >> + >> static struct amba_cs_uci_id uci_id_etm4[] = { >> { >> /* ETMv4 UCI data */ >> @@ -1781,6 +1798,20 @@ static struct amba_driver etm4x_amba_driver = { >> .id_table = etm4_ids, >> }; >> >> +static const struct of_device_id etm_sysreg_match[] = { > > s/etm_sysreg_match/etm4_sysreg_match > >> + { .compatible = "arm,coresight-etm-sysreg" }, > > See my comment in the next patch. > > With the above: > > Reviewed-by: Mathieu Poirier > Thanks Suzuki