xref: /OK3568_Linux_fs/kernel/arch/s390/include/asm/itcw.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  *  Functions for incremental construction of fcx enabled I/O control blocks.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  *    Copyright IBM Corp. 2008
6*4882a593Smuzhiyun  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef _ASM_S390_ITCW_H
10*4882a593Smuzhiyun #define _ASM_S390_ITCW_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/types.h>
13*4882a593Smuzhiyun #include <asm/fcx.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #define ITCW_OP_READ	0
16*4882a593Smuzhiyun #define ITCW_OP_WRITE	1
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun struct itcw;
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun struct tcw *itcw_get_tcw(struct itcw *itcw);
21*4882a593Smuzhiyun size_t itcw_calc_size(int intrg, int max_tidaws, int intrg_max_tidaws);
22*4882a593Smuzhiyun struct itcw *itcw_init(void *buffer, size_t size, int op, int intrg,
23*4882a593Smuzhiyun 		       int max_tidaws, int intrg_max_tidaws);
24*4882a593Smuzhiyun struct dcw *itcw_add_dcw(struct itcw *itcw, u8 cmd, u8 flags, void *cd,
25*4882a593Smuzhiyun 			 u8 cd_count, u32 count);
26*4882a593Smuzhiyun struct tidaw *itcw_add_tidaw(struct itcw *itcw, u8 flags, void *addr,
27*4882a593Smuzhiyun 			     u32 count);
28*4882a593Smuzhiyun void itcw_set_data(struct itcw *itcw, void *addr, int use_tidal);
29*4882a593Smuzhiyun void itcw_finalize(struct itcw *itcw);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif /* _ASM_S390_ITCW_H */
32