Revision 3a38d437 hw/isa-bus.c
b/hw/isa-bus.c | ||
---|---|---|
76 | 76 |
} |
77 | 77 |
} |
78 | 78 |
|
79 |
/* |
|
80 |
* isa_reserve_irq() reserves the ISA irq and returns the corresponding |
|
81 |
* qemu_irq entry for the i8259. |
|
82 |
* |
|
83 |
* This function is only for special cases such as the 'ferr', and |
|
84 |
* temporary use for normal devices until they are converted to qdev. |
|
85 |
*/ |
|
86 |
qemu_irq isa_reserve_irq(int isairq) |
|
87 |
{ |
|
88 |
if (isairq < 0 || isairq > 15) { |
|
89 |
fprintf(stderr, "isa irq %d invalid\n", isairq); |
|
90 |
exit(1); |
|
91 |
} |
|
92 |
if (isabus->assigned & (1 << isairq)) { |
|
93 |
fprintf(stderr, "isa irq %d already assigned\n", isairq); |
|
94 |
exit(1); |
|
95 |
} |
|
96 |
isabus->assigned |= (1 << isairq); |
|
97 |
return isabus->irqs[isairq]; |
|
98 |
} |
|
99 |
|
|
79 | 100 |
void isa_init_irq(ISADevice *dev, qemu_irq *p) |
80 | 101 |
{ |
81 | 102 |
assert(dev->nirqs < ARRAY_SIZE(dev->irqs)); |
Also available in: Unified diff