diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index e8bc088c8f..97e6d5f5b2 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -734,40 +734,40 @@ static void sdram_reset(void *opaque) void ppc440_sdram_init(CPUPPCState *env, int nbanks, Ppc4xxSdramBank *ram_banks) { - ppc440_sdram_t *sdram; + ppc440_sdram_t *s; int i; - sdram = g_malloc0(sizeof(*sdram)); - sdram->nbanks = nbanks; + s = g_malloc0(sizeof(*s)); + s->nbanks = nbanks; for (i = 0; i < nbanks; i++) { - sdram->bank[i].ram = ram_banks[i].ram; - sdram->bank[i].base = ram_banks[i].base; - sdram->bank[i].size = ram_banks[i].size; + s->bank[i].ram = ram_banks[i].ram; + s->bank[i].base = ram_banks[i].base; + s->bank[i].size = ram_banks[i].size; } - qemu_register_reset(&sdram_reset, sdram); + qemu_register_reset(&sdram_reset, s); ppc_dcr_register(env, SDRAM0_CFGADDR, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM0_CFGDATA, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_R0BAS, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_R1BAS, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_R2BAS, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_R3BAS, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_CONF1HB, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_PLBADDULL, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_CONF1LL, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_CONFPATHB, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); ppc_dcr_register(env, SDRAM_PLBADDUHB, - sdram, &dcr_read_sdram, &dcr_write_sdram); + s, &dcr_read_sdram, &dcr_write_sdram); } void ppc440_sdram_enable(CPUPPCState *env)