slavio_intctl.c (2c9b15cab12c21e32dffb67c5e18f3dc407ca224) slavio_intctl.c (1437c94b2689c2010362f84d14f14feaa1d8dba3)
1/*
2 * QEMU Sparc SLAVIO interrupt controller emulation
3 *
4 * Copyright (c) 2003-2005 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 412 unchanged lines hidden (view full) ---

421
422static int slavio_intctl_init1(SysBusDevice *dev)
423{
424 SLAVIO_INTCTLState *s = FROM_SYSBUS(SLAVIO_INTCTLState, dev);
425 unsigned int i, j;
426 char slave_name[45];
427
428 qdev_init_gpio_in(&dev->qdev, slavio_set_irq_all, 32 + MAX_CPUS);
1/*
2 * QEMU Sparc SLAVIO interrupt controller emulation
3 *
4 * Copyright (c) 2003-2005 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 412 unchanged lines hidden (view full) ---

421
422static int slavio_intctl_init1(SysBusDevice *dev)
423{
424 SLAVIO_INTCTLState *s = FROM_SYSBUS(SLAVIO_INTCTLState, dev);
425 unsigned int i, j;
426 char slave_name[45];
427
428 qdev_init_gpio_in(&dev->qdev, slavio_set_irq_all, 32 + MAX_CPUS);
429 memory_region_init_io(&s->iomem, NULL, &slavio_intctlm_mem_ops, s,
429 memory_region_init_io(&s->iomem, OBJECT(s), &slavio_intctlm_mem_ops, s,
430 "master-interrupt-controller", INTCTLM_SIZE);
431 sysbus_init_mmio(dev, &s->iomem);
432
433 for (i = 0; i < MAX_CPUS; i++) {
434 snprintf(slave_name, sizeof(slave_name),
435 "slave-interrupt-controller-%i", i);
436 for (j = 0; j < MAX_PILS; j++) {
437 sysbus_init_irq(dev, &s->cpu_irqs[i][j]);
438 }
430 "master-interrupt-controller", INTCTLM_SIZE);
431 sysbus_init_mmio(dev, &s->iomem);
432
433 for (i = 0; i < MAX_CPUS; i++) {
434 snprintf(slave_name, sizeof(slave_name),
435 "slave-interrupt-controller-%i", i);
436 for (j = 0; j < MAX_PILS; j++) {
437 sysbus_init_irq(dev, &s->cpu_irqs[i][j]);
438 }
439 memory_region_init_io(&s->slaves[i].iomem, NULL, &slavio_intctl_mem_ops,
439 memory_region_init_io(&s->slaves[i].iomem, OBJECT(s),
440 &slavio_intctl_mem_ops,
440 &s->slaves[i], slave_name, INTCTL_SIZE);
441 sysbus_init_mmio(dev, &s->slaves[i].iomem);
442 s->slaves[i].cpu = i;
443 s->slaves[i].master = s;
444 }
445
446 return 0;
447}

--- 24 unchanged lines hidden ---
441 &s->slaves[i], slave_name, INTCTL_SIZE);
442 sysbus_init_mmio(dev, &s->slaves[i].iomem);
443 s->slaves[i].cpu = i;
444 s->slaves[i].master = s;
445 }
446
447 return 0;
448}

--- 24 unchanged lines hidden ---