diff options
author | Tejal Kudav <tkudav@nvidia.com> | 2018-05-24 08:50:28 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:06 -0400 |
commit | 0b2f2f06a7d0424359d1b6e275789ceef1a8a8c3 (patch) | |
tree | 989279d942ba31d0d3bef7f2fbbb74f75dff2c41 /drivers/gpu/nvgpu/gv100/nvlink_gv100.c | |
parent | 328a7bd3ffc9590c0c432724d45da9f25732c2a1 (diff) |
gpu: nvgpu: nvlink: Add HAL for RXDET
RXDET is supported only on nvlink 2.2 devices and forward.
Add HAL to run RXDET selectively based on chip. RXDET needs to be
done after the links are out of reset but before any other link
level initialization.
minion_send_cmd is also made non-static to support RXDET
functionality.
JIRA NVLINK-160
Change-Id: Ic65b8dbc7281743f62072089ff3c805521ac9b38
Signed-off-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1729525
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv100/nvlink_gv100.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index 7258b9e9..098aae0e 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c | |||
@@ -735,10 +735,10 @@ static u32 gv100_nvlink_minion_command_complete(struct gk20a *g, u32 link_id) | |||
735 | /* | 735 | /* |
736 | * Send Minion command (can be async) | 736 | * Send Minion command (can be async) |
737 | */ | 737 | */ |
738 | static u32 gv100_nvlink_minion_send_command(struct gk20a *g, | 738 | int gv100_nvlink_minion_send_command(struct gk20a *g, u32 link_id, |
739 | u32 link_id, u32 command, u32 scratch_0, bool sync) | 739 | u32 command, u32 scratch_0, bool sync) |
740 | { | 740 | { |
741 | u32 err = 0; | 741 | int err = 0; |
742 | 742 | ||
743 | /* Check last command succeded */ | 743 | /* Check last command succeded */ |
744 | err = gv100_nvlink_minion_command_complete(g, link_id); | 744 | err = gv100_nvlink_minion_command_complete(g, link_id); |
@@ -1579,6 +1579,15 @@ static int gv100_nvlink_enable_links_pre_top(struct gk20a *g, u32 links) | |||
1579 | IOCTRL_REG_WR32(g, ioctrl_debug_reset_r(), reg); | 1579 | IOCTRL_REG_WR32(g, ioctrl_debug_reset_r(), reg); |
1580 | nvgpu_udelay(delay); | 1580 | nvgpu_udelay(delay); |
1581 | 1581 | ||
1582 | /* Before doing any link initialization, run RXDET to check | ||
1583 | * if link is connected on other end. | ||
1584 | */ | ||
1585 | if (g->ops.nvlink.rxdet) { | ||
1586 | err = g->ops.nvlink.rxdet(g, link_id); | ||
1587 | if (err) | ||
1588 | return err; | ||
1589 | } | ||
1590 | |||
1582 | /* Enable Link DLPL for AN0 */ | 1591 | /* Enable Link DLPL for AN0 */ |
1583 | reg = DLPL_REG_RD32(g, link_id, nvl_link_config_r()); | 1592 | reg = DLPL_REG_RD32(g, link_id, nvl_link_config_r()); |
1584 | reg = set_field(reg, nvl_link_config_link_en_m(), | 1593 | reg = set_field(reg, nvl_link_config_link_en_m(), |