drivers: hv: vmbus: Replace page definition with Hyper-V specific one
[sfrench/cifs-2.6.git] / arch / arm / mach-netx / include / mach / pfifo.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * arch/arm/mach-netx/include/mach/pfifo.h
4  *
5  * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
6  */
7
8
9 #ifndef ASM_ARCH_PFIFO_H
10 #define ASM_ARCH_PFIFO_H
11
12 static inline int pfifo_push(int no, unsigned int pointer)
13 {
14         writel(pointer, NETX_PFIFO_BASE(no));
15         return 0;
16 }
17
18 static inline unsigned int pfifo_pop(int no)
19 {
20         return readl(NETX_PFIFO_BASE(no));
21 }
22
23 static inline int pfifo_fill_level(int no)
24 {
25
26         return readl(NETX_PFIFO_FILL_LEVEL(no));
27 }
28
29 static inline int pfifo_full(int no)
30 {
31         return readl(NETX_PFIFO_FULL) & (1<<no) ? 1 : 0;
32 }
33
34 static inline int pfifo_empty(int no)
35 {
36         return readl(NETX_PFIFO_EMPTY) & (1<<no) ? 1 : 0;
37 }
38
39 int pfifo_request(unsigned int pfifo_mask);
40 void pfifo_free(unsigned int pfifo_mask);
41
42 #endif /* ASM_ARCH_PFIFO_H */