[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 31/35] hw/sh4: Emit warning when old code is used
This code hasn't been QOM'ified yet. Warn the user. Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> --- hw/char/sh_serial.c | 3 +++ hw/intc/sh_intc.c | 3 +++ hw/sh4/r2d.c | 3 +++ hw/sh4/sh7750.c | 4 ++++ hw/timer/sh_timer.c | 5 +++++ 5 files changed, 18 insertions(+) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 167f4d8cb9..9366a23dd2 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -31,6 +31,7 @@ #include "chardev/char-fe.h" #include "qapi/error.h" #include "qemu/timer.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_SERIAL @@ -382,6 +383,8 @@ void sh_serial_init(MemoryRegion *sysmem, { sh_serial_state *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(sh_serial_state)); s->feat = feat; diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index 72a55e32dd..c90fbf47bb 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -13,6 +13,7 @@ #include "hw/sh4/sh_intc.h" #include "hw/irq.h" #include "hw/sh4/sh.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_INTC //#define DEBUG_INTC_SOURCES @@ -444,6 +445,8 @@ int sh_intc_init(MemoryRegion *sysmem, { unsigned int i, j; + qdev_warn_deprecated_function_used(); + desc->pending = 0; desc->nr_sources = nr_sources; desc->mask_regs = mask_regs; diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 72bb5285cc..22bbbe7d3c 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -43,6 +43,7 @@ #include "hw/usb.h" #include "hw/block/flash.h" #include "exec/address-spaces.h" +#include "hw/qdev-deprecated.h" #define FLASH_BASE 0x00000000 #define FLASH_SIZE (16 * MiB) @@ -187,6 +188,8 @@ static qemu_irq *r2d_fpga_init(MemoryRegion *sysmem, { r2d_fpga_t *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(r2d_fpga_t)); s->irl = irl; diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index d660714443..379822e0c2 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -32,6 +32,7 @@ #include "hw/sh4/sh_intc.h" #include "cpu.h" #include "exec/exec-all.h" +#include "hw/qdev-deprecated.h" #define NB_DEVICES 4 @@ -756,6 +757,8 @@ SH7750State *sh7750_init(SuperHCPU *cpu, MemoryRegion *sysmem) { SH7750State *s; + qdev_warn_deprecated_function_used(); + s = g_malloc0(sizeof(SH7750State)); s->cpu = cpu; s->periph_freq = 60000000; /* 60MHz */ @@ -866,6 +869,7 @@ SH7750State *sh7750_init(SuperHCPU *cpu, MemoryRegion *sysmem) qemu_irq sh7750_irl(SH7750State *s) { + qdev_warn_deprecated_function_used(); sh_intc_toggle_source(sh_intc_source(&s->intc, IRL), 1, 0); /* enable */ return qemu_allocate_irq(sh_intc_set_irl, sh_intc_source(&s->intc, IRL), 0); } diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 13c4051808..d5e33507b0 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -14,6 +14,7 @@ #include "hw/sh4/sh.h" #include "qemu/timer.h" #include "hw/ptimer.h" +#include "hw/qdev-deprecated.h" //#define DEBUG_TIMER @@ -199,6 +200,8 @@ static void *sh_timer_init(uint32_t freq, int feat, qemu_irq irq) { sh_timer_state *s; + qdev_warn_deprecated_function_used(); + s = (sh_timer_state *)g_malloc0(sizeof(sh_timer_state)); s->freq = freq; s->feat = feat; @@ -319,6 +322,8 @@ void tmu012_init(MemoryRegion *sysmem, hwaddr base, tmu012_state *s; int timer_feat = (feat & TMU012_FEAT_EXTCLK) ? TIMER_FEAT_EXTCLK : 0; + qdev_warn_deprecated_function_used(); + s = (tmu012_state *)g_malloc0(sizeof(tmu012_state)); s->feat = feat; s->timer[0] = sh_timer_init(freq, timer_feat, ch0_irq); -- 2.21.3
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |