1
2
3
4
5
6
7
8 #ifndef _IXGB_OSDEP_H_
9 #define _IXGB_OSDEP_H_
10
11 #include <linux/types.h>
12 #include <linux/delay.h>
13 #include <asm/io.h>
14 #include <linux/interrupt.h>
15 #include <linux/sched.h>
16 #include <linux/if_ether.h>
17
18 #undef ASSERT
19 #define ASSERT(x) BUG_ON(!(x))
20
21 #define ENTER() pr_debug("%s\n", __func__);
22
23 #define IXGB_WRITE_REG(a, reg, value) ( \
24 writel((value), ((a)->hw_addr + IXGB_##reg)))
25
26 #define IXGB_READ_REG(a, reg) ( \
27 readl((a)->hw_addr + IXGB_##reg))
28
29 #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
30 writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
31
32 #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
33 readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
34
35 #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
36
37 #define IXGB_MEMCPY memcpy
38
39 #endif