i8259: QOM cleanups

Eliminate DO_UPCAST() for PICCommonState. Prepares for ISA realizefn.

Also give the i8259_common type registration functions unique names
while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ide: QOM'ify ISA IDE

Introduce type constant and cast macro to obsolete DO_UPCAST().
Add missing braces.

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
m48t59: QOM'ify ISA M48T59 NVRAM

Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
mc146818rtc: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
ne2000-isa: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
parallel: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
pc: QOM'ify port 92

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
pckbd: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
pcspk: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
sb16: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
serial: QOM'ify ISA serial

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
sga: QOM'ify

Introduce type constant and cast macro.

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
vga-isa: QOM'ify ISA VGA

Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of(). Prepares for ISA realizefn.

Unify function naming scheme while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
vmmouse: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST() and
container_of(). Prepares for ISA realizefn.

Remove reserved underscore from struct name while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
vmport: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for ISA realizefn.

Drop reserved underscore from struct name while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
wdt_ib700: QOM'ify

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
isa: Use realizefn for ISADevice

Drop ISADeviceClass::init and the resulting no-op initfn and let
children implement their own realizefn. Adapt error handling.

Signed-off-by: Andreas Färber <afaerber@suse.de>
i8254: QOM'ify

Introduce type constant and avoid DO_UPCAST().

Prepares for PIT realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
kvm/i8254: QOM'ify some more

Introduce type constant and cast macro to obsolete DO_UPCAST().

Prepares for PIT realizefn.

Signed-off-by: Andreas Färber <afaerber@suse.de>
i8254: Convert PITCommonState to QOM realizefn

Instead of having the parent provide PITCommonClass::init,
let the children override DeviceClass::realize themselves.
This pushes the responsibility for saving and calling the parent's
realizefn to the children.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>