18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci* Filename: rsxx.h
48c2ecf20Sopenharmony_ci*
58c2ecf20Sopenharmony_ci* Authors: Joshua Morris <josh.h.morris@us.ibm.com>
68c2ecf20Sopenharmony_ci*	Philip Kelleher <pjk1939@linux.vnet.ibm.com>
78c2ecf20Sopenharmony_ci*
88c2ecf20Sopenharmony_ci* (C) Copyright 2013 IBM Corporation
98c2ecf20Sopenharmony_ci*/
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef __RSXX_H__
128c2ecf20Sopenharmony_ci#define __RSXX_H__
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*----------------- IOCTL Definitions -------------------*/
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define RSXX_MAX_DATA 8
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct rsxx_reg_access {
198c2ecf20Sopenharmony_ci	__u32 addr;
208c2ecf20Sopenharmony_ci	__u32 cnt;
218c2ecf20Sopenharmony_ci	__u32 stat;
228c2ecf20Sopenharmony_ci	__u32 stream;
238c2ecf20Sopenharmony_ci	__u32 data[RSXX_MAX_DATA];
248c2ecf20Sopenharmony_ci};
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define RSXX_MAX_REG_CNT	(RSXX_MAX_DATA * (sizeof(__u32)))
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#define RSXX_IOC_MAGIC 'r'
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#define RSXX_GETREG _IOWR(RSXX_IOC_MAGIC, 0x20, struct rsxx_reg_access)
318c2ecf20Sopenharmony_ci#define RSXX_SETREG _IOWR(RSXX_IOC_MAGIC, 0x21, struct rsxx_reg_access)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif /* __RSXX_H_ */
34