ppc/e500: Allocate IRQ lines with qdev_init_gpio_in()
Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220705145814.461723-5-clg@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
0f3e0c6fd3
commit
5e66cd0c78
@ -861,7 +861,6 @@ void ppce500_init(MachineState *machine)
|
||||
for (i = 0; i < smp_cpus; i++) {
|
||||
PowerPCCPU *cpu;
|
||||
CPUState *cs;
|
||||
qemu_irq *input;
|
||||
|
||||
cpu = POWERPC_CPU(object_new(machine->cpu_type));
|
||||
env = &cpu->env;
|
||||
@ -885,9 +884,10 @@ void ppce500_init(MachineState *machine)
|
||||
firstenv = env;
|
||||
}
|
||||
|
||||
input = (qemu_irq *)env->irq_inputs;
|
||||
irqs[i].irq[OPENPIC_OUTPUT_INT] = input[PPCE500_INPUT_INT];
|
||||
irqs[i].irq[OPENPIC_OUTPUT_CINT] = input[PPCE500_INPUT_CINT];
|
||||
irqs[i].irq[OPENPIC_OUTPUT_INT] =
|
||||
qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_INT);
|
||||
irqs[i].irq[OPENPIC_OUTPUT_CINT] =
|
||||
qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_CINT);
|
||||
env->spr_cb[SPR_BOOKE_PIR].default_value = cs->cpu_index = i;
|
||||
env->mpic_iack = pmc->ccsrbar_base + MPC8544_MPIC_REGS_OFFSET + 0xa0;
|
||||
|
||||
|
@ -474,10 +474,7 @@ static void ppce500_set_irq(void *opaque, int pin, int level)
|
||||
|
||||
void ppce500_irq_init(PowerPCCPU *cpu)
|
||||
{
|
||||
CPUPPCState *env = &cpu->env;
|
||||
|
||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppce500_set_irq,
|
||||
cpu, PPCE500_INPUT_NB);
|
||||
qdev_init_gpio_in(DEVICE(cpu), ppce500_set_irq, PPCE500_INPUT_NB);
|
||||
}
|
||||
|
||||
/* Enable or Disable the E500 EPR capability */
|
||||
|
Loading…
Reference in New Issue
Block a user