of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / powerpc / include / uapi / asm / opal-prd.h
blob319ff4a2615860ebb3d927b5d15430f0717452ce
1 /*
2 * OPAL Runtime Diagnostics interface driver
3 * Supported on POWERNV platform
5 * (C) Copyright IBM 2015
7 * Author: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
8 * Author: Jeremy Kerr <jk@ozlabs.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
13 * any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #ifndef _UAPI_ASM_POWERPC_OPAL_PRD_H_
22 #define _UAPI_ASM_POWERPC_OPAL_PRD_H_
24 #include <linux/types.h>
26 /**
27 * The version of the kernel interface of the PRD system. This describes the
28 * interface available for the /dev/opal-prd device. The actual PRD message
29 * layout and content is private to the firmware <--> userspace interface, so
30 * is not covered by this versioning.
32 * Future interface versions are backwards-compatible; if a later kernel
33 * version is encountered, functionality provided in earlier versions
34 * will work.
36 #define OPAL_PRD_KERNEL_VERSION 1
38 #define OPAL_PRD_GET_INFO _IOR('o', 0x01, struct opal_prd_info)
39 #define OPAL_PRD_SCOM_READ _IOR('o', 0x02, struct opal_prd_scom)
40 #define OPAL_PRD_SCOM_WRITE _IOW('o', 0x03, struct opal_prd_scom)
42 #ifndef __ASSEMBLY__
44 struct opal_prd_info {
45 __u64 version;
46 __u64 reserved[3];
49 struct opal_prd_scom {
50 __u64 chip;
51 __u64 addr;
52 __u64 data;
53 __s64 rc;
56 #endif /* __ASSEMBLY__ */
58 #endif /* _UAPI_ASM_POWERPC_OPAL_PRD_H */