summaryrefslogtreecommitdiff
path: root/hw/block/fdc.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-14qdev: Remove hex8/32/64 property typesPaolo Bonzini1-1/+1
Replace them with uint8/32/64. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-23isa: Clean up use of cannot_instantiate_with_device_add_yetMarkus Armbruster1-1/+0
Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc: drop * i8042: drop, even though its I/O base is hardcoded (because you could conceivably still add one to a board that has none), and even though PC board code wires up the A20 line (because that wiring is optional) * port92: keep because it needs additional wiring by port92_init() * mc146818rtc: keep because it needs to be wired up by rtc_init() * m48t59_isa: keep because needs to be wired up by m48t59_init_isa() * isa-pit, kvm-pit: keep (in their abstract base pic-common) because the PIT needs additional wiring by board code, depending on HPET presence * pcspk: keep because of pointer property pit, and because realize sets global pcspk_state * vmmouse: keep because of pointer property ps2_mouse * vmport: keep because realize sets global port_state * isa-i8259, kvm-i8259: keep (in their abstract base pic-common), because the PICs' IRQ input lines are set up by board code, and the wiring of the slave to the master is hard-coded in device model code Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-23qdev: Replace no_user by cannot_instantiate_with_device_add_yetMarkus Armbruster1-1/+1
In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll fail in sometimes mysterious ways. If you're lucky, you get an unmysterious immediate crash. To protect users from such badness, DeviceClass member no_user used to make device models unavailable with -device / device_add, but that regressed in commit 18b6dad. The device model is still omitted from help, but is available anyway. Attempts to fix the regression have been rejected with the argument that the purpose of no_user isn't clear, and it's prone to misuse. This commit clarifies no_user's purpose. Anthony suggested to rename it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which I shorten somewhat to keep checkpatch happy. While there, make it bool. Every use of cannot_instantiate_with_device_add_yet gets a FIXME comment asking for rationale. The next few commits will clean them all up, either by providing a rationale, or by getting rid of the use. With that done, the regression fix is hopefully acceptable. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-22aio / timers: Switch entire codebase to the new timer APIAlex Bligh1-3/+3
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-29fdc: Fix inheritence for SUNW,fdtwoAndreas Färber1-44/+44
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> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29devices: Associate devices to their logical categoryMarcel Apfelbaum1-0/+3
The category will be used to sort the devices displayed in the command line help. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23fdc: Improve error propagation for QOM realizeAndreas Färber1-18/+22
Rename fdctrl_init_common() to fdctrl_realize_common() and let fdctrl_connect_drives() propagate an Error through it. Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23fdc: Use QOM realize for fdcHu Tao1-22/+41
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Renamed SysBusDevice variable] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23fdc: QOM'ify some moreHu Tao1-16/+25
Introduce type constant and avoid DO_UPCAST(), container_of(), and use DEVICE() to avoid accessing parent qdev directly. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Renamed parent field and avoided repeated SYS_BUS_DEVICE() casts] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-04hw/block: pass owner to memory_region_init* functionsPaolo Bonzini1-3/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-07isa: QOM'ify ISADeviceAndreas Färber1-7/+9
Rename its parent field and use DEVICE() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-07isa: Use realizefn for ISADeviceAndreas Färber1-10/+14
Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-29fdc: QOM'ify ISA floppy controllerAndreas Färber1-9/+12
Introduce type constant and cast macro to obsolete DO_UPCAST(). Reuse type constant for PC machine compatibility settings. Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-4-git-send-email-afaerber@suse.de Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-20qdev: Drop taddr propertiesPeter Maydell1-1/+0
Drop all the infrastructure for taddr properties (ie ones which are 'hwaddr' sized). These are now unused, and any further desired use would be rather questionable since device properties shouldn't generally depend on a type that is conceptually variable based on the target CPU. 32 or 64 bit integer properties should be used instead as appropriate for the specific device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-0/+2284
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>