On 12 April 2012 09:13, Evgeny Voevodin<address@hidden> wrote:
With these properties irq gate could be tuned to mux up to
QDEV_MAX_IRQ inputs and ouputs. Gate will group inputs
into groups of size n_in/n_out each.
@@ -420,14 +430,20 @@ static int exynos4210_irq_gate_init(SysBusDevice *dev)
Exynos4210IRQGateState *s =
FROM_SYSBUS(Exynos4210IRQGateState, dev);
+ /* Gate will make each input group of size n_in / n_out */
I think it would be useful to expand this comment to describe how the
device uses its gpio_in and sysbus irq outputs. (This is necessary at
the moment because we don't have the ability to have nicely named
arrays of gpio inputs/outputs, so often the single gpio input array
is arbitrarily divided up and you just have to document in a comment
how it works; see for instance arm_gic.c and arm_mptimer.c. Something
like:
/* This device models a collection of OR gates. There are n_out
* separate gates, and output sysbus IRQ line N is the output of
* gate N. The input qdev gpio lines are the inputs to each gate
* in order:
* [0.. n_in/n_out - 1] : inputs to gate 0
* [n_in/n_out .. 2*n_in/n_out - 1] : inputs to gate 1
* and so on.
*/