diff options
author | Russell Currey <ruscur@russell.cc> | 2017-04-19 15:14:06 +1000 |
---|---|---|
committer | Michael Neuling <mikey@neuling.org> | 2017-04-19 17:36:14 +1000 |
commit | eee4c6990a9cae17daf818675e23cdbdbbc336b5 (patch) | |
tree | d03456531617d26b981314a9051da39cb1c6d2b3 /hw/phb4.c | |
parent | eeb74bc1fc955ec2679eca0101250dc463d52b8c (diff) | |
download | skiboot-eee4c6990a9cae17daf818675e23cdbdbbc336b5.zip skiboot-eee4c6990a9cae17daf818675e23cdbdbbc336b5.tar.gz skiboot-eee4c6990a9cae17daf818675e23cdbdbbc336b5.tar.bz2 |
phb4: Implement fence check
Fence detection is missing in PHB4, so implement it. The mechanism is the
exact same as in PHB3.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Diffstat (limited to 'hw/phb4.c')
-rw-r--r-- | hw/phb4.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -157,7 +157,14 @@ static inline void phb4_ioda_sel(struct phb4 *p, uint32_t table, /* Check if AIB is fenced via PBCQ NFIR */ static bool phb4_fenced(struct phb4 *p) { - // FIXME + uint64_t nfir; + + xscom_read(p->chip_id, p->pe_stk_xscom + 0x0, &nfir); + if (nfir & PPC_BIT(16)) { + p->flags |= PHB4_AIB_FENCED; + p->state = PHB4_STATE_FENCED; + return true; + } return false; } |