diff mbox series

[RFC,v3,24/35] include/dt-binding/interrupt-controller/sh_intc.h: renesas,sh7751-intc.h helper

Message ID 5fd6a128de04b88bb22520cffe955f83af6700b9.1697199949.git.ysato@users.sourceforge.jp (mailing list archive)
State New, archived
Headers show
Series Device Tree support for SH7751 based board | expand

Commit Message

Yoshinori Sato Oct. 14, 2023, 2:53 p.m. UTC
SH7751 Interrupt controller binding helper.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 .../dt-bindings/interrupt-controller/sh_intc.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 include/dt-bindings/interrupt-controller/sh_intc.h

Comments

Geert Uytterhoeven Oct. 18, 2023, 1:39 p.m. UTC | #1
Hi Sato-san,

On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato
<ysato@users.sourceforge.jp> wrote:
> SH7751 Interrupt controller binding helper.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Thanks for your patch!

> --- /dev/null
> +++ b/include/dt-bindings/interrupt-controller/sh_intc.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> + *
> + * SH3/4 INTC EVT - IRQ conversion
> + */
> +
> +#define evt2irq(evt)           ((evt) >> 5)
> +#define irq2evt(irq)           ((irq) << 5)

Please drop irq2evt() as it is not used, and not needed, in DTS files.

> +
> +#define IPRDEF(e, o, b)                < e o b >

Please drop this macro, it doesn't add any value.

> +#define IPRA                   0
> +#define IPRB                   4
> +#define IPRC                   8
> +#define IPRD                   12
> +#define INTPRI00               256
> +#define IPR_B12                        12
> +#define IPR_B8                 8
> +#define IPR_B4                 4
> +#define IPR_B0                 0

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
Krzysztof Kozlowski Oct. 18, 2023, 2:03 p.m. UTC | #2
On 18/10/2023 15:39, Geert Uytterhoeven wrote:
> Hi Sato-san,
> 
> On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato
> <ysato@users.sourceforge.jp> wrote:
>> SH7751 Interrupt controller binding helper.
>>
>> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> 
> Thanks for your patch!
> 
>> --- /dev/null
>> +++ b/include/dt-bindings/interrupt-controller/sh_intc.h
>> @@ -0,0 +1,18 @@
>> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> + *
>> + * SH3/4 INTC EVT - IRQ conversion
>> + */
>> +
>> +#define evt2irq(evt)           ((evt) >> 5)
>> +#define irq2evt(irq)           ((irq) << 5)
> 
> Please drop irq2evt() as it is not used, and not needed, in DTS files.

And we talked about this already... just like about few other things
which did not improve. This patchset is repeating the same issues over
and over again.

Please call it not RFC, but "DO NOT MERGE" or something like this.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/include/dt-bindings/interrupt-controller/sh_intc.h b/include/dt-bindings/interrupt-controller/sh_intc.h
new file mode 100644
index 000000000000..956259e985ea
--- /dev/null
+++ b/include/dt-bindings/interrupt-controller/sh_intc.h
@@ -0,0 +1,18 @@ 
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+ *
+ * SH3/4 INTC EVT - IRQ conversion
+ */
+
+#define evt2irq(evt)		((evt) >> 5)
+#define irq2evt(irq)		((irq) << 5)
+
+#define IPRDEF(e, o, b)		< e o b >
+#define IPRA			0
+#define IPRB			4
+#define IPRC			8
+#define IPRD			12
+#define INTPRI00		256
+#define IPR_B12			12
+#define IPR_B8			8
+#define IPR_B4			4
+#define IPR_B0			0