From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A7E3C388F7 for ; Tue, 10 Nov 2020 10:51:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE1A3205CB for ; Tue, 10 Nov 2020 10:51:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="huFOE7OS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE1A3205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ie+/VyLD/BhmF3gtV2Qmqgui+i6MqWh8UPD8vHKuAVE=; b=huFOE7OSr3vY2ATOIylDD/Kbe agtRcgfOHrGBikGoYbAhGYNPY5jGqlmeznymAxPdWR7LC4zxeT/daVDRNUz9IlNaajDTnDDiwtEnt iSCtNLWRRjCPEp5yWckcbC4m4DjVBjQ5SmvkE45aOggmro3VnBQgj4EXDtN4vfQxB6H8qpjX6kU27 jp2JiFX25ISg2FBbQx3qBid/YC+DcsPoqV8qdk3Bp8eqzZKiHXs65VuzuL052SSKw5HFJMcpI2T4n 7uKlFce+YFsKdPfFqWzYbTcWNqlXWaq9crkmxLjEFQ+BrSSy32Xf8+DlcE0NVpi+stQSSGQ5JE3ZR +KmCgTx4w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcREe-0007O2-QE; Tue, 10 Nov 2020 10:50:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcREb-0007N9-En for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 10:50:46 +0000 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 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-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_055045_685036_393C9AB0 X-CRM114-Status: GOOD ( 24.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel