2024-02-18 09:43:59

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v3 0/2] coresight: tpdm: Change qcom,dsb-element-size to qcom,dsb-elem-bits

As unit of dsb element size is bit, change qcom,dsb-element-size to
qcom,dsb-elem-bits. And CMB uses -bits suffix as well. There is no
TPDM node in any DT now. Make such change before any TPDM node is added
to DT.

Change since V2:
1. Use fwnode_property_read_u32 to read the proprety value.

Change since V1:
1. Update the commit message for dt-binding.
2. Fix the dt_binding_check error for dt-binding change.

Mao Jinlong (2):
dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size
coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits

.../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 5 ++---
drivers/hwtracing/coresight/coresight-tpda.c | 4 ++--
drivers/hwtracing/coresight/coresight-tpda.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)

--
2.41.0



2024-02-18 09:44:14

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v3 2/2] coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits

Change qcom,dsb-element-size to qcom,dsb-elem-bits as the unit is bit.
When use "-bits" suffix, the type of the property is u32 from
property-units.yaml, so use fwnode_property_read_u32 to read the
property.

Fixes: 57e7235aa1d1 ("coresight-tpda: Add DSB dataset support")
Signed-off-by: Mao Jinlong <[email protected]>
---
drivers/hwtracing/coresight/coresight-tpda.c | 4 ++--
drivers/hwtracing/coresight/coresight-tpda.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
index 6863afe7ca94..7739bc7adc44 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.c
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -69,8 +69,8 @@ static int tpdm_read_element_size(struct tpda_drvdata *drvdata,
struct tpdm_drvdata *tpdm_data = dev_get_drvdata(csdev->dev.parent);

if (tpdm_has_dsb_dataset(tpdm_data)) {
- rc = fwnode_property_read_u8(dev_fwnode(csdev->dev.parent),
- "qcom,dsb-element-size", &drvdata->dsb_esize);
+ rc = fwnode_property_read_u32(dev_fwnode(csdev->dev.parent),
+ "qcom,dsb-element-bits", &drvdata->dsb_esize);
}
if (tpdm_has_cmb_dataset(tpdm_data)) {
rc = fwnode_property_read_u32(dev_fwnode(csdev->dev.parent),
diff --git a/drivers/hwtracing/coresight/coresight-tpda.h b/drivers/hwtracing/coresight/coresight-tpda.h
index 19af64120fcf..c6af3d2da3ef 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.h
+++ b/drivers/hwtracing/coresight/coresight-tpda.h
@@ -36,7 +36,7 @@ struct tpda_drvdata {
struct coresight_device *csdev;
spinlock_t spinlock;
u8 atid;
- u8 dsb_esize;
+ u32 dsb_esize;
u32 cmb_esize;
};

--
2.41.0


2024-02-18 09:44:28

by Mao Jinlong

[permalink] [raw]
Subject: [PATCH v3 1/2] dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size

Change qcom,dsb-element-size to qcom,dsb-element-bits as the unit is
bit. There is no tpdm node in any DT as of now. Make this change before
any tpdm node is added to DT.

Fixes: 2a8d9b371566 ("dt-bindings: arm: Add support for DSB element size")
Signed-off-by: Mao Jinlong <[email protected]>
---
.../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
index d0647ffaed71..8eec07d9d454 100644
--- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
@@ -44,12 +44,11 @@ properties:
minItems: 1
maxItems: 2

- qcom,dsb-element-size:
+ qcom,dsb-element-bits:
description:
Specifies the DSB(Discrete Single Bit) element size supported by
the monitor. The associated aggregator will read this size before it
is enabled. DSB element size currently only supports 32-bit and 64-bit.
- $ref: /schemas/types.yaml#/definitions/uint8
enum: [32, 64]

qcom,cmb-element-bits:
@@ -111,7 +110,7 @@ examples:
compatible = "qcom,coresight-tpdm", "arm,primecell";
reg = <0x0684c000 0x1000>;

- qcom,dsb-element-size = /bits/ 8 <32>;
+ qcom,dsb-element-bits = <32>;
qcom,dsb-msrs-num = <16>;

clocks = <&aoss_qmp>;
--
2.41.0


2024-02-19 08:14:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size

On 18/02/2024 10:43, Mao Jinlong wrote:
> Change qcom,dsb-element-size to qcom,dsb-element-bits as the unit is
> bit. There is no tpdm node in any DT as of now. Make this change before

You should say why. "What" we see from the diff. I keep repeating this
like a broken record...

This applies to all your patches. Future as well.

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-02-27 11:59:56

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] coresight: tpdm: Change qcom,dsb-element-size to qcom,dsb-elem-bits

On Sun, 18 Feb 2024 01:43:18 -0800, Mao Jinlong wrote:
> As unit of dsb element size is bit, change qcom,dsb-element-size to
> qcom,dsb-elem-bits. And CMB uses -bits suffix as well. There is no
> TPDM node in any DT now. Make such change before any TPDM node is added
> to DT.
>
> Change since V2:
> 1. Use fwnode_property_read_u32 to read the proprety value.
>
> [...]

Hi

I have applied the set with slight modification to the commit description as
suggested by Krzysztof for Patch 1.


[1/2] dt-bindings: arm: qcom,coresight-tpdm: Rename qcom,dsb-element-size
https://git.kernel.org/coresight/c/7f6860e85606
[2/2] coresight-tpda: Change qcom,dsb-element-size to qcom,dsb-elem-bits
https://git.kernel.org/coresight/c/a4f3057d19ff

Best regards,
--
Suzuki K Poulose <[email protected]>