ixgb_osdep.h 959 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright(c) 1999 - 2008 Intel Corporation. */
  3. /* glue for the OS independent part of ixgb
  4. * includes register access macros
  5. */
  6. #ifndef _IXGB_OSDEP_H_
  7. #define _IXGB_OSDEP_H_
  8. #include <linux/types.h>
  9. #include <linux/delay.h>
  10. #include <asm/io.h>
  11. #include <linux/interrupt.h>
  12. #include <linux/sched.h>
  13. #include <linux/if_ether.h>
  14. #undef ASSERT
  15. #define ASSERT(x) BUG_ON(!(x))
  16. #define ENTER() pr_debug("%s\n", __func__);
  17. #define IXGB_WRITE_REG(a, reg, value) ( \
  18. writel((value), ((a)->hw_addr + IXGB_##reg)))
  19. #define IXGB_READ_REG(a, reg) ( \
  20. readl((a)->hw_addr + IXGB_##reg))
  21. #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
  22. writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
  23. #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
  24. readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
  25. #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
  26. #define IXGB_MEMCPY memcpy
  27. #endif /* _IXGB_OSDEP_H_ */