• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_SWITCHTEC_IOCTL_H
8 #define _UAPI_LINUX_SWITCHTEC_IOCTL_H
9 #include <linux/types.h>
10 #define SWITCHTEC_IOCTL_PART_CFG0 0
11 #define SWITCHTEC_IOCTL_PART_CFG1 1
12 #define SWITCHTEC_IOCTL_PART_IMG0 2
13 #define SWITCHTEC_IOCTL_PART_IMG1 3
14 #define SWITCHTEC_IOCTL_PART_NVLOG 4
15 #define SWITCHTEC_IOCTL_PART_VENDOR0 5
16 #define SWITCHTEC_IOCTL_PART_VENDOR1 6
17 #define SWITCHTEC_IOCTL_PART_VENDOR2 7
18 #define SWITCHTEC_IOCTL_PART_VENDOR3 8
19 #define SWITCHTEC_IOCTL_PART_VENDOR4 9
20 #define SWITCHTEC_IOCTL_PART_VENDOR5 10
21 #define SWITCHTEC_IOCTL_PART_VENDOR6 11
22 #define SWITCHTEC_IOCTL_PART_VENDOR7 12
23 #define SWITCHTEC_IOCTL_PART_BL2_0 13
24 #define SWITCHTEC_IOCTL_PART_BL2_1 14
25 #define SWITCHTEC_IOCTL_PART_MAP_0 15
26 #define SWITCHTEC_IOCTL_PART_MAP_1 16
27 #define SWITCHTEC_IOCTL_PART_KEY_0 17
28 #define SWITCHTEC_IOCTL_PART_KEY_1 18
29 #define SWITCHTEC_NUM_PARTITIONS_GEN3 13
30 #define SWITCHTEC_NUM_PARTITIONS_GEN4 19
31 #define SWITCHTEC_IOCTL_NUM_PARTITIONS SWITCHTEC_NUM_PARTITIONS_GEN3
32 struct switchtec_ioctl_flash_info {
33   __u64 flash_length;
34   __u32 num_partitions;
35   __u32 padding;
36 };
37 #define SWITCHTEC_IOCTL_PART_ACTIVE 1
38 #define SWITCHTEC_IOCTL_PART_RUNNING 2
39 struct switchtec_ioctl_flash_part_info {
40   __u32 flash_partition;
41   __u32 address;
42   __u32 length;
43   __u32 active;
44 };
45 struct switchtec_ioctl_event_summary_legacy {
46   __u64 global;
47   __u64 part_bitmap;
48   __u32 local_part;
49   __u32 padding;
50   __u32 part[48];
51   __u32 pff[48];
52 };
53 struct switchtec_ioctl_event_summary {
54   __u64 global;
55   __u64 part_bitmap;
56   __u32 local_part;
57   __u32 padding;
58   __u32 part[48];
59   __u32 pff[255];
60 };
61 #define SWITCHTEC_IOCTL_EVENT_STACK_ERROR 0
62 #define SWITCHTEC_IOCTL_EVENT_PPU_ERROR 1
63 #define SWITCHTEC_IOCTL_EVENT_ISP_ERROR 2
64 #define SWITCHTEC_IOCTL_EVENT_SYS_RESET 3
65 #define SWITCHTEC_IOCTL_EVENT_FW_EXC 4
66 #define SWITCHTEC_IOCTL_EVENT_FW_NMI 5
67 #define SWITCHTEC_IOCTL_EVENT_FW_NON_FATAL 6
68 #define SWITCHTEC_IOCTL_EVENT_FW_FATAL 7
69 #define SWITCHTEC_IOCTL_EVENT_TWI_MRPC_COMP 8
70 #define SWITCHTEC_IOCTL_EVENT_TWI_MRPC_COMP_ASYNC 9
71 #define SWITCHTEC_IOCTL_EVENT_CLI_MRPC_COMP 10
72 #define SWITCHTEC_IOCTL_EVENT_CLI_MRPC_COMP_ASYNC 11
73 #define SWITCHTEC_IOCTL_EVENT_GPIO_INT 12
74 #define SWITCHTEC_IOCTL_EVENT_PART_RESET 13
75 #define SWITCHTEC_IOCTL_EVENT_MRPC_COMP 14
76 #define SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC 15
77 #define SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP 16
78 #define SWITCHTEC_IOCTL_EVENT_AER_IN_P2P 17
79 #define SWITCHTEC_IOCTL_EVENT_AER_IN_VEP 18
80 #define SWITCHTEC_IOCTL_EVENT_DPC 19
81 #define SWITCHTEC_IOCTL_EVENT_CTS 20
82 #define SWITCHTEC_IOCTL_EVENT_HOTPLUG 21
83 #define SWITCHTEC_IOCTL_EVENT_IER 22
84 #define SWITCHTEC_IOCTL_EVENT_THRESH 23
85 #define SWITCHTEC_IOCTL_EVENT_POWER_MGMT 24
86 #define SWITCHTEC_IOCTL_EVENT_TLP_THROTTLING 25
87 #define SWITCHTEC_IOCTL_EVENT_FORCE_SPEED 26
88 #define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT 27
89 #define SWITCHTEC_IOCTL_EVENT_LINK_STATE 28
90 #define SWITCHTEC_IOCTL_EVENT_GFMS 29
91 #define SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY 30
92 #define SWITCHTEC_IOCTL_EVENT_UEC 31
93 #define SWITCHTEC_IOCTL_MAX_EVENTS 32
94 #define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX - 1
95 #define SWITCHTEC_IOCTL_EVENT_IDX_ALL - 2
96 #define SWITCHTEC_IOCTL_EVENT_FLAG_CLEAR (1 << 0)
97 #define SWITCHTEC_IOCTL_EVENT_FLAG_EN_POLL (1 << 1)
98 #define SWITCHTEC_IOCTL_EVENT_FLAG_EN_LOG (1 << 2)
99 #define SWITCHTEC_IOCTL_EVENT_FLAG_EN_CLI (1 << 3)
100 #define SWITCHTEC_IOCTL_EVENT_FLAG_EN_FATAL (1 << 4)
101 #define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_POLL (1 << 5)
102 #define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_LOG (1 << 6)
103 #define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_CLI (1 << 7)
104 #define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_FATAL (1 << 8)
105 #define SWITCHTEC_IOCTL_EVENT_FLAG_UNUSED (~0x1ff)
106 struct switchtec_ioctl_event_ctl {
107   __u32 event_id;
108   __s32 index;
109   __u32 flags;
110   __u32 occurred;
111   __u32 count;
112   __u32 data[5];
113 };
114 #define SWITCHTEC_IOCTL_PFF_VEP 100
115 struct switchtec_ioctl_pff_port {
116   __u32 pff;
117   __u32 partition;
118   __u32 port;
119 };
120 #define SWITCHTEC_IOCTL_FLASH_INFO _IOR('W', 0x40, struct switchtec_ioctl_flash_info)
121 #define SWITCHTEC_IOCTL_FLASH_PART_INFO _IOWR('W', 0x41, struct switchtec_ioctl_flash_part_info)
122 #define SWITCHTEC_IOCTL_EVENT_SUMMARY _IOR('W', 0x42, struct switchtec_ioctl_event_summary)
123 #define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY _IOR('W', 0x42, struct switchtec_ioctl_event_summary_legacy)
124 #define SWITCHTEC_IOCTL_EVENT_CTL _IOWR('W', 0x43, struct switchtec_ioctl_event_ctl)
125 #define SWITCHTEC_IOCTL_PFF_TO_PORT _IOWR('W', 0x44, struct switchtec_ioctl_pff_port)
126 #define SWITCHTEC_IOCTL_PORT_TO_PFF _IOWR('W', 0x45, struct switchtec_ioctl_pff_port)
127 #endif
128