[OpenWrt-Devel] [PATCH] ath79: reduce irq count in irq-ath79-misc.c
Dmitry Tunin
hanipouspilot at gmail.com
Wed Aug 22 18:02:23 EDT 2018
I think we need an "nr-interrupts" property. Each SoC has its own
number of interrupts. They can be handled by the same driver.
It is much better to have it explicitly set in DTS then having it
hidden in #define's in all kinds of strange places.
The property can be handled a way that if it is not set some default
maximum possible value is applied, like 32 in this case.
But we'll be able to set some number for each controller if we want it.
ср, 22 авг. 2018 г. в 15:35, Dmitry Tunin <hanipouspilot at gmail.com>:
>
> It allocates some RAM I guess.
> ср, 22 авг. 2018 г. в 15:34, Chuanhong Guo <gch981213 at gmail.com>:
> >
> > Hi!
> > Dmitry Tunin <hanipouspilot at gmail.com> 于2018年8月22日周三 下午8:31写道:
> > >
> > > We probably need to add a SoC check there. Otherwise we'll have two 32
> > > IRQ domains when using it with PCI.
> > But this doesn't matter at all :)
> > > I guess older ones have 8 IRQs and newer ones - 16. We cal leave
> > > default of 32 for unknown SoCs if there are any.
> > > ср, 22 авг. 2018 г. в 13:59, Dmitry Tunin <hanipouspilot at gmail.com>:
> > > >
> > > > Oops. I looked into newer specs. Some chips now have 16.
> > > > ср, 22 авг. 2018 г. в 13:50, Dmitry Tunin <hanipouspilot at gmail.com>:
> > > > >
> > > > > According to specs this interrupt controller has 8 IRQs (0-7).
> > > > > If we reuse it for PCI, we need even less (0-4).
> > > > > We don't need that hude domain there.
> > > > >
> > > > > Signed-off-by: Dmitry Tunin <hanipouspilot at gmail.com>
> > > > > ---
> > > > > .../0037-MIPS-ath79-irq-misc-reduce-irq-count.patch | 13 +++++++++++++
> > > > > 1 file changed, 13 insertions(+)
> > > > > create mode 100644 target/linux/ath79/patches-4.14/0037-MIPS-ath79-irq-misc-reduce-irq-count.patch
> > > > >
> > > > > diff --git a/target/linux/ath79/patches-4.14/0037-MIPS-ath79-irq-misc-reduce-irq-count.patch b/target/linux/ath79/patches-4.14/0037-MIPS-ath79-irq-misc-reduce-irq-count.patch
> > > > > new file mode 100644
> > > > > index 0000000..b9ab092
> > > > > --- /dev/null
> > > > > +++ b/target/linux/ath79/patches-4.14/0037-MIPS-ath79-irq-misc-reduce-irq-count.patch
> > > > > @@ -0,0 +1,13 @@
> > > > > +Index: linux-4.14.65/drivers/irqchip/irq-ath79-misc.c
> > > > > +===================================================================
> > > > > +--- linux-4.14.65.orig/drivers/irqchip/irq-ath79-misc.c
> > > > > ++++ linux-4.14.65/drivers/irqchip/irq-ath79-misc.c
> > > > > +@@ -21,7 +21,7 @@
> > > > > + #define AR71XX_RESET_REG_MISC_INT_STATUS 0
> > > > > + #define AR71XX_RESET_REG_MISC_INT_ENABLE 4
> > > > > +
> > > > > +-#define ATH79_MISC_IRQ_COUNT 32
> > > > > ++#define AR71XX_MISC_IRQ_COUNT 8
> > > > > +
> > > > > + static void ath79_misc_irq_handler(struct irq_desc *desc)
> > > > > + {
> > > > > --
> > > > > 2.7.4
> > > > >
> > >
> > > _______________________________________________
> > > openwrt-devel mailing list
> > > openwrt-devel at lists.openwrt.org
> > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list