diff options
author | Michael Neuling <mikey@neuling.org> | 2017-07-26 20:50:11 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-07-28 14:03:59 +1000 |
commit | 73ccee37e739bb15d5bc7844125a4d2f9fd77235 (patch) | |
tree | 3ece8b1b19ea9551cbcd4dc4d57693c5d8730cfb /hw | |
parent | a2a5965a80acdf2f4e6a2cd90752838abf891dbf (diff) | |
download | skiboot-73ccee37e739bb15d5bc7844125a4d2f9fd77235.zip skiboot-73ccee37e739bb15d5bc7844125a4d2f9fd77235.tar.gz skiboot-73ccee37e739bb15d5bc7844125a4d2f9fd77235.tar.bz2 |
phb4: Set REGB error enables based on link state
Currently we always set these enables when initing the PHB. If the
link is already down, we shouldn't set them as it may cause spurious
errors.
This changes the code to only sets them if the link is up.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/phb4.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -3809,9 +3809,15 @@ static void phb4_init_errors(struct phb4 *p) /* Init_64..72 - REGB errors */ out_be64(p->regs + 0x1c00, 0xffffffffffffffffull); out_be64(p->regs + 0x1c08, 0x0000000000000000ull); - out_be64(p->regs + 0x1c20, 0x2130006efca8bc00ull); + /* Enable/disable error status indicators that trigger irqs */ + if (p->has_link) { + out_be64(p->regs + 0x1c20, 0x2130006efca8bc00ull); + out_be64(p->regs + 0x1c30, 0xde8fff91035743ffull); + } else { + out_be64(p->regs + 0x1c20, 0x0000000000000000ull); + out_be64(p->regs + 0x1c30, 0x0000000000000000ull); + } out_be64(p->regs + 0x1c28, 0x0000000000000000ull); - out_be64(p->regs + 0x1c30, 0xde8fff91035743ffull); out_be64(p->regs + 0x1c40, 0x0000000000000000ull); out_be64(p->regs + 0x1c48, 0x0000000000000000ull); out_be64(p->regs + 0x1c50, 0x0000000000000000ull); |