Message ID | 0419b2865c87f72adeb4edee9113a959e468b4a5.1641289490.git.zong.li@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Determine number of DMA channels by 'dma-channels' property | expand |
Hi Zong, On Wed, Jan 5, 2022 at 6:44 AM Zong Li <zong.li@sifive.com> wrote: > Add dma-channels property, then we can determine how many channels there > by device tree, rather than statically defines it in PDMA driver > > Signed-off-by: Zong Li <zong.li@sifive.com> Thanks for your patch! > --- a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml > +++ b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml > @@ -34,12 +34,17 @@ properties: > minItems: 1 > maxItems: 8 > > + dma-channels: > + minimum: 1 > + maximum: 4 As per my comment on [PATCH 3/3], perhaps you want to use a default value of 4, and document that here, too? > + > '#dma-cells': > const: 1 > > required: > - compatible > - reg > + - dma-channels > - interrupts > - '#dma-cells' > Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On Mon, Jan 10, 2022 at 5:00 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Zong, > > On Wed, Jan 5, 2022 at 6:44 AM Zong Li <zong.li@sifive.com> wrote: > > Add dma-channels property, then we can determine how many channels there > > by device tree, rather than statically defines it in PDMA driver > > > > Signed-off-by: Zong Li <zong.li@sifive.com> > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml > > +++ b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml > > @@ -34,12 +34,17 @@ properties: > > minItems: 1 > > maxItems: 8 > > > > + dma-channels: > > + minimum: 1 > > + maximum: 4 > > As per my comment on [PATCH 3/3], perhaps you want to use a default > value of 4, and document that here, too? > Thanks for your reminder, it should be modified as well. I would change it and add a description in the next version. > > + > > '#dma-cells': > > const: 1 > > > > required: > > - compatible > > - reg > > + - dma-channels > > - interrupts > > - '#dma-cells' > > > > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
diff --git a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml index d32a71b975fe..256bcb111d57 100644 --- a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml +++ b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml @@ -34,12 +34,17 @@ properties: minItems: 1 maxItems: 8 + dma-channels: + minimum: 1 + maximum: 4 + '#dma-cells': const: 1 required: - compatible - reg + - dma-channels - interrupts - '#dma-cells' @@ -50,6 +55,7 @@ examples: dma@3000000 { compatible = "sifive,fu540-c000-pdma"; reg = <0x3000000 0x8000>; + dma-channels = <4>; interrupts = <23 24 25 26 27 28 29 30>; #dma-cells = <1>; };
Add dma-channels property, then we can determine how many channels there by device tree, rather than statically defines it in PDMA driver Signed-off-by: Zong Li <zong.li@sifive.com> --- .../devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml | 6 ++++++ 1 file changed, 6 insertions(+)