1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef _LINUX_FIREWIRE_CDEV_H 20#define _LINUX_FIREWIRE_CDEV_H 21#include <linux/ioctl.h> 22#include <linux/types.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#include <linux/firewire-constants.h> 25#define FW_CDEV_EVENT_BUS_RESET 0x00 26#define FW_CDEV_EVENT_RESPONSE 0x01 27#define FW_CDEV_EVENT_REQUEST 0x02 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 30#define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04 31#define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05 32#define FW_CDEV_EVENT_REQUEST2 0x06 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define FW_CDEV_EVENT_PHY_PACKET_SENT 0x07 35#define FW_CDEV_EVENT_PHY_PACKET_RECEIVED 0x08 36#define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL 0x09 37struct fw_cdev_event_common { 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 __u64 closure; 40 __u32 type; 41}; 42struct fw_cdev_event_bus_reset { 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u64 closure; 45 __u32 type; 46 __u32 node_id; 47 __u32 local_node_id; 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 __u32 bm_node_id; 50 __u32 irm_node_id; 51 __u32 root_node_id; 52 __u32 generation; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54}; 55struct fw_cdev_event_response { 56 __u64 closure; 57 __u32 type; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u32 rcode; 60 __u32 length; 61 __u32 data[0]; 62}; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64struct fw_cdev_event_request { 65 __u64 closure; 66 __u32 type; 67 __u32 tcode; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 __u64 offset; 70 __u32 handle; 71 __u32 length; 72 __u32 data[0]; 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74}; 75struct fw_cdev_event_request2 { 76 __u64 closure; 77 __u32 type; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 __u32 tcode; 80 __u64 offset; 81 __u32 source_node_id; 82 __u32 destination_node_id; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 __u32 card; 85 __u32 generation; 86 __u32 handle; 87 __u32 length; 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 __u32 data[0]; 90}; 91struct fw_cdev_event_iso_interrupt { 92 __u64 closure; 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 __u32 type; 95 __u32 cycle; 96 __u32 header_length; 97 __u32 header[0]; 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99}; 100struct fw_cdev_event_iso_interrupt_mc { 101 __u64 closure; 102 __u32 type; 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 __u32 completed; 105}; 106struct fw_cdev_event_iso_resource { 107 __u64 closure; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u32 type; 110 __u32 handle; 111 __s32 channel; 112 __s32 bandwidth; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114}; 115struct fw_cdev_event_phy_packet { 116 __u64 closure; 117 __u32 type; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 __u32 rcode; 120 __u32 length; 121 __u32 data[0]; 122}; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124union fw_cdev_event { 125 struct fw_cdev_event_common common; 126 struct fw_cdev_event_bus_reset bus_reset; 127 struct fw_cdev_event_response response; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 struct fw_cdev_event_request request; 130 struct fw_cdev_event_request2 request2; 131 struct fw_cdev_event_iso_interrupt iso_interrupt; 132 struct fw_cdev_event_iso_interrupt_mc iso_interrupt_mc; 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 struct fw_cdev_event_iso_resource iso_resource; 135 struct fw_cdev_event_phy_packet phy_packet; 136}; 137#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) 140#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) 141#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) 142#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144#define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) 145#define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) 146#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) 147#define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149#define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) 150#define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) 151#define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) 152#define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource) 155#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate) 156#define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource) 157#define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource) 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159#define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) 160#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) 161#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) 162#define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2) 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164#define FW_CDEV_IOC_SEND_PHY_PACKET _IOWR('#', 0x15, struct fw_cdev_send_phy_packet) 165#define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets) 166#define FW_CDEV_IOC_SET_ISO_CHANNELS _IOW('#', 0x17, struct fw_cdev_set_iso_channels) 167#define FW_CDEV_IOC_FLUSH_ISO _IOW('#', 0x18, struct fw_cdev_flush_iso) 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169struct fw_cdev_get_info { 170 __u32 version; 171 __u32 rom_length; 172 __u64 rom; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 __u64 bus_reset; 175 __u64 bus_reset_closure; 176 __u32 card; 177}; 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179struct fw_cdev_send_request { 180 __u32 tcode; 181 __u32 length; 182 __u64 offset; 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 __u64 closure; 185 __u64 data; 186 __u32 generation; 187}; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189struct fw_cdev_send_response { 190 __u32 rcode; 191 __u32 length; 192 __u64 data; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 __u32 handle; 195}; 196struct fw_cdev_allocate { 197 __u64 offset; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 __u64 closure; 200 __u32 length; 201 __u32 handle; 202 __u64 region_end; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204}; 205struct fw_cdev_deallocate { 206 __u32 handle; 207}; 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209#define FW_CDEV_LONG_RESET 0 210#define FW_CDEV_SHORT_RESET 1 211struct fw_cdev_initiate_bus_reset { 212 __u32 type; 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214}; 215struct fw_cdev_add_descriptor { 216 __u32 immediate; 217 __u32 key; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 __u64 data; 220 __u32 length; 221 __u32 handle; 222}; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224struct fw_cdev_remove_descriptor { 225 __u32 handle; 226}; 227#define FW_CDEV_ISO_CONTEXT_TRANSMIT 0 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229#define FW_CDEV_ISO_CONTEXT_RECEIVE 1 230#define FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL 2 231struct fw_cdev_create_iso_context { 232 __u32 type; 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 __u32 header_size; 235 __u32 channel; 236 __u32 speed; 237 __u64 closure; 238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 __u32 handle; 240}; 241struct fw_cdev_set_iso_channels { 242 __u64 channels; 243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 __u32 handle; 245}; 246#define FW_CDEV_ISO_PAYLOAD_LENGTH(v) (v) 247#define FW_CDEV_ISO_INTERRUPT (1 << 16) 248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249#define FW_CDEV_ISO_SKIP (1 << 17) 250#define FW_CDEV_ISO_SYNC (1 << 17) 251#define FW_CDEV_ISO_TAG(v) ((v) << 18) 252#define FW_CDEV_ISO_SY(v) ((v) << 20) 253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254#define FW_CDEV_ISO_HEADER_LENGTH(v) ((v) << 24) 255struct fw_cdev_iso_packet { 256 __u32 control; 257 __u32 header[0]; 258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259}; 260struct fw_cdev_queue_iso { 261 __u64 packets; 262 __u64 data; 263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 __u32 size; 265 __u32 handle; 266}; 267#define FW_CDEV_ISO_CONTEXT_MATCH_TAG0 1 268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269#define FW_CDEV_ISO_CONTEXT_MATCH_TAG1 2 270#define FW_CDEV_ISO_CONTEXT_MATCH_TAG2 4 271#define FW_CDEV_ISO_CONTEXT_MATCH_TAG3 8 272#define FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS 15 273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274struct fw_cdev_start_iso { 275 __s32 cycle; 276 __u32 sync; 277 __u32 tags; 278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 __u32 handle; 280}; 281struct fw_cdev_stop_iso { 282 __u32 handle; 283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284}; 285struct fw_cdev_flush_iso { 286 __u32 handle; 287}; 288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289struct fw_cdev_get_cycle_timer { 290 __u64 local_time; 291 __u32 cycle_timer; 292}; 293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294struct fw_cdev_get_cycle_timer2 { 295 __s64 tv_sec; 296 __s32 tv_nsec; 297 __s32 clk_id; 298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 299 __u32 cycle_timer; 300}; 301struct fw_cdev_allocate_iso_resource { 302 __u64 closure; 303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 304 __u64 channels; 305 __u32 bandwidth; 306 __u32 handle; 307}; 308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 309struct fw_cdev_send_stream_packet { 310 __u32 length; 311 __u32 tag; 312 __u32 channel; 313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 314 __u32 sy; 315 __u64 closure; 316 __u64 data; 317 __u32 generation; 318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 319 __u32 speed; 320}; 321struct fw_cdev_send_phy_packet { 322 __u64 closure; 323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 324 __u32 data[2]; 325 __u32 generation; 326}; 327struct fw_cdev_receive_phy_packets { 328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 329 __u64 closure; 330}; 331#define FW_CDEV_VERSION 3 332#endif 333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 334