macio: Delete unused "macio-gpio" devices
commit33208432f5fdd459c98237872e480ef82f435419
authorMarkus Armbruster <armbru@redhat.com>
Tue, 9 Jun 2020 12:23:25 +0000 (9 14:23 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 15 Jun 2020 19:36:21 +0000 (15 21:36 +0200)
tree124b8c9acdd088fb463ae499187f34be9cf801bd
parent3d81f594fdcd6c2737a52dcb19552a298f2af9e1
macio: Delete unused "macio-gpio" devices

These devices go with the "via-pmu" device, which is controlled by
property "has-pmu".  macio_newworld_init() creates it unconditionally,
because the property has not been set then.  macio_newworld_realize()
realizes it only when the property is true.  Works, although it can
leave an unrealized device hanging around in the QOM composition tree.
Affects machine mac99 with via=cuda (default).

Delete the unused device by making macio_newworld_realize() unparent
it.  Visible in "info qom-tree":

     /machine (mac99-machine)
       [...]
       /unattached (container)
         /device[9] (macio-newworld)
           [...]
           /escc-legacy-port[8] (qemu:memory-region)
           /escc-legacy-port[9] (qemu:memory-region)
           /escc-legacy[0] (qemu:memory-region)
    -      /gpio (macio-gpio)
    -        /gpio[0] (qemu:memory-region)
           /ide[0] (macio-ide)
             /ide.0 (IDE)
             /pmac-ide[0] (qemu:memory-region)

Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20200609122339.937862-11-armbru@redhat.com>
hw/misc/macio/macio.c