diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-06 12:09:52 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-12-08 11:34:20 +1100 |
commit | aed1fbe848ec7dcfef5c2831ab779ae9c21b41f6 (patch) | |
tree | 55bd5326c2fc4bbe66627812c96a3f7091bbeb9a /doc | |
parent | 95edf12c0872ef59475d6d2afc64865d2e923b71 (diff) | |
download | skiboot-aed1fbe848ec7dcfef5c2831ab779ae9c21b41f6.zip skiboot-aed1fbe848ec7dcfef5c2831ab779ae9c21b41f6.tar.gz skiboot-aed1fbe848ec7dcfef5c2831ab779ae9c21b41f6.tar.bz2 |
phb3: Trick to allow control of the PCIe link width and speed
This implements a hook inside OPAL that catches 16 and 32 bit writes
to the link status register of the PHB.
It allows you to write a new speed or a new width, and OPAL will then
cause the PHB to renegociate.
Example:
First read the link status on PHB4:
setpci -s 0004:00:00.0 0x5a.w
a103
It's at x16 Gen3 speed (8GT/s)
bits 0x0ff0 are the width and 0x000f the speed. The width can be
1 to 16 and the speed 1 to 3 (2.5, 5 and 8GT/s)
Then try to bring it down to 1x Gen1 :
setpci -s 0004:00:00.0 0x5a.w=0xa011
Observe the result in the PHB:
/ # lspci -s 0004:00:00.0 -vv
0004:00:00.0 PCI bridge: IBM Device 03dc (prog-if 00 [Normal decode])
.../...
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive+ BWMgmt- ABWMgmt+
And in the device:
/ # lspci -s 0004:01:00.0 -vv
.../...
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions