mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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
2 changed files with 5 additions and 8 deletions
|
@ -861,7 +861,6 @@ void ppce500_init(MachineState *machine)
|
||||||
for (i = 0; i < smp_cpus; i++) {
|
for (i = 0; i < smp_cpus; i++) {
|
||||||
PowerPCCPU *cpu;
|
PowerPCCPU *cpu;
|
||||||
CPUState *cs;
|
CPUState *cs;
|
||||||
qemu_irq *input;
|
|
||||||
|
|
||||||
cpu = POWERPC_CPU(object_new(machine->cpu_type));
|
cpu = POWERPC_CPU(object_new(machine->cpu_type));
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
@ -885,9 +884,10 @@ void ppce500_init(MachineState *machine)
|
||||||
firstenv = env;
|
firstenv = env;
|
||||||
}
|
}
|
||||||
|
|
||||||
input = (qemu_irq *)env->irq_inputs;
|
irqs[i].irq[OPENPIC_OUTPUT_INT] =
|
||||||
irqs[i].irq[OPENPIC_OUTPUT_INT] = input[PPCE500_INPUT_INT];
|
qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_INT);
|
||||||
irqs[i].irq[OPENPIC_OUTPUT_CINT] = input[PPCE500_INPUT_CINT];
|
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->spr_cb[SPR_BOOKE_PIR].default_value = cs->cpu_index = i;
|
||||||
env->mpic_iack = pmc->ccsrbar_base + MPC8544_MPIC_REGS_OFFSET + 0xa0;
|
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)
|
void ppce500_irq_init(PowerPCCPU *cpu)
|
||||||
{
|
{
|
||||||
CPUPPCState *env = &cpu->env;
|
qdev_init_gpio_in(DEVICE(cpu), ppce500_set_irq, PPCE500_INPUT_NB);
|
||||||
|
|
||||||
env->irq_inputs = (void **)qemu_allocate_irqs(&ppce500_set_irq,
|
|
||||||
cpu, PPCE500_INPUT_NB);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable or Disable the E500 EPR capability */
|
/* Enable or Disable the E500 EPR capability */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue