aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ravb.c
diff options
context:
space:
mode:
authorTom Rini2019-05-06 07:18:51 -0400
committerTom Rini2019-05-06 07:19:31 -0400
commit44237e272f1eac3b026709e76333a07b2d3a3523 (patch)
tree43c87a14ae5142c31417bbee904b60a3533ef518 /drivers/net/ravb.c
parent8b77ea90a7055f1da2931baca03d102dfa08aa36 (diff)
parent41e30dcf87962e4bcc8d4197b3d808af14f71e92 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-sh
- Various pinctrl / gpio fixes for R-Car
Diffstat (limited to 'drivers/net/ravb.c')
-rw-r--r--drivers/net/ravb.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 749562db960..11abe5e0c9e 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -46,6 +46,8 @@
#define CSR_OPS 0x0000000F
#define CSR_OPS_CONFIG BIT(1)
+#define APSR_TDM BIT(14)
+
#define TCCR_TSRQ0 BIT(0)
#define RFLR_RFL_MIN 0x05EE
@@ -389,9 +391,14 @@ static int ravb_dmac_init(struct udevice *dev)
/* FIFO size set */
writel(0x00222210, eth->iobase + RAVB_REG_TGC);
- /* Delay CLK: 2ns */
- if (pdata->max_speed == 1000)
- writel(BIT(14), eth->iobase + RAVB_REG_APSR);
+ /* Delay CLK: 2ns (not applicable on R-Car E3/D3) */
+ if ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A77990) ||
+ (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A77995))
+ return 0;
+
+ if ((pdata->phy_interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+ (pdata->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID))
+ writel(APSR_TDM, eth->iobase + RAVB_REG_APSR);
return 0;
}