blob: 24ba3642bd89aeaabc113407eb2de6d92f13602a [file] [log] [blame]
josh.h.morris@us.ibm.com8722ff82013-02-05 14:15:02 +01001/*
2* Filename: rsxx.h
3*
4*
5* Authors: Joshua Morris <josh.h.morris@us.ibm.com>
6* Philip Kelleher <pjk1939@linux.vnet.ibm.com>
7*
8* (C) Copyright 2013 IBM Corporation
9*
10* This program is free software; you can redistribute it and/or
11* modify it under the terms of the GNU General Public License as
12* published by the Free Software Foundation; either version 2 of the
13* License, or (at your option) any later version.
14*
15* This program is distributed in the hope that it will be useful, but
16* WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18* General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with this program; if not, write to the Free Software Foundation,
22* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23*/
24
25#ifndef __RSXX_H__
26#define __RSXX_H__
27
28/*----------------- IOCTL Definitions -------------------*/
29
Philip J Kelleherf3791202013-02-25 12:27:46 -060030#define RSXX_MAX_DATA 8
31
josh.h.morris@us.ibm.com8722ff82013-02-05 14:15:02 +010032struct rsxx_reg_access {
33 __u32 addr;
34 __u32 cnt;
35 __u32 stat;
36 __u32 stream;
Philip J Kelleherf3791202013-02-25 12:27:46 -060037 __u32 data[RSXX_MAX_DATA];
josh.h.morris@us.ibm.com8722ff82013-02-05 14:15:02 +010038};
39
Philip J Kelleherf3791202013-02-25 12:27:46 -060040#define RSXX_MAX_REG_CNT (RSXX_MAX_DATA * (sizeof(__u32)))
Philip J Kelleherc206c702013-02-18 21:35:59 +010041
josh.h.morris@us.ibm.com8722ff82013-02-05 14:15:02 +010042#define RSXX_IOC_MAGIC 'r'
43
44#define RSXX_GETREG _IOWR(RSXX_IOC_MAGIC, 0x20, struct rsxx_reg_access)
45#define RSXX_SETREG _IOWR(RSXX_IOC_MAGIC, 0x21, struct rsxx_reg_access)
46
47#endif /* __RSXX_H_ */