Commit 302fe51b authored by Jan Kiszka's avatar Jan Kiszka Committed by Anthony Liguori
Browse files

pcspk: Convert to qdev



Convert the PC speaker device to a qdev ISA model. Move the public
interface to a dedicated header file at this chance.

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent ce967e2f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include "gdbstub.h"
#include "hw/smbios.h"
#include "exec-memory.h"
#include "hw/pcspk.h"

#ifdef TARGET_SPARC
int graphic_width = 1024;
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include "pci.h"
#include "pc.h"
#include "i8254.h"
#include "pcspk.h"

//#define DEBUG_I82378

@@ -195,7 +196,7 @@ static void i82378_init(DeviceState *dev, I82378State *s)
    pit = pit_init(isabus, 0x40, 0, NULL);

    /* speaker */
    pcspk_init(pit);
    pcspk_init(isabus, pit);

    /* 2 82C37 (dma) */
    DMA_init(1, &s->out[1]);
+2 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "loader.h"
#include "mc146818rtc.h"
#include "i8254.h"
#include "pcspk.h"
#include "blockdev.h"
#include "sysbus.h"
#include "exec-memory.h"
@@ -193,7 +194,7 @@ static void mips_jazz_init(MemoryRegion *address_space,
    cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
    DMA_init(0, cpu_exit_irq);
    pit = pit_init(isa_bus, 0x40, 0, NULL);
    pcspk_init(pit);
    pcspk_init(isa_bus, pit);

    /* ISA IO space at 0x90000000 */
    isa_mmio_init(0x90000000, 0x01000000);
+2 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "multiboot.h"
#include "mc146818rtc.h"
#include "i8254.h"
#include "pcspk.h"
#include "msi.h"
#include "sysbus.h"
#include "sysemu.h"
@@ -1172,7 +1173,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
        /* connect PIT to output control line of the HPET */
        qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(&pit->qdev, 0));
    }
    pcspk_init(pit);
    pcspk_init(isa_bus, pit);

    for(i = 0; i < MAX_SERIAL_PORTS; i++) {
        if (serial_hds[i]) {
+0 −4
Original line number Diff line number Diff line
@@ -149,10 +149,6 @@ void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
/* hpet.c */
extern int no_hpet;

/* pcspk.c */
void pcspk_init(ISADevice *pit);
int pcspk_audio_init(ISABus *bus);

/* piix_pci.c */
struct PCII440FXState;
typedef struct PCII440FXState PCII440FXState;
Loading