mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 07:13:38 +08:00
bb3d5ea858
Again... (after07dc788054
and9157eee1b1
). We now extract the ISA bus specific helpers. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180308223946.26784-2-f4bug@amsat.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
37 lines
764 B
C
37 lines
764 B
C
/*
|
|
* QEMU Parallel PORT (ISA bus helpers)
|
|
*
|
|
* Copyright (c) 2003 Fabrice Bellard
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#include "qemu/osdep.h"
|
|
#include "sysemu/sysemu.h"
|
|
#include "hw/isa/isa.h"
|
|
#include "hw/char/parallel.h"
|
|
|
|
static void parallel_init(ISABus *bus, int index, Chardev *chr)
|
|
{
|
|
DeviceState *dev;
|
|
ISADevice *isadev;
|
|
|
|
isadev = isa_create(bus, "isa-parallel");
|
|
dev = DEVICE(isadev);
|
|
qdev_prop_set_uint32(dev, "index", index);
|
|
qdev_prop_set_chr(dev, "chardev", chr);
|
|
qdev_init_nofail(dev);
|
|
}
|
|
|
|
void parallel_hds_isa_init(ISABus *bus, int n)
|
|
{
|
|
int i;
|
|
|
|
assert(n <= MAX_PARALLEL_PORTS);
|
|
|
|
for (i = 0; i < n; i++) {
|
|
if (parallel_hds[i]) {
|
|
parallel_init(bus, i, parallel_hds[i]);
|
|
}
|
|
}
|
|
}
|