gianfar: Replace spin_event_timeout() with arch independent
Use arch independent code to replace the powerpc dependent spin_event_timeout() from gfar_halt_nodisable(). Added GRS/GTS read accessors to clean-up the implementation of gfar_halt_nodisable(). Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
83bfc3c476
commit
a4feee89ce
@@ -1226,6 +1226,21 @@ static inline void gfar_write_isrg(struct gfar_private *priv)
|
||||
}
|
||||
}
|
||||
|
||||
static inline int gfar_is_dma_stopped(struct gfar_private *priv)
|
||||
{
|
||||
struct gfar __iomem *regs = priv->gfargrp[0].regs;
|
||||
|
||||
return ((gfar_read(®s->ievent) & (IEVENT_GRSC | IEVENT_GTSC)) ==
|
||||
(IEVENT_GRSC | IEVENT_GTSC));
|
||||
}
|
||||
|
||||
static inline int gfar_is_rx_dma_stopped(struct gfar_private *priv)
|
||||
{
|
||||
struct gfar __iomem *regs = priv->gfargrp[0].regs;
|
||||
|
||||
return gfar_read(®s->ievent) & IEVENT_GRSC;
|
||||
}
|
||||
|
||||
irqreturn_t gfar_receive(int irq, void *dev_id);
|
||||
int startup_gfar(struct net_device *dev);
|
||||
void stop_gfar(struct net_device *dev);
|
||||
|
Reference in New Issue
Block a user