Skip to content

Commit

Permalink
sun4u: implement interrupt clearing registers
Browse files Browse the repository at this point in the history
Implement registers for clearing OBIO and PCI interrupts

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  • Loading branch information
artyom-tarasenko authored and blueswirl committed May 12, 2012
1 parent d1d8005 commit 94d1991
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hw/apb_pci.c
Expand Up @@ -85,6 +85,8 @@ typedef struct APBState {
unsigned int nr_resets;
} APBState;

static void pci_apb_set_irq(void *opaque, int irq_num, int level);

static void apb_config_writel (void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
Expand Down Expand Up @@ -113,6 +115,16 @@ static void apb_config_writel (void *opaque, target_phys_addr_t addr,
s->obio_irq_map[(addr & 0xff) >> 3] |= val & ~PBM_PCI_IMR_MASK;
}
break;
case 0x1400 ... 0x143f: /* PCI interrupt clear */
if (addr & 4) {
pci_apb_set_irq(s, (addr & 0x3f) >> 3, 0);
}
break;
case 0x1800 ... 0x1860: /* OBIO interrupt clear */
if (addr & 4) {
pci_apb_set_irq(s, 0x20 | ((addr & 0xff) >> 3), 0);
}
break;
case 0x2000 ... 0x202f: /* PCI control */
s->pci_control[(addr & 0x3f) >> 2] = val;
break;
Expand Down

0 comments on commit 94d1991

Please sign in to comment.