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