ixgb_osdep.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*******************************************************************************
  2. Intel PRO/10GbE Linux driver
  3. Copyright(c) 1999 - 2008 Intel Corporation.
  4. This program is free software; you can redistribute it and/or modify it
  5. under the terms and conditions of the GNU General Public License,
  6. version 2, as published by the Free Software Foundation.
  7. This program is distributed in the hope it will be useful, but WITHOUT
  8. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  10. more details.
  11. You should have received a copy of the GNU General Public License along with
  12. this program; if not, write to the Free Software Foundation, Inc.,
  13. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  14. The full GNU General Public License is included in this distribution in
  15. the file called "COPYING".
  16. Contact Information:
  17. Linux NICS <linux.nics@intel.com>
  18. e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  19. Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  20. *******************************************************************************/
  21. /* glue for the OS independent part of ixgb
  22. * includes register access macros
  23. */
  24. #ifndef _IXGB_OSDEP_H_
  25. #define _IXGB_OSDEP_H_
  26. #include <linux/types.h>
  27. #include <linux/delay.h>
  28. #include <asm/io.h>
  29. #include <linux/interrupt.h>
  30. #include <linux/sched.h>
  31. #include <linux/if_ether.h>
  32. #undef ASSERT
  33. #define ASSERT(x) BUG_ON(!(x))
  34. #define ENTER() pr_debug("%s\n", __func__);
  35. #define IXGB_WRITE_REG(a, reg, value) ( \
  36. writel((value), ((a)->hw_addr + IXGB_##reg)))
  37. #define IXGB_READ_REG(a, reg) ( \
  38. readl((a)->hw_addr + IXGB_##reg))
  39. #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
  40. writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
  41. #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
  42. readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
  43. #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
  44. #define IXGB_MEMCPY memcpy
  45. #endif /* _IXGB_OSDEP_H_ */