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 Thursday, July 19, 2018, Geert Uytterhoeven wrote:
> > The issue that I ran into was the device driver assumed some signals
> > were muxed together (TXI and DRI), and that other signals were
> individual.
> >
> > The existing driver wanted interrupts to be specified in this order:
> >   1. Error
> >   2. RX
> >   3. TX (assumes DRI)
> >   4. Break

First, sorry for my mis-type.
DRI mean 'Data Ready Interrupt' and for SCIF it is normally muxed with RX (not TX).


> > Of course I have no problem documenting all this, but I first I just
> > wanted to make sure I was not going to get push back when I submit a DT
> > later that lists the same interrupt twice.
> 
> Listing them twice does make sense to me, as the interrupt controller
> source list in the RZ/A2 docs has only four, and explicitly lists how they
> are
> multiplexed:
>   base + 0 = ERI/BRI,
>   base + 1 = RXI,
>   base + 2 = TXI,
>   base + 3 = TEI/DRI.
> But future SoCS with the same SCIFA variant may wire them differently?

This SCIF seems to be related to ones used in H8S devices. It's also been
used in RX and RZ/T devices. So I think the order seems to be stable.


> For DT backwards compatibility, we have to keep support for the following
> 2 schemes:
>   1. Single "interrupts" value, no "interrupt-names", for fully
> multiplexed
>      interrupts (SH/R-Mobile, R-Car).
>   2. Four "interrupts" values, no "interrupt-names", for ERI/RXI/TXI/TEI
>      (RZ/A1, H8/300).
> 
> For RZ/A2, I suggest extending the bindings with interrupt-names,
> documenting all 6 interrupt sources, and let the driver handle that.
> That means there should be 6, not 5, "interrupts" values.
> Whether the driver implements all possible combinations, or only what you
> need for RZ/A2, is up to you. I agree the interrupt handling in the driver
> is already sufficiently complex.
> Ideally, you would document support for RZ/A1 with interrupt-names too,
> and handle that as well.
> 
> Does this make sense?

What about this idea:
Since we can't break any old DTs, what if we just say that you simply 
list all the interrupts in DT, and the driver just registers all those 
vectors with the same ISR function (sci_mpxed_interrupt) and process 
everything the same way R-Car devices do with their single interrupt.

For this class of device, having separate interrupt vectors probably 
doesn't buy you that much extra performance.

The driver could also check to see if "interrupt-names" was specified, 
and if it was, the driver could simply use those names when registering 
the interrupts so everything shows up nicely in /proc/interrupts.

What's your thoughts on that idea?

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