RE: [PATCH 2/2] serial: sh-sci: Document r7s9210 bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

On Wednesday, July 25, 2018, Geert Uytterhoeven wrote:
> > However, if "interrupt-names" is specified in DT, then the driver
> > determines what the interrupt are based on their names, not the order in
> which
> > they are listed.
> >
> > Correct?
> 
> Correct.

One final note on this before I submit v2 of the patch.

I just coded up something that works and is more simple and I don't even
need "interrupt-names".

Basically by using your suggestion from the code review made everything 
work.

On Friday, July 20, 2018, Geert Uytterhoeven wrote:
> > --- a/drivers/tty/serial/sh-sci.c
> > +++ b/drivers/tty/serial/sh-sci.c
> > @@ -65,6 +65,7 @@ enum {
> >         SCIx_RXI_IRQ,
> >         SCIx_TXI_IRQ,
> >         SCIx_BRI_IRQ,
> > +       SCIx_TEIDRI_IRQ,
> 
> Why not separate enum values for TEI and DRI? According to the RZ/A2 docs,
> there are 6 separate interrupts, but they are multiplexed at the interrupt
> controller level.


enum {
	SCIx_ERI_IRQ,
	SCIx_RXI_IRQ,
	SCIx_TXI_IRQ,
	SCIx_BRI_IRQ,
+	SCIx_DRI_IRQ,
+	SCIx_TEI_IRQ,
	SCIx_NR_IRQS,

	SCIx_MUX_IRQ = SCIx_NR_IRQS,	/* special case */
};

Listing the same interrupt ID number twice in the DT (because it is 
muxed) is fine because the driver will check for that.

This seems to satisfy all the SCI/SCIF variants in all the SH and ARM
SoCs in the kernel today (DT and non-DT).

So as long as I describe the interrupt order in the DT Documentation,
all seems good.

Chris





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux