diff mbox series

coresight: etm4x: Set skip_power_up in etm4_init_arch_data function

Message ID 20240131105423.9519-1-quic_jinlmao@quicinc.com (mailing list archive)
State New, archived
Headers show
Series coresight: etm4x: Set skip_power_up in etm4_init_arch_data function | expand

Commit Message

Mao Jinlong Jan. 31, 2024, 10:54 a.m. UTC
skip_power_up is used in etm4_init_arch_data when set lpoverride. So
need to set the value of it before calling using it.

Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
---
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Suzuki K Poulose Jan. 31, 2024, 11:07 a.m. UTC | #1
On 31/01/2024 10:54, Mao Jinlong wrote:
> skip_power_up is used in etm4_init_arch_data when set lpoverride. So
> need to set the value of it before calling using it.

Fixes:5214b563588e ("coresight: etm4x: Add support for sysreg only 
devices")

> 
> Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>

I will queue this.

Suzuki


> ---
>   drivers/hwtracing/coresight/coresight-etm4x-core.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> index c5ea808ea662..8afc07d1dd23 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> @@ -1200,6 +1200,7 @@ static void etm4_init_arch_data(void *info)
>   	struct etm4_init_arg *init_arg = info;
>   	struct etmv4_drvdata *drvdata;
>   	struct csdev_access *csa;
> +	struct device *dev = init_arg->dev;
>   	int i;
>   
>   	drvdata = dev_get_drvdata(init_arg->dev);
> @@ -1213,6 +1214,10 @@ static void etm4_init_arch_data(void *info)
>   	if (!etm4_init_csdev_access(drvdata, csa))
>   		return;
>   
> +	if (!csa->io_mem ||
> +	    fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up"))
> +		drvdata->skip_power_up = true;
> +
>   	/* Detect the support for OS Lock before we actually use it */
>   	etm_detect_os_lock(drvdata, csa);
>   
> @@ -2040,11 +2045,6 @@ static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg)
>   	if (!drvdata->arch)
>   		return -EINVAL;
>   
> -	/* TRCPDCR is not accessible with system instructions. */
> -	if (!desc.access.io_mem ||
> -	    fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up"))
> -		drvdata->skip_power_up = true;
> -
>   	major = ETM_ARCH_MAJOR_VERSION(drvdata->arch);
>   	minor = ETM_ARCH_MINOR_VERSION(drvdata->arch);
>
Suzuki K Poulose Feb. 12, 2024, 11:23 a.m. UTC | #2
On Wed, 31 Jan 2024 02:54:19 -0800, Mao Jinlong wrote:
> skip_power_up is used in etm4_init_arch_data when set lpoverride. So
> need to set the value of it before calling using it.
> 
> 

Applied, thanks!

[1/1] coresight: etm4x: Set skip_power_up in etm4_init_arch_data function
      https://git.kernel.org/coresight/c/1bbe0a247e5d

Best regards,
diff mbox series

Patch

diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index c5ea808ea662..8afc07d1dd23 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -1200,6 +1200,7 @@  static void etm4_init_arch_data(void *info)
 	struct etm4_init_arg *init_arg = info;
 	struct etmv4_drvdata *drvdata;
 	struct csdev_access *csa;
+	struct device *dev = init_arg->dev;
 	int i;
 
 	drvdata = dev_get_drvdata(init_arg->dev);
@@ -1213,6 +1214,10 @@  static void etm4_init_arch_data(void *info)
 	if (!etm4_init_csdev_access(drvdata, csa))
 		return;
 
+	if (!csa->io_mem ||
+	    fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up"))
+		drvdata->skip_power_up = true;
+
 	/* Detect the support for OS Lock before we actually use it */
 	etm_detect_os_lock(drvdata, csa);
 
@@ -2040,11 +2045,6 @@  static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg)
 	if (!drvdata->arch)
 		return -EINVAL;
 
-	/* TRCPDCR is not accessible with system instructions. */
-	if (!desc.access.io_mem ||
-	    fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up"))
-		drvdata->skip_power_up = true;
-
 	major = ETM_ARCH_MAJOR_VERSION(drvdata->arch);
 	minor = ETM_ARCH_MINOR_VERSION(drvdata->arch);