All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Chris Brandt <Chris.Brandt@renesas.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Simon Horman <horms+renesas@verge.net.au>
Subject: Re: [PATCH 2/2] serial: sh-sci: Document r7s9210 bindings
Date: Fri, 20 Jul 2018 10:16:51 +0200	[thread overview]
Message-ID: <CAMuHMdWwZsQ2sovgYpeCsHBs=KYTm0AO3tOf4VKeZCXz+OXQAA@mail.gmail.com> (raw)
In-Reply-To: <TY1PR01MB156281CF1C2EF61F9823BBA58A520@TY1PR01MB1562.jpnprd01.prod.outlook.com>

Hi Chris,

On Thu, Jul 19, 2018 at 2:59 PM Chris Brandt <Chris.Brandt@renesas.com> wrote:
> 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).

OK.

> > > 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?

I don't know if using the same handler for all separate interrupts won't cause
problems. What if two interrupts fire, the first one calls the common handler,
handles both, and the second one returns IRQ_NONE? Spurious interrupts
detected by the core interrupt, leading to "Disabling IRQ #n" once it has seen
too many of them?

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

  reply	other threads:[~2018-07-20  8:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 14:41 [PATCH 0/2] serial: sh-sci: Add support for RZ/A2 Chris Brandt
2018-07-11 14:41 ` [PATCH 1/2] serial: sh-sci: Add support for R7S9210 Chris Brandt
2018-07-20  8:09   ` Geert Uytterhoeven
2018-07-11 14:41 ` [PATCH 2/2] serial: sh-sci: Document r7s9210 bindings Chris Brandt
2018-07-13 15:50   ` Geert Uytterhoeven
2018-07-17  8:35     ` Geert Uytterhoeven
2018-07-17 13:43       ` Chris Brandt
2018-07-17 13:43         ` Chris Brandt
2018-07-18 22:19       ` Chris Brandt
2018-07-18 22:19         ` Chris Brandt
2018-07-19  8:13         ` Geert Uytterhoeven
2018-07-19 12:58           ` Chris Brandt
2018-07-19 12:58             ` Chris Brandt
2018-07-20  8:16             ` Geert Uytterhoeven [this message]
2018-07-25  1:37           ` Chris Brandt
2018-07-25  1:37             ` Chris Brandt
2018-07-25  7:06             ` Geert Uytterhoeven
2018-07-25 12:04               ` Chris Brandt
2018-07-25 12:04                 ` Chris Brandt
2018-07-25 12:34                 ` Geert Uytterhoeven
2018-07-18 22:23       ` Chris Brandt
2018-07-18 22:23         ` Chris Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdWwZsQ2sovgYpeCsHBs=KYTm0AO3tOf4VKeZCXz+OXQAA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=Chris.Brandt@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.