Skip to content

Commit

Permalink
sh_eth: add support for RMIIMODE register
Browse files Browse the repository at this point in the history
This register is prsent on the r8a7790 SoC.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Horman authored and David S. Miller committed Jul 24, 2013
1 parent 9225b23 commit 55754f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ static const u16 sh_eth_offset_fast_rcar[SH_ETH_MAX_REGISTER_OFFSET] = {
[RMCR] = 0x0258,
[TFUCR] = 0x0264,
[RFOCR] = 0x0268,
[RMIIMODE] = 0x026c,
[FCFTR] = 0x0270,
[TRIMD] = 0x027c,
};
Expand Down Expand Up @@ -1124,6 +1125,9 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
if (ret)
goto out;

if (mdp->cd->rmiimode)
sh_eth_write(ndev, 0x1, RMIIMODE);

/* Descriptor format */
sh_eth_ring_format(ndev);
if (mdp->cd->rpadir)
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/renesas/sh_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ enum {
EDOCR,
TFUCR,
RFOCR,
RMIIMODE,
FCFTR,
RPADIR,
TRIMD,
Expand Down Expand Up @@ -482,6 +483,7 @@ struct sh_eth_cpu_data {
unsigned hw_crc:1; /* E-DMAC have CSMR */
unsigned select_mii:1; /* EtherC have RMII_MII (MII select register) */
unsigned shift_rd0:1; /* shift Rx descriptor word 0 right by 16 */
unsigned rmiimode:1; /* EtherC has RMIIMODE register */
};

struct sh_eth_private {
Expand Down

0 comments on commit 55754f1

Please sign in to comment.