gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / net / ethernet / intel / ixgb / ixgb_osdep.h
blob7bd54efa698d318052ae31035f14e9eb637f4150
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 1999 - 2008 Intel Corporation. */
4 /* glue for the OS independent part of ixgb
5 * includes register access macros
6 */
8 #ifndef _IXGB_OSDEP_H_
9 #define _IXGB_OSDEP_H_
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>
18 #undef ASSERT
19 #define ASSERT(x) BUG_ON(!(x))
21 #define ENTER() pr_debug("%s\n", __func__);
23 #define IXGB_WRITE_REG(a, reg, value) ( \
24 writel((value), ((a)->hw_addr + IXGB_##reg)))
26 #define IXGB_READ_REG(a, reg) ( \
27 readl((a)->hw_addr + IXGB_##reg))
29 #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \
30 writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2))))
32 #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \
33 readl((a)->hw_addr + IXGB_##reg + ((offset) << 2)))
35 #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)
37 #define IXGB_MEMCPY memcpy
39 #endif /* _IXGB_OSDEP_H_ */