Commit 55754f19 authored by Simon Horman's avatar Simon Horman Committed by David S. Miller

sh_eth: add support for RMIIMODE register

This register is prsent on the r8a7790 SoC.
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9225b230
...@@ -189,6 +189,7 @@ static const u16 sh_eth_offset_fast_rcar[SH_ETH_MAX_REGISTER_OFFSET] = { ...@@ -189,6 +189,7 @@ static const u16 sh_eth_offset_fast_rcar[SH_ETH_MAX_REGISTER_OFFSET] = {
[RMCR] = 0x0258, [RMCR] = 0x0258,
[TFUCR] = 0x0264, [TFUCR] = 0x0264,
[RFOCR] = 0x0268, [RFOCR] = 0x0268,
[RMIIMODE] = 0x026c,
[FCFTR] = 0x0270, [FCFTR] = 0x0270,
[TRIMD] = 0x027c, [TRIMD] = 0x027c,
}; };
...@@ -1124,6 +1125,9 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start) ...@@ -1124,6 +1125,9 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
if (ret) if (ret)
goto out; goto out;
if (mdp->cd->rmiimode)
sh_eth_write(ndev, 0x1, RMIIMODE);
/* Descriptor format */ /* Descriptor format */
sh_eth_ring_format(ndev); sh_eth_ring_format(ndev);
if (mdp->cd->rpadir) if (mdp->cd->rpadir)
......
...@@ -60,6 +60,7 @@ enum { ...@@ -60,6 +60,7 @@ enum {
EDOCR, EDOCR,
TFUCR, TFUCR,
RFOCR, RFOCR,
RMIIMODE,
FCFTR, FCFTR,
RPADIR, RPADIR,
TRIMD, TRIMD,
...@@ -482,6 +483,7 @@ struct sh_eth_cpu_data { ...@@ -482,6 +483,7 @@ struct sh_eth_cpu_data {
unsigned hw_crc:1; /* E-DMAC have CSMR */ unsigned hw_crc:1; /* E-DMAC have CSMR */
unsigned select_mii:1; /* EtherC have RMII_MII (MII select register) */ unsigned select_mii:1; /* EtherC have RMII_MII (MII select register) */
unsigned shift_rd0:1; /* shift Rx descriptor word 0 right by 16 */ unsigned shift_rd0:1; /* shift Rx descriptor word 0 right by 16 */
unsigned rmiimode:1; /* EtherC has RMIIMODE register */
}; };
struct sh_eth_private { struct sh_eth_private {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment