0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _IXGB_OSDEP_H_
0009 #define _IXGB_OSDEP_H_
0010
0011 #include <linux/types.h>
0012 #include <linux/delay.h>
0013 #include <asm/io.h>
0014 #include <linux/interrupt.h>
0015 #include <linux/sched.h>
0016 #include <linux/if_ether.h>
0017
0018 #undef ASSERT
0019 #define ASSERT(x) BUG_ON(!(x))
0020
0021 #define ENTER() pr_debug("%s\n", __func__);
0022
0023 #define IXGB_WRITE_REG(a, reg, value) ( \
0024 writel((value), ((a)->hw_addr + IXGB_##reg)))
0025
0026 #define IXGB_READ_REG(a, reg) ( \
0027 readl((a)->hw_addr + IXGB_##reg))
0028
0029 #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
0030 writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
0031
0032 #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
0033 readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
0034
0035 #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
0036
0037 #define IXGB_MEMCPY memcpy
0038
0039 #endif