diff options
author | Dean Luick | 2015-12-01 21:38:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-12-21 22:51:55 +0100 |
commit | bbdeb33d2774ddc7475aab7868a5c447503a256e (patch) | |
tree | 0a2a4f7edc4b8afbd00c196a80d52e2853b04b85 /drivers/staging/rdma/hfi1/chip.c | |
parent | staging/rdma/hfi1: Fix qp.h comments (diff) | |
download | kernel-qcow2-linux-bbdeb33d2774ddc7475aab7868a5c447503a256e.tar.gz kernel-qcow2-linux-bbdeb33d2774ddc7475aab7868a5c447503a256e.tar.xz kernel-qcow2-linux-bbdeb33d2774ddc7475aab7868a5c447503a256e.zip |
staging/rdma/hfi1: Add one-time LCB reset
Add one-time LCB reset on driver load to pre-emptively work
around any LCB power cycle issues.
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/chip.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index bcbd831d2b73..62813052fc99 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -5896,6 +5896,23 @@ void init_qsfp(struct hfi1_pportdata *ppd) } } +/* + * Do a one-time initialize of the LCB block. + */ +static void init_lcb(struct hfi1_devdata *dd) +{ + /* the DC has been reset earlier in the driver load */ + + /* set LCB for cclk loopback on the port */ + write_csr(dd, DC_LCB_CFG_TX_FIFOS_RESET, 0x01); + write_csr(dd, DC_LCB_CFG_LANE_WIDTH, 0x00); + write_csr(dd, DC_LCB_CFG_REINIT_AS_SLAVE, 0x00); + write_csr(dd, DC_LCB_CFG_CNT_FOR_SKIP_STALL, 0x110); + write_csr(dd, DC_LCB_CFG_CLK_CNTR, 0x08); + write_csr(dd, DC_LCB_CFG_LOOPBACK, 0x02); + write_csr(dd, DC_LCB_CFG_TX_FIFOS_RESET, 0x00); +} + int bringup_serdes(struct hfi1_pportdata *ppd) { struct hfi1_devdata *dd = ppd->dd; @@ -5917,6 +5934,9 @@ int bringup_serdes(struct hfi1_pportdata *ppd) /* Set linkinit_reason on power up per OPA spec */ ppd->linkinit_reason = OPA_LINKINIT_REASON_LINKUP; + /* one-time init of the LCB */ + init_lcb(dd); + if (loopback) { ret = init_loopback(dd); if (ret < 0) |