target-i386: kvm: 'kvm_get_supported_msrs' cleanup
[qemu/ar7.git] / hw / char / parallel-isa.c
blobbcc577f61ccfc8c0b0881e6703c202169119326d
1 /*
2 * QEMU Parallel PORT (ISA bus helpers)
4 * These functions reside in a separate file since they also might be
5 * required for linking when compiling QEMU without CONFIG_PARALLEL.
7 * Copyright (c) 2003 Fabrice Bellard
9 * SPDX-License-Identifier: MIT
12 #include "qemu/osdep.h"
13 #include "sysemu/sysemu.h"
14 #include "hw/isa/isa.h"
15 #include "hw/qdev-properties.h"
16 #include "hw/char/parallel.h"
18 static void parallel_init(ISABus *bus, int index, Chardev *chr)
20 DeviceState *dev;
21 ISADevice *isadev;
23 isadev = isa_create(bus, "isa-parallel");
24 dev = DEVICE(isadev);
25 qdev_prop_set_uint32(dev, "index", index);
26 qdev_prop_set_chr(dev, "chardev", chr);
27 qdev_init_nofail(dev);
30 void parallel_hds_isa_init(ISABus *bus, int n)
32 int i;
34 assert(n <= MAX_PARALLEL_PORTS);
36 for (i = 0; i < n; i++) {
37 if (parallel_hds[i]) {
38 parallel_init(bus, i, parallel_hds[i]);