diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/glib-compat.h | 24 | ||||
| -rw-r--r-- | include/hw/arm/ast2400.h | 2 | ||||
| -rw-r--r-- | include/hw/boards.h | 2 | ||||
| -rw-r--r-- | include/hw/i386/pc.h | 4 | ||||
| -rw-r--r-- | include/hw/ide/internal.h | 2 | ||||
| -rw-r--r-- | include/hw/isa/i8257.h | 2 | ||||
| -rw-r--r-- | include/hw/isa/isa.h | 5 | ||||
| -rw-r--r-- | include/hw/misc/aspeed_sdmc.h | 31 | ||||
| -rw-r--r-- | include/hw/ppc/fdt.h | 30 | ||||
| -rw-r--r-- | include/hw/qdev-core.h | 2 |
10 files changed, 99 insertions, 5 deletions
diff --git a/include/glib-compat.h b/include/glib-compat.h index 8d5a7f3801..8093163bee 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -280,4 +280,28 @@ static inline void g_hash_table_add(GHashTable *hash_table, gpointer key) } while (0) #endif +#if !GLIB_CHECK_VERSION(2, 28, 0) +static inline void g_list_free_full(GList *list, GDestroyNotify free_func) +{ + GList *l; + + for (l = list; l; l = l->next) { + free_func(l->data); + } + + g_list_free(list); +} + +static inline void g_slist_free_full(GSList *list, GDestroyNotify free_func) +{ + GSList *l; + + for (l = list; l; l = l->next) { + free_func(l->data); + } + + g_slist_free(list); +} +#endif + #endif diff --git a/include/hw/arm/ast2400.h b/include/hw/arm/ast2400.h index 7833bc716c..e68807d475 100644 --- a/include/hw/arm/ast2400.h +++ b/include/hw/arm/ast2400.h @@ -15,6 +15,7 @@ #include "hw/arm/arm.h" #include "hw/intc/aspeed_vic.h" #include "hw/misc/aspeed_scu.h" +#include "hw/misc/aspeed_sdmc.h" #include "hw/timer/aspeed_timer.h" #include "hw/i2c/aspeed_i2c.h" #include "hw/ssi/aspeed_smc.h" @@ -32,6 +33,7 @@ typedef struct AST2400State { AspeedSCUState scu; AspeedSMCState smc; AspeedSMCState spi; + AspeedSDMCState sdmc; } AST2400State; #define TYPE_AST2400 "ast2400" diff --git a/include/hw/boards.h b/include/hw/boards.h index 3e69eca038..e46a744bcd 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -93,7 +93,7 @@ struct MachineClass { /*< public >*/ const char *family; /* NULL iff @name identifies a standalone machtype */ - const char *name; + char *name; const char *alias; const char *desc; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 74c175c1e5..c4316c30a8 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -53,6 +53,7 @@ struct PCMachineState { ISADevice *rtc; PCIBus *bus; FWCfgState *fw_cfg; + qemu_irq *gsi; /* Configuration options: */ uint64_t max_ram_below_4g; @@ -220,7 +221,7 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, MemoryRegion *region, ram_addr_t size, hwaddr mask); void i8042_isa_mouse_fake_event(void *opaque); -void i8042_setup_a20_line(ISADevice *dev, qemu_irq *a20_out); +void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out); /* pc.c */ extern int fd_bootchk; @@ -903,7 +904,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); { \ MachineClass *mc = MACHINE_CLASS(oc); \ optsfn(mc); \ - mc->name = namestr; \ mc->init = initfn; \ } \ static const TypeInfo pc_machine_type_##suffix = { \ diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 7824bc34ce..a6dd2c3d30 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -480,6 +480,8 @@ struct IDEBus { uint8_t retry_unit; int64_t retry_sector_num; uint32_t retry_nsector; + PortioList portio_list; + PortioList portio2_list; }; #define TYPE_IDE_DEVICE "ide-device" diff --git a/include/hw/isa/i8257.h b/include/hw/isa/i8257.h index aa211c0df7..88a2766a3f 100644 --- a/include/hw/isa/i8257.h +++ b/include/hw/isa/i8257.h @@ -36,6 +36,8 @@ typedef struct I8257State { QEMUBH *dma_bh; bool dma_bh_scheduled; int running; + PortioList portio_page; + PortioList portio_pageh; } I8257State; #endif diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 7693ac5454..c2fdd70cdc 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -134,12 +134,15 @@ void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start); * device and use the legacy portio routines. * * @dev: the ISADevice against which these are registered; may be NULL. + * @piolist: the PortioList associated with the io ports * @start: the base I/O port against which the portio->offset is applied. * @portio: the ports, sorted by offset. * @opaque: passed into the portio callbacks. * @name: passed into memory_region_init_io. */ -void isa_register_portio_list(ISADevice *dev, uint16_t start, +void isa_register_portio_list(ISADevice *dev, + PortioList *piolist, + uint16_t start, const MemoryRegionPortio *portio, void *opaque, const char *name); diff --git a/include/hw/misc/aspeed_sdmc.h b/include/hw/misc/aspeed_sdmc.h new file mode 100644 index 0000000000..7e081f6d2b --- /dev/null +++ b/include/hw/misc/aspeed_sdmc.h @@ -0,0 +1,31 @@ +/* + * ASPEED SDRAM Memory Controller + * + * Copyright (C) 2016 IBM Corp. + * + * This code is licensed under the GPL version 2 or later. See the + * COPYING file in the top-level directory. + */ +#ifndef ASPEED_SDMC_H +#define ASPEED_SDMC_H + +#include "hw/sysbus.h" + +#define TYPE_ASPEED_SDMC "aspeed.sdmc" +#define ASPEED_SDMC(obj) OBJECT_CHECK(AspeedSDMCState, (obj), TYPE_ASPEED_SDMC) + +#define ASPEED_SDMC_NR_REGS (0x8 >> 2) + +typedef struct AspeedSDMCState { + /*< private >*/ + SysBusDevice parent_obj; + + /*< public >*/ + MemoryRegion iomem; + + uint32_t regs[ASPEED_SDMC_NR_REGS]; + uint32_t silicon_rev; + +} AspeedSDMCState; + +#endif /* ASPEED_SDMC_H */ diff --git a/include/hw/ppc/fdt.h b/include/hw/ppc/fdt.h new file mode 100644 index 0000000000..2c68d1616f --- /dev/null +++ b/include/hw/ppc/fdt.h @@ -0,0 +1,30 @@ +/* + * QEMU PowerPC helper routines for the device tree. + * + * Copyright (C) 2016 IBM Corp. + * + * This code is licensed under the GPL version 2 or later. See the + * COPYING file in the top-level directory. + */ + +#ifndef PPC_FDT_H +#define PPC_FDT_H + +#include "qemu/error-report.h" + +typedef struct CPUPPCState CPUPPCState; + +#define _FDT(exp) \ + do { \ + int ret = (exp); \ + if (ret < 0) { \ + error_report("error creating device tree: %s: %s", \ + #exp, fdt_strerror(ret)); \ + exit(1); \ + } \ + } while (0) + +size_t ppc_create_page_sizes_prop(CPUPPCState *env, uint32_t *prop, + size_t maxsize); + +#endif /* PPC_FDT_H */ diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 4b4b33bec8..2c973473f7 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -224,7 +224,7 @@ typedef struct BusChild { struct BusState { Object obj; DeviceState *parent; - const char *name; + char *name; HotplugHandler *hotplug_handler; int max_index; bool realized; |