Commit e5fcfc1f authored by Joe Perches's avatar Joe Perches Committed by Michael Grzeschik

arcnet: Add arcnet_<I/O> macros

arcnet uses an I/O scheme which can align I/O addresses to word boundaries
on different architectures.

Add arcnet specific macros which can hide this alignment calculation.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
parent 4e299b92
...@@ -342,5 +342,30 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb, ...@@ -342,5 +342,30 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
struct net_device *dev); struct net_device *dev);
void arcnet_timeout(struct net_device *dev); void arcnet_timeout(struct net_device *dev);
/* I/O equivalents */
/* addr and offset allow register like names to define the actual IO address.
* A configuration option multiplies the offset for alignment.
*/
#define arcnet_inb(addr, offset) \
inb((addr) + (offset))
#define arcnet_outb(value, addr, offset) \
outb(value, (addr) + (offset))
#define arcnet_insb(addr, offset, buffer, count) \
insb((addr) + (offset), buffer, count)
#define arcnet_outsb(addr, offset, buffer, count) \
outsb((addr) + (offset), buffer, count)
#define arcnet_inw(addr, offset) \
inw((addr) + (offset))
#define arcnet_outw(value, addr, offset) \
outw(value, (addr) + (offset))
#define arcnet_insw(addr, offset, buffer, count) \
insw((addr) + (offset), buffer, count)
#define arcnet_outsw(addr, offset, buffer, count) \
outsw((addr) + (offset), buffer, count)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_ARCDEVICE_H */ #endif /* _LINUX_ARCDEVICE_H */
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