summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorNarayan Reddy <narayanr@nvidia.com>2016-09-30 09:25:39 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-17 13:48:13 -0500
commite6312549e8f52a3d3aada91ce4a4cc01bee4449c (patch)
treeed14210c773b514f93362e4181c43106e6bee5a2 /drivers/net
parent5494be36c9d67fa56d1d12416754f53731cc4ddc (diff)
net: eqos: disable tristate logic for MODS
Bug 1814532 Change-Id: Ie82cb5e846d7e8a827f3bb4ba071a8f46ac9f7d9 Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-on: http://git-master/r/1230100 Reviewed-on: http://git-master/r/1229996 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/nvidia/eqos/Kconfig.t18x19
-rw-r--r--drivers/net/ethernet/nvidia/eqos/Makefile.t18x5
-rw-r--r--drivers/net/ethernet/nvidia/eqos/init.c13
3 files changed, 28 insertions, 9 deletions
diff --git a/drivers/net/ethernet/nvidia/eqos/Kconfig.t18x b/drivers/net/ethernet/nvidia/eqos/Kconfig.t18x
index a8da5e13a..4fd60b15e 100644
--- a/drivers/net/ethernet/nvidia/eqos/Kconfig.t18x
+++ b/drivers/net/ethernet/nvidia/eqos/Kconfig.t18x
@@ -29,11 +29,22 @@ config DISABLE_VLAN_FWD_TO_REAL_IF
29 default n 29 default n
30 30
31 ---help--- 31 ---help---
32 This disables support to forward VLAN tagged packets to the 32 This disables support to forward VLAN tagged packets to the
33 Real interface. If enabled, VLAN tagged packets are only forwarded 33 Real interface. If enabled, VLAN tagged packets are only forwarded
34 to the Virtual interface. 34 to the Virtual interface.
35 35
36 If unsure, say n. 36 If unsure, say n.
37
38config DISABLE_EQOS_CTRL_TRISTATE
39 bool "tristate tx signal when cable removed "
40 depends on EQOS
41 default n
42
43 ---help---
44 This disables the logic to make sure that tx signal is tristated
45 when cable is not attached.
46
47 If unsure, say n.
37 48
38config DEBUGFS_OBJ 49config DEBUGFS_OBJ
39 bool "Enable DEBUGFS_OBJ" 50 bool "Enable DEBUGFS_OBJ"
diff --git a/drivers/net/ethernet/nvidia/eqos/Makefile.t18x b/drivers/net/ethernet/nvidia/eqos/Makefile.t18x
index 0207e0a8f..a954463fb 100644
--- a/drivers/net/ethernet/nvidia/eqos/Makefile.t18x
+++ b/drivers/net/ethernet/nvidia/eqos/Makefile.t18x
@@ -17,6 +17,11 @@ ccflags-y += -DHWA_FPGA_ONLY
17## default build settings. 17## default build settings.
18ccflags-y += -DCONFIG_PTPSUPPORT_OBJ 18ccflags-y += -DCONFIG_PTPSUPPORT_OBJ
19 19
20## enable this only for MODS verification
21ifeq ($(CONFIG_DISABLE_EQOS_CTRL_TRISTATE),y)
22ccflags-y += -DDISABLE_TRISTATE
23endif
24
20obj-$(CONFIG_EQOS) += eqos.o 25obj-$(CONFIG_EQOS) += eqos.o
21 26
22eqos-y += dev.o 27eqos-y += dev.o
diff --git a/drivers/net/ethernet/nvidia/eqos/init.c b/drivers/net/ethernet/nvidia/eqos/init.c
index 4a6675ec1..a905c661e 100644
--- a/drivers/net/ethernet/nvidia/eqos/init.c
+++ b/drivers/net/ethernet/nvidia/eqos/init.c
@@ -885,12 +885,13 @@ int eqos_probe(struct platform_device *pdev)
885 } 885 }
886 DBGPR("phyirq = %d\n", phyirq); 886 DBGPR("phyirq = %d\n", phyirq);
887 887
888#ifndef DISABLE_TRISTATE
888 pdata->prod_list = devm_tegra_prod_get(&pdev->dev); 889 pdata->prod_list = devm_tegra_prod_get(&pdev->dev);
889 if (IS_ERR(pdata->prod_list)) { 890 if (IS_ERR(pdata->prod_list)) {
890 dev_info(&pdev->dev, "No prod values found\n"); 891 dev_info(&pdev->dev, "No prod values found\n");
891 pdata->prod_list = NULL; 892 pdata->prod_list = NULL;
892 } 893 }
893 894#endif
894 /* calibrate pad */ 895 /* calibrate pad */
895 ret = hw_if->pad_calibrate(pdata); 896 ret = hw_if->pad_calibrate(pdata);
896 if (ret < 0) 897 if (ret < 0)
@@ -964,10 +965,12 @@ int eqos_probe(struct platform_device *pdev)
964 dev_err(pdata->dev, "Failed to map PAD registers\n"); 965 dev_err(pdata->dev, "Failed to map PAD registers\n");
965 return -EADDRNOTAVAIL; 966 return -EADDRNOTAVAIL;
966 } 967 }
967 if (tegra_prod_set_by_name(&pdata->pads, "tx_tristate_enable", 968 if (pdata->prod_list) {
968 pdata->prod_list)) { 969 if (tegra_prod_set_by_name(&pdata->pads, "tx_tristate_enable",
969 dev_info(&pdata->pdev->dev, 970 pdata->prod_list)) {
970 "failed to enable pad prod settings\n"); 971 dev_info(&pdata->pdev->dev,
972 "failed to enable pad prod settings\n");
973 }
971 } 974 }
972 pdata->num_chans = num_chans; 975 pdata->num_chans = num_chans;
973 pdata->rx_buffer_len = EQOS_RX_BUF_LEN; 976 pdata->rx_buffer_len = EQOS_RX_BUF_LEN;