mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
serial: split serial.c
Split serial.c into serial.c, serial.h and serial-isa.c. While being at creating a serial.h header file move the serial prototypes from pc.h to the new serial.h. The latter leads to s/pc.h/serial.h/ in tons of boards which just want the serial bits from pc.h Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ad0b5321f1
commit
488cb996cd
26 changed files with 257 additions and 180 deletions
27
hw/pc.h
27
hw/pc.h
|
@ -12,33 +12,6 @@
|
|||
|
||||
/* PC-style peripherals (also used by other machines). */
|
||||
|
||||
/* serial.c */
|
||||
|
||||
SerialState *serial_init(int base, qemu_irq irq, int baudbase,
|
||||
CharDriverState *chr);
|
||||
SerialState *serial_mm_init(MemoryRegion *address_space,
|
||||
target_phys_addr_t base, int it_shift,
|
||||
qemu_irq irq, int baudbase,
|
||||
CharDriverState *chr, enum device_endian);
|
||||
static inline bool serial_isa_init(ISABus *bus, int index,
|
||||
CharDriverState *chr)
|
||||
{
|
||||
ISADevice *dev;
|
||||
|
||||
dev = isa_try_create(bus, "isa-serial");
|
||||
if (!dev) {
|
||||
return false;
|
||||
}
|
||||
qdev_prop_set_uint32(&dev->qdev, "index", index);
|
||||
qdev_prop_set_chr(&dev->qdev, "chardev", chr);
|
||||
if (qdev_init(&dev->qdev) < 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void serial_set_frequency(SerialState *s, uint32_t frequency);
|
||||
|
||||
/* parallel.c */
|
||||
static inline bool parallel_init(ISABus *bus, int index, CharDriverState *chr)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue