Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright(c) 1999 - 2008 Intel Corporation. */
0003 
0004 /* glue for the OS independent part of ixgb
0005  * includes register access macros
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 /* _IXGB_OSDEP_H_ */