mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
nvethernet: add support for RIWT
This support enables the configuration of Receive Interrupt Watchdog Timer register which indicates the watchdog timeout for Receive Interrupt (RI) from the DMA. Bug 200512422 Bug 2624476 Change-Id: I01bf170faa3c0f337d433eb19ebec49270483e18 Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2139369 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
f71600879c
commit
481b69b58a
@@ -3017,6 +3017,22 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
|
||||
osi_core->dcs_en = OSI_DISABLE;
|
||||
}
|
||||
|
||||
/* RIWT value to be set */
|
||||
ret = of_property_read_u32(np, "nvidia,rx_riwt", &osi_dma->rx_riwt);
|
||||
if (ret < 0) {
|
||||
osi_dma->use_riwt = OSI_DISABLE;
|
||||
} else {
|
||||
if ((osi_dma->rx_riwt > OSI_MAX_RX_COALESCE_USEC) ||
|
||||
(osi_dma->rx_riwt < OSI_MIN_RX_COALESCE_USEC)) {
|
||||
dev_err(dev,
|
||||
"invalid rx_riwt, must be inrange %d to %d\n",
|
||||
OSI_MIN_RX_COALESCE_USEC,
|
||||
OSI_MAX_RX_COALESCE_USEC);
|
||||
return -EINVAL;
|
||||
}
|
||||
osi_dma->use_riwt = OSI_ENABLE;
|
||||
}
|
||||
|
||||
ret = ether_parse_phy_dt(pdata, np);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to parse PHY DT\n");
|
||||
|
||||
Reference in New Issue
Block a user