On 20/06/2022 15:13, Peter Maydell wrote:
On Mon, 20 Jun 2022 at 14:22, Mark Cave-Ayland
<mark.cave-ayl...@ilande.co.uk> wrote:
On 20/06/2022 11:17, Peter Maydell wrote:
Well, I think that "unnamed GPIO out" lines should be for
actual GPIO lines, ie on a GPIO controller or similar.
If you want an outbound IRQ line and don't want to name it,
that's what sysbus IRQ lines do. Otherwise, name the GPIO line.
That's interesting - I've always been under the impression that this was the
other
way around, i.e. for a TYPE_DEVICE then unnamed gpios are equivalent to IRQs,
and
that gpio lines for any other non-IRQ purpose should be named :/
Well, named GPIO lines are relatively new, so if you look at older
devices you'll probably find plenty that use unnamed GPIO lines
for various things including IRQ lines. But I think that for clarity
if you create something called "gpio_out" the obvious thing is that
that's a GPIO output, and if you create something called "sysbus_irq"
the obvious thing is that that's an IRQ line, and if you want to
do something that's neither of those then the clearest thing is
to name the GPIO.
Ultimately I'm not too concerned about the choice between sysbus IRQs instead of gpio
outputs, since making the change later is quite trivial. I've gone ahead and updated
this patch to use a sysbus IRQ instead of an unnamed gpio out for v2.
ATB,
Mark.