sh4 hw/: Don't use CPUState
Scripted conversion: for file in hw/sh.h hw/shix.c hw/r2d.c; do sed -i "s/CPUState/CPUSH4State/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
0e4213a7ef
commit
0b7ade1d3e
6
hw/r2d.c
6
hw/r2d.c
@ -192,14 +192,14 @@ static qemu_irq *r2d_fpga_init(MemoryRegion *sysmem,
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef struct ResetData {
|
typedef struct ResetData {
|
||||||
CPUState *env;
|
CPUSH4State *env;
|
||||||
uint32_t vector;
|
uint32_t vector;
|
||||||
} ResetData;
|
} ResetData;
|
||||||
|
|
||||||
static void main_cpu_reset(void *opaque)
|
static void main_cpu_reset(void *opaque)
|
||||||
{
|
{
|
||||||
ResetData *s = (ResetData *)opaque;
|
ResetData *s = (ResetData *)opaque;
|
||||||
CPUState *env = s->env;
|
CPUSH4State *env = s->env;
|
||||||
|
|
||||||
cpu_state_reset(env);
|
cpu_state_reset(env);
|
||||||
env->pc = s->vector;
|
env->pc = s->vector;
|
||||||
@ -224,7 +224,7 @@ static void r2d_init(ram_addr_t ram_size,
|
|||||||
const char *kernel_filename, const char *kernel_cmdline,
|
const char *kernel_filename, const char *kernel_cmdline,
|
||||||
const char *initrd_filename, const char *cpu_model)
|
const char *initrd_filename, const char *cpu_model)
|
||||||
{
|
{
|
||||||
CPUState *env;
|
CPUSH4State *env;
|
||||||
ResetData *reset_info;
|
ResetData *reset_info;
|
||||||
struct SH7750State *s;
|
struct SH7750State *s;
|
||||||
MemoryRegion *sdram = g_new(MemoryRegion, 1);
|
MemoryRegion *sdram = g_new(MemoryRegion, 1);
|
||||||
|
2
hw/sh.h
2
hw/sh.h
@ -11,7 +11,7 @@
|
|||||||
struct SH7750State;
|
struct SH7750State;
|
||||||
struct MemoryRegion;
|
struct MemoryRegion;
|
||||||
|
|
||||||
struct SH7750State *sh7750_init(CPUState * cpu, struct MemoryRegion *sysmem);
|
struct SH7750State *sh7750_init(CPUSH4State * cpu, struct MemoryRegion *sysmem);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* The callback will be triggered if any of the designated lines change */
|
/* The callback will be triggered if any of the designated lines change */
|
||||||
|
@ -43,7 +43,7 @@ static void shix_init(ram_addr_t ram_size,
|
|||||||
const char *initrd_filename, const char *cpu_model)
|
const char *initrd_filename, const char *cpu_model)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
CPUState *env;
|
CPUSH4State *env;
|
||||||
struct SH7750State *s;
|
struct SH7750State *s;
|
||||||
MemoryRegion *sysmem = get_system_memory();
|
MemoryRegion *sysmem = get_system_memory();
|
||||||
MemoryRegion *rom = g_new(MemoryRegion, 1);
|
MemoryRegion *rom = g_new(MemoryRegion, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user