1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 1999 - 2008 Intel Corporation. */
4 /* glue for the OS independent part of ixgb
5 * includes register access macros
11 #include <linux/types.h>
12 #include <linux/delay.h>
14 #include <linux/interrupt.h>
15 #include <linux/sched.h>
16 #include <linux/if_ether.h>
19 #define ASSERT(x) BUG_ON(!(x))
21 #define ENTER() pr_debug("%s\n", __func__);
23 #define IXGB_WRITE_REG(a, reg, value) ( \
24 writel((value), ((a)->hw_addr + IXGB_##reg)))
26 #define IXGB_READ_REG(a, reg) ( \
27 readl((a)->hw_addr + IXGB_##reg))
29 #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
30 writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
32 #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
33 readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
35 #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
37 #define IXGB_MEMCPY memcpy
39 #endif /* _IXGB_OSDEP_H_ */