[PATCH v2 01/15] dt-bindings: memory: snps: Replace opencoded numbers with macros

Serge Semin posted 15 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH v2 01/15] dt-bindings: memory: snps: Replace opencoded numbers with macros
Posted by Serge Semin 3 years, 6 months ago
Xilinx ZynqMP DDRC-based example contains the opencoded numerical literals
in the IRQ lines definition. It doesn't seem justified since the
corresponding platform has well defined ARM GIC interface. Let's replace
the numbers with the corresponding macros then.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>

---

Changelog v2:
- This is a new patch created on v2 based on the @Krzysztof' request not
  to have the opencoded numbers in the bindings example. (@Krzysztof)
---
 .../bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml b/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml
index 9212dfe6e956..fb571d3d665d 100644
--- a/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml
@@ -47,10 +47,13 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
     memory-controller@fd070000 {
       compatible = "xlnx,zynqmp-ddrc-2.40a";
       reg = <0xfd070000 0x30000>;
+
       interrupt-parent = <&gic>;
-      interrupts = <0 112 4>;
+      interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
     };
 ...
-- 
2.37.2
Re: [PATCH v2 01/15] dt-bindings: memory: snps: Replace opencoded numbers with macros
Posted by Rob Herring 3 years, 6 months ago
On Sat, Sep 10, 2022 at 10:56:45PM +0300, Serge Semin wrote:
> Xilinx ZynqMP DDRC-based example contains the opencoded numerical literals
> in the IRQ lines definition. It doesn't seem justified since the
> corresponding platform has well defined ARM GIC interface. Let's replace
> the numbers with the corresponding macros then.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> 
> ---
> 
> Changelog v2:
> - This is a new patch created on v2 based on the @Krzysztof' request not
>   to have the opencoded numbers in the bindings example. (@Krzysztof)
> ---
>  .../bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml     | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>
Re: (subset) [PATCH v2 01/15] dt-bindings: memory: snps: Replace opencoded numbers with macros
Posted by Krzysztof Kozlowski 3 years, 6 months ago
On Sat, 10 Sep 2022 22:56:45 +0300, Serge Semin wrote:
> Xilinx ZynqMP DDRC-based example contains the opencoded numerical literals
> in the IRQ lines definition. It doesn't seem justified since the
> corresponding platform has well defined ARM GIC interface. Let's replace
> the numbers with the corresponding macros then.
> 
> 

Applied, thanks!

[01/15] dt-bindings: memory: snps: Replace opencoded numbers with macros
        https://git.kernel.org/krzk/linux-mem-ctrl/c/fc436e55a1abdac503e5b06ef57862a1bc944275

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>