diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2011-09-27 21:48:58 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-28 13:41:50 -0400 |
commit | ae70644df780c0e87f1705fda932e7cb1bdb2074 (patch) | |
tree | 389689f9a84c511d99719d274f9cf8577a21e2ea /drivers/net/ethernet/renesas/sh_eth.h | |
parent | fd734c6f25aea4b2b44b045e489aec67b388577e (diff) |
net: sh_eth: use ioremap()
This patch also changes writel/readl to iowrite32/ioread32.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.h')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h index c3048a6ba67..78e586ecdea 100644 --- a/drivers/net/ethernet/renesas/sh_eth.h +++ b/drivers/net/ethernet/renesas/sh_eth.h @@ -762,6 +762,7 @@ struct sh_eth_private { struct platform_device *pdev; struct sh_eth_cpu_data *cd; const u16 *reg_offset; + void __iomem *addr; void __iomem *tsu_addr; dma_addr_t rx_desc_dma; dma_addr_t tx_desc_dma; @@ -811,7 +812,7 @@ static inline void sh_eth_write(struct net_device *ndev, unsigned long data, { struct sh_eth_private *mdp = netdev_priv(ndev); - writel(data, ndev->base_addr + mdp->reg_offset[enum_index]); + iowrite32(data, mdp->addr + mdp->reg_offset[enum_index]); } static inline unsigned long sh_eth_read(struct net_device *ndev, @@ -819,19 +820,19 @@ static inline unsigned long sh_eth_read(struct net_device *ndev, { struct sh_eth_private *mdp = netdev_priv(ndev); - return readl(ndev->base_addr + mdp->reg_offset[enum_index]); + return ioread32(mdp->addr + mdp->reg_offset[enum_index]); } static inline void sh_eth_tsu_write(struct sh_eth_private *mdp, unsigned long data, int enum_index) { - writel(data, mdp->tsu_addr + mdp->reg_offset[enum_index]); + iowrite32(data, mdp->tsu_addr + mdp->reg_offset[enum_index]); } static inline unsigned long sh_eth_tsu_read(struct sh_eth_private *mdp, int enum_index) { - return readl(mdp->tsu_addr + mdp->reg_offset[enum_index]); + return ioread32(mdp->tsu_addr + mdp->reg_offset[enum_index]); } #endif /* #ifndef __SH_ETH_H__ */ |