diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2020-01-21 18:28:37 +1100 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-06-03 17:15:50 +1000 |
commit | c42df50e1b19797a69d3a4aeaa496ec7d327b33f (patch) | |
tree | c7118e3d99bf28d4c501a0d79d460343ecc4256a /hw/phb4.c | |
parent | c17ea6834c2e3c9739cfb0ef963595e022215763 (diff) | |
download | skiboot-c42df50e1b19797a69d3a4aeaa496ec7d327b33f.zip skiboot-c42df50e1b19797a69d3a4aeaa496ec7d327b33f.tar.gz skiboot-c42df50e1b19797a69d3a4aeaa496ec7d327b33f.tar.bz2 |
hw/phb4: Factor out interrupt setup
Move the unmasking (enabling) of the various PHB error and informational
interrupts out of the main init sequence. We'll need this elsewhere to
enable the PHB error interrupts.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/phb4.c')
-rw-r--r-- | hw/phb4.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -3528,6 +3528,16 @@ static struct pci_slot *phb4_slot_create(struct phb *phb) return slot; } +static void phb4_int_unmask_all(struct phb4 *p) +{ + /* Init_126..130 - Re-enable error interrupts */ + out_be64(p->regs + PHB_ERR_IRQ_ENABLE, 0xca8880cc00000000ull); + out_be64(p->regs + PHB_TXE_ERR_IRQ_ENABLE, 0x2008400e08200000ull); + out_be64(p->regs + PHB_RXE_ARB_ERR_IRQ_ENABLE, 0xc40038fc01804070ull); + out_be64(p->regs + PHB_RXE_MRG_ERR_IRQ_ENABLE, 0x00006100008000a8ull); + out_be64(p->regs + PHB_RXE_TCE_ERR_IRQ_ENABLE, 0x60510050c0000000ull); +} + static uint64_t phb4_get_pesta(struct phb4 *p, uint64_t pe_number) { uint64_t pesta; @@ -5307,11 +5317,7 @@ static void phb4_init_hw(struct phb4 *p) PCI_CFG_STAT_RECV_PERR); /* Init_126..130 - Re-enable error interrupts */ - out_be64(p->regs + PHB_ERR_IRQ_ENABLE, 0xca8880cc00000000ull); - out_be64(p->regs + PHB_TXE_ERR_IRQ_ENABLE, 0x2008400e08200000ull); - out_be64(p->regs + PHB_RXE_ARB_ERR_IRQ_ENABLE, 0xc40038fc01804070ull); - out_be64(p->regs + PHB_RXE_MRG_ERR_IRQ_ENABLE, 0x00006100008000a8ull); - out_be64(p->regs + PHB_RXE_TCE_ERR_IRQ_ENABLE, 0x60510050c0000000ull); + phb4_int_unmask_all(p); /* Init_131 - Re-enable LEM error mask */ out_be64(p->regs + PHB_LEM_ERROR_MASK, 0x0000000000000000ull); |