fdc: Fix inheritence for SUNW,fdtwo

Since commit dd3be7420774f7dc8f37a96ca24d07f0b6f31b3b SUNW,fdtwo's
initfn (realizefn since 940194c2369e50d91d1abf6f36d43853eea5e539)
was using SYSBUS_FDC() cast. This uses type sysbus-fdc rather than
SUNW,fdtwo.

Fix this by letting SUNW,fdtwo and sysbus-fdc both inherit from an
abstract type base-sysbus-fdc.

This allows to consolidate realizefns by using instance_init functions.
Clean up variable names and variable order while at it.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ide/piix: QOM casting sweep

Use standard QOM cast macro. Remove usage of DO_UPCAST() and
direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
ide: Introduce abstract QOM type for PCIIDEState

Needed for QOM casts.

Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu/a9mpcore: QOM casting cleanup

Introduce type constant and cast macro and enforce its use by
renaming A9MPPrivState::busdev field to parent_obj.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
timer/arm_mptimer: QOM cast cleanup

Introduce type constant and cast macro and rename
ARMMPTimerState::busdev to enforce its use.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
cpu/a15mpcore: QOM cast cleanup

Introduce type constant and cast macro and rename A15MPPrivState::busdev
field to parent_obj to enforce its use.

Prepares for QOM realize.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
arm11mpcore: QOM cast cleanups for ARM11MPCorePriveState

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
arm11mpcore: QOM cast cleanups for mpcore_rirq_state

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
pci-bridge: Turn PCIBridge into abstract QOM type

Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]
Signed-off-by: Andreas Färber <afaerber@suse.de>
pci-bridge-dev: QOM parent field cleanup

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Don Koch <dkoch@verizon.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
pci-bridge/i82801b11: Rename parent field

Reviewed-by: Don Koch <dkoch@verizon.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

Move PCIEPort's "port" property to the new type, same for "aer_log_max".
Move PCIESlot's "chassis" and "slot" properties to the new type.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
etraxfs_ser: QOM cast cleanups

Rename etrax_serial to ETRAXSerial, introduce type constant and use QOM
casts.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
xilinx_uartlite: Rename xlx_uartlite to XilinxUARTLite

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
xilinx_uartlite: QOM cast cleanups

Introduce type constant and use QOM casts.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
cs4231: QOM cast cleanup

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
audio/marvell_88w8618: QOM'ify

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
milkymist-ac97: QOM'ify

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
pl041: Rename pl041_state to PL041State

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Split off renaming from QOM cast changes]
Signed-off-by: Andreas Färber <afaerber@suse.de>
pl041: QOM cast cleanup

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>