diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 02:38:43 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 02:38:43 -0400 |
| commit | 736163671bcb163fc82600b46c83dfa89d532d95 (patch) | |
| tree | 0639dc9d9fa180450b4e8fbda706eaae5f1876da /include/uapi/linux | |
| parent | d5483feda85a8f39ee2e940e279547c686aac30c (diff) | |
| parent | 1ef97fe4f8abd3317d5c3c860f990e02c2633959 (diff) | |
Merge branch 'for-4.12/dax' into libnvdimm-for-next
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/aspeed-lpc-ctrl.h | 60 | ||||
| -rw-r--r-- | include/uapi/linux/pps.h | 19 |
2 files changed, 79 insertions, 0 deletions
diff --git a/include/uapi/linux/aspeed-lpc-ctrl.h b/include/uapi/linux/aspeed-lpc-ctrl.h new file mode 100644 index 000000000000..f96fa995a3f0 --- /dev/null +++ b/include/uapi/linux/aspeed-lpc-ctrl.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2017 IBM Corp. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; either version | ||
| 7 | * 2 of the License, or (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _UAPI_LINUX_ASPEED_LPC_CTRL_H | ||
| 11 | #define _UAPI_LINUX_ASPEED_LPC_CTRL_H | ||
| 12 | |||
| 13 | #include <linux/ioctl.h> | ||
| 14 | |||
| 15 | /* Window types */ | ||
| 16 | #define ASPEED_LPC_CTRL_WINDOW_FLASH 1 | ||
| 17 | #define ASPEED_LPC_CTRL_WINDOW_MEMORY 2 | ||
| 18 | |||
| 19 | /* | ||
| 20 | * This driver provides a window for the host to access a BMC resource | ||
| 21 | * across the BMC <-> Host LPC bus. | ||
| 22 | * | ||
| 23 | * window_type: The BMC resource that the host will access through the | ||
| 24 | * window. BMC flash and BMC RAM. | ||
| 25 | * | ||
| 26 | * window_id: For each window type there may be multiple windows, | ||
| 27 | * these are referenced by ID. | ||
| 28 | * | ||
| 29 | * flags: Reserved for future use, this field is expected to be | ||
| 30 | * zeroed. | ||
| 31 | * | ||
| 32 | * addr: Address on the host LPC bus that the specified window should | ||
| 33 | * be mapped. This address must be power of two aligned. | ||
| 34 | * | ||
| 35 | * offset: Offset into the BMC window that should be mapped to the | ||
| 36 | * host (at addr). This must be a multiple of size. | ||
| 37 | * | ||
| 38 | * size: The size of the mapping. The smallest possible size is 64K. | ||
| 39 | * This must be power of two aligned. | ||
| 40 | * | ||
| 41 | */ | ||
| 42 | |||
| 43 | struct aspeed_lpc_ctrl_mapping { | ||
| 44 | __u8 window_type; | ||
| 45 | __u8 window_id; | ||
| 46 | __u16 flags; | ||
| 47 | __u32 addr; | ||
| 48 | __u32 offset; | ||
| 49 | __u32 size; | ||
| 50 | }; | ||
| 51 | |||
| 52 | #define __ASPEED_LPC_CTRL_IOCTL_MAGIC 0xb2 | ||
| 53 | |||
| 54 | #define ASPEED_LPC_CTRL_IOCTL_GET_SIZE _IOWR(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \ | ||
| 55 | 0x00, struct aspeed_lpc_ctrl_mapping) | ||
| 56 | |||
| 57 | #define ASPEED_LPC_CTRL_IOCTL_MAP _IOW(__ASPEED_LPC_CTRL_IOCTL_MAGIC, \ | ||
| 58 | 0x01, struct aspeed_lpc_ctrl_mapping) | ||
| 59 | |||
| 60 | #endif /* _UAPI_LINUX_ASPEED_LPC_CTRL_H */ | ||
diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h index a9bb1d93451a..c1cb3825a8bc 100644 --- a/include/uapi/linux/pps.h +++ b/include/uapi/linux/pps.h | |||
| @@ -55,6 +55,12 @@ struct pps_ktime { | |||
| 55 | __s32 nsec; | 55 | __s32 nsec; |
| 56 | __u32 flags; | 56 | __u32 flags; |
| 57 | }; | 57 | }; |
| 58 | |||
| 59 | struct pps_ktime_compat { | ||
| 60 | __s64 sec; | ||
| 61 | __s32 nsec; | ||
| 62 | __u32 flags; | ||
| 63 | } __attribute__((packed, aligned(4))); | ||
| 58 | #define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */ | 64 | #define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */ |
| 59 | 65 | ||
| 60 | struct pps_kinfo { | 66 | struct pps_kinfo { |
| @@ -65,6 +71,14 @@ struct pps_kinfo { | |||
| 65 | int current_mode; /* current mode bits */ | 71 | int current_mode; /* current mode bits */ |
| 66 | }; | 72 | }; |
| 67 | 73 | ||
| 74 | struct pps_kinfo_compat { | ||
| 75 | __u32 assert_sequence; /* seq. num. of assert event */ | ||
| 76 | __u32 clear_sequence; /* seq. num. of clear event */ | ||
| 77 | struct pps_ktime_compat assert_tu; /* time of assert event */ | ||
| 78 | struct pps_ktime_compat clear_tu; /* time of clear event */ | ||
| 79 | int current_mode; /* current mode bits */ | ||
| 80 | }; | ||
| 81 | |||
| 68 | struct pps_kparams { | 82 | struct pps_kparams { |
| 69 | int api_version; /* API version # */ | 83 | int api_version; /* API version # */ |
| 70 | int mode; /* mode bits */ | 84 | int mode; /* mode bits */ |
| @@ -114,6 +128,11 @@ struct pps_fdata { | |||
| 114 | struct pps_ktime timeout; | 128 | struct pps_ktime timeout; |
| 115 | }; | 129 | }; |
| 116 | 130 | ||
| 131 | struct pps_fdata_compat { | ||
| 132 | struct pps_kinfo_compat info; | ||
| 133 | struct pps_ktime_compat timeout; | ||
| 134 | }; | ||
| 135 | |||
| 117 | struct pps_bind_args { | 136 | struct pps_bind_args { |
| 118 | int tsformat; /* format of time stamps */ | 137 | int tsformat; /* format of time stamps */ |
| 119 | int edge; /* selected event type */ | 138 | int edge; /* selected event type */ |
