18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  Functions for incremental construction of fcx enabled I/O control blocks.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *    Copyright IBM Corp. 2008
68c2ecf20Sopenharmony_ci *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef _ASM_S390_ITCW_H
108c2ecf20Sopenharmony_ci#define _ASM_S390_ITCW_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <linux/types.h>
138c2ecf20Sopenharmony_ci#include <asm/fcx.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define ITCW_OP_READ	0
168c2ecf20Sopenharmony_ci#define ITCW_OP_WRITE	1
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct itcw;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistruct tcw *itcw_get_tcw(struct itcw *itcw);
218c2ecf20Sopenharmony_cisize_t itcw_calc_size(int intrg, int max_tidaws, int intrg_max_tidaws);
228c2ecf20Sopenharmony_cistruct itcw *itcw_init(void *buffer, size_t size, int op, int intrg,
238c2ecf20Sopenharmony_ci		       int max_tidaws, int intrg_max_tidaws);
248c2ecf20Sopenharmony_cistruct dcw *itcw_add_dcw(struct itcw *itcw, u8 cmd, u8 flags, void *cd,
258c2ecf20Sopenharmony_ci			 u8 cd_count, u32 count);
268c2ecf20Sopenharmony_cistruct tidaw *itcw_add_tidaw(struct itcw *itcw, u8 flags, void *addr,
278c2ecf20Sopenharmony_ci			     u32 count);
288c2ecf20Sopenharmony_civoid itcw_set_data(struct itcw *itcw, void *addr, int use_tidal);
298c2ecf20Sopenharmony_civoid itcw_finalize(struct itcw *itcw);
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif /* _ASM_S390_ITCW_H */
32