Commit 0fe63247 authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by David S. Miller

net: korina: Remove nested helpers

Remove helpers, which are only used in one call site.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e42f1053
...@@ -142,12 +142,6 @@ struct korina_private { ...@@ -142,12 +142,6 @@ struct korina_private {
extern unsigned int idt_cpu_freq; extern unsigned int idt_cpu_freq;
static inline void korina_start_dma(struct dma_reg *ch, u32 dma_addr)
{
writel(0, &ch->dmandptr);
writel(dma_addr, &ch->dmadptr);
}
static inline void korina_abort_dma(struct net_device *dev, static inline void korina_abort_dma(struct net_device *dev,
struct dma_reg *ch) struct dma_reg *ch)
{ {
...@@ -164,11 +158,6 @@ static inline void korina_abort_dma(struct net_device *dev, ...@@ -164,11 +158,6 @@ static inline void korina_abort_dma(struct net_device *dev,
writel(0, &ch->dmandptr); writel(0, &ch->dmandptr);
} }
static inline void korina_chain_dma(struct dma_reg *ch, u32 dma_addr)
{
writel(dma_addr, &ch->dmandptr);
}
static void korina_abort_tx(struct net_device *dev) static void korina_abort_tx(struct net_device *dev)
{ {
struct korina_private *lp = netdev_priv(dev); struct korina_private *lp = netdev_priv(dev);
...@@ -183,18 +172,6 @@ static void korina_abort_rx(struct net_device *dev) ...@@ -183,18 +172,6 @@ static void korina_abort_rx(struct net_device *dev)
korina_abort_dma(dev, lp->rx_dma_regs); korina_abort_dma(dev, lp->rx_dma_regs);
} }
static void korina_start_rx(struct korina_private *lp,
struct dma_desc *rd)
{
korina_start_dma(lp->rx_dma_regs, CPHYSADDR(rd));
}
static void korina_chain_rx(struct korina_private *lp,
struct dma_desc *rd)
{
korina_chain_dma(lp->rx_dma_regs, CPHYSADDR(rd));
}
/* transmit packet */ /* transmit packet */
static int korina_send_packet(struct sk_buff *skb, struct net_device *dev) static int korina_send_packet(struct sk_buff *skb, struct net_device *dev)
{ {
...@@ -463,7 +440,7 @@ static int korina_rx(struct net_device *dev, int limit) ...@@ -463,7 +440,7 @@ static int korina_rx(struct net_device *dev, int limit)
rd->devcs = 0; rd->devcs = 0;
skb = lp->rx_skb[lp->rx_next_done]; skb = lp->rx_skb[lp->rx_next_done];
rd->ca = CPHYSADDR(skb->data); rd->ca = CPHYSADDR(skb->data);
korina_chain_rx(lp, rd); writel(CPHYSADDR(rd), &lp->rx_dma_regs->dmandptr);
} }
return count; return count;
...@@ -840,7 +817,8 @@ static int korina_init(struct net_device *dev) ...@@ -840,7 +817,8 @@ static int korina_init(struct net_device *dev)
writel(0, &lp->rx_dma_regs->dmas); writel(0, &lp->rx_dma_regs->dmas);
/* Start Rx DMA */ /* Start Rx DMA */
korina_start_rx(lp, &lp->rd_ring[0]); writel(0, &lp->rx_dma_regs->dmandptr);
writel(CPHYSADDR(&lp->rd_ring[0]), &lp->rx_dma_regs->dmadptr);
writel(readl(&lp->tx_dma_regs->dmasm) & writel(readl(&lp->tx_dma_regs->dmasm) &
~(DMA_STAT_FINI | DMA_STAT_ERR), ~(DMA_STAT_FINI | DMA_STAT_ERR),
......
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