aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firewire-cdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/firewire-cdev.h')
-rw-r--r--include/linux/firewire-cdev.h40
1 files changed, 35 insertions, 5 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h
index 520ecf86cbb3..40b11013408e 100644
--- a/include/linux/firewire-cdev.h
+++ b/include/linux/firewire-cdev.h
@@ -248,13 +248,20 @@ union fw_cdev_event {
248#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) 248#define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request)
249#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) 249#define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet)
250 250
251/* available since kernel version 2.6.34 */
252#define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2)
253
251/* 254/*
252 * FW_CDEV_VERSION History 255 * FW_CDEV_VERSION History
253 * 1 (2.6.22) - initial version 256 * 1 (2.6.22) - initial version
254 * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if 257 * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if
255 * &fw_cdev_create_iso_context.header_size is 8 or more 258 * &fw_cdev_create_iso_context.header_size is 8 or more
259 * (2.6.32) - added time stamp to xmit &fw_cdev_event_iso_interrupt
260 * (2.6.33) - IR has always packet-per-buffer semantics now, not one of
261 * dual-buffer or packet-per-buffer depending on hardware
262 * 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable
256 */ 263 */
257#define FW_CDEV_VERSION 2 264#define FW_CDEV_VERSION 3
258 265
259/** 266/**
260 * struct fw_cdev_get_info - General purpose information ioctl 267 * struct fw_cdev_get_info - General purpose information ioctl
@@ -544,14 +551,18 @@ struct fw_cdev_stop_iso {
544/** 551/**
545 * struct fw_cdev_get_cycle_timer - read cycle timer register 552 * struct fw_cdev_get_cycle_timer - read cycle timer register
546 * @local_time: system time, in microseconds since the Epoch 553 * @local_time: system time, in microseconds since the Epoch
547 * @cycle_timer: isochronous cycle timer, as per OHCI 1.1 clause 5.13 554 * @cycle_timer: Cycle Time register contents
548 * 555 *
549 * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer 556 * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer
550 * and also the system clock. This allows to express the receive time of an 557 * and also the system clock (%CLOCK_REALTIME). This allows to express the
551 * isochronous packet as a system time with microsecond accuracy. 558 * receive time of an isochronous packet as a system time.
552 * 559 *
553 * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and 560 * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and
554 * 12 bits cycleOffset, in host byte order. 561 * 12 bits cycleOffset, in host byte order. Cf. the Cycle Time register
562 * per IEEE 1394 or Isochronous Cycle Timer register per OHCI-1394.
563 *
564 * In version 1 and 2 of the ABI, this ioctl returned unreliable (non-
565 * monotonic) @cycle_timer values on certain controllers.
555 */ 566 */
556struct fw_cdev_get_cycle_timer { 567struct fw_cdev_get_cycle_timer {
557 __u64 local_time; 568 __u64 local_time;
@@ -559,6 +570,25 @@ struct fw_cdev_get_cycle_timer {
559}; 570};
560 571
561/** 572/**
573 * struct fw_cdev_get_cycle_timer2 - read cycle timer register
574 * @tv_sec: system time, seconds
575 * @tv_nsec: system time, sub-seconds part in nanoseconds
576 * @clk_id: input parameter, clock from which to get the system time
577 * @cycle_timer: Cycle Time register contents
578 *
579 * The %FW_CDEV_IOC_GET_CYCLE_TIMER2 works like
580 * %FW_CDEV_IOC_GET_CYCLE_TIMER but lets you choose a clock like with POSIX'
581 * clock_gettime function. Supported @clk_id values are POSIX' %CLOCK_REALTIME
582 * and %CLOCK_MONOTONIC and Linux' %CLOCK_MONOTONIC_RAW.
583 */
584struct fw_cdev_get_cycle_timer2 {
585 __s64 tv_sec;
586 __s32 tv_nsec;
587 __s32 clk_id;
588 __u32 cycle_timer;
589};
590
591/**
562 * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth 592 * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth
563 * @closure: Passed back to userspace in correponding iso resource events 593 * @closure: Passed back to userspace in correponding iso resource events
564 * @channels: Isochronous channels of which one is to be (de)allocated 594 * @channels: Isochronous channels of which one is to be (de)allocated