On Fri, Jun 10, 2016 at 3:55 AM, Peter Maydell <[email protected]> wrote: > On 12 May 2016 at 23:46, Alistair Francis <[email protected]> wrote: >> From: Peter Crosthwaite <[email protected]> >> >> QOMify registers as a child of TYPE_DEVICE. This allows registers to >> define GPIOs. >> >> Define an init helper that will do QOM initialisation. > > You should just squash this down into patch 2.
It relies on some work from the previous two patches so it becomes a pretty big patch if they all get squashed together. I'd rather leave it separate like this. > >> Signed-off-by: Peter Crosthwaite <[email protected]> >> Signed-off-by: Alistair Francis <[email protected]> >> Reviewed-by: KONRAD Frederic <[email protected]> >> --- > >> /** >> + * Initialize a register. GPIO's are setup as IOs to the specified device. >> + * Fast paths for eligible registers are enabled. >> + * @reg: Register to initialize >> + */ > > I can't work out what this documentation comment is trying to say. > How can a register have a GPIO? What does a fast path do, what > registers are elegible, why do I care whether they're enabled or not? I have updated it to this, which removes the fast path (that was left over) and explains more about GPIOs. /** * Initialize a register. This will also setup any GPIO links which are used * to connect register updates in one device to other devices. Generally this * is useful for interrupt propagation. * @reg: Register to initialize */ Thanks, Alistair > >> + >> +void register_init(RegisterInfo *reg); >> + >> +/** >> * Memory API MMIO write handler that will write to a Register API register. >> * _be for big endian variant and _le for little endian. >> * @opaque: RegisterInfo to write to >> -- >> 2.7.4 > > thanks > -- PMM >
