Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

authored by

Joe Perches and committed by
Michael Grzeschik
e5fcfc1f 4e299b92

+25
+25
drivers/net/arcnet/arcdevice.h
··· 342 342 struct net_device *dev); 343 343 void arcnet_timeout(struct net_device *dev); 344 344 345 + /* I/O equivalents */ 346 + 347 + /* addr and offset allow register like names to define the actual IO address. 348 + * A configuration option multiplies the offset for alignment. 349 + */ 350 + #define arcnet_inb(addr, offset) \ 351 + inb((addr) + (offset)) 352 + #define arcnet_outb(value, addr, offset) \ 353 + outb(value, (addr) + (offset)) 354 + 355 + #define arcnet_insb(addr, offset, buffer, count) \ 356 + insb((addr) + (offset), buffer, count) 357 + #define arcnet_outsb(addr, offset, buffer, count) \ 358 + outsb((addr) + (offset), buffer, count) 359 + 360 + #define arcnet_inw(addr, offset) \ 361 + inw((addr) + (offset)) 362 + #define arcnet_outw(value, addr, offset) \ 363 + outw(value, (addr) + (offset)) 364 + 365 + #define arcnet_insw(addr, offset, buffer, count) \ 366 + insw((addr) + (offset), buffer, count) 367 + #define arcnet_outsw(addr, offset, buffer, count) \ 368 + outsw((addr) + (offset), buffer, count) 369 + 345 370 #endif /* __KERNEL__ */ 346 371 #endif /* _LINUX_ARCDEVICE_H */