mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
parallel: Factor out common parallel_hds_isa_init()
Maintainers of affected machines cc'ed. Cc: Anthony Liguori <aliguori@amazon.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
c6f10a5876
commit
07dc788054
6 changed files with 37 additions and 34 deletions
|
@ -107,23 +107,8 @@ struct PcGuestInfo {
|
|||
};
|
||||
|
||||
/* parallel.c */
|
||||
static inline bool parallel_init(ISABus *bus, int index, CharDriverState *chr)
|
||||
{
|
||||
DeviceState *dev;
|
||||
ISADevice *isadev;
|
||||
|
||||
isadev = isa_try_create(bus, "isa-parallel");
|
||||
if (!isadev) {
|
||||
return false;
|
||||
}
|
||||
dev = DEVICE(isadev);
|
||||
qdev_prop_set_uint32(dev, "index", index);
|
||||
qdev_prop_set_chr(dev, "chardev", chr);
|
||||
if (qdev_init(dev) < 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void parallel_hds_isa_init(ISABus *bus, int n);
|
||||
|
||||
bool parallel_mm_init(MemoryRegion *address_space,
|
||||
hwaddr base, int it_shift, qemu_irq irq,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue