diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-05-07 20:33:37 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-05-10 12:24:13 -0400 |
commit | 4c5a443e80e6d85e5c84a56bf30b61fe84c1f292 (patch) | |
tree | c5404475fe48376d9151c08c4cc37eb507fcd5e3 /include | |
parent | 04dfb8dbd200c574b2f292146ef817d9745c8936 (diff) |
firewire: Break out shared IEEE1394 constant to separate header file.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/firewire-cdev.h | 51 | ||||
-rw-r--r-- | include/linux/firewire-constants.h | 67 |
2 files changed, 73 insertions, 45 deletions
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 3cb83a1fa9ba..d4455eb2ae35 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* -*- c-basic-offset: 8 -*- | 1 | /* |
2 | * | 2 | * Char device interface. |
3 | * fw-device-cdev.h -- Char device interface. | ||
4 | * | 3 | * |
5 | * Copyright (C) 2005-2006 Kristian Hoegsberg <krh@bitplanet.net> | 4 | * Copyright (C) 2005-2006 Kristian Hoegsberg <krh@bitplanet.net> |
6 | * | 5 | * |
@@ -19,50 +18,12 @@ | |||
19 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | */ | 19 | */ |
21 | 20 | ||
22 | #ifndef __fw_cdev_h | 21 | #ifndef _LINUX_FIREWIRE_CDEV_H |
23 | #define __fw_cdev_h | 22 | #define _LINUX_FIREWIRE_CDEV_H |
24 | 23 | ||
25 | #include <linux/ioctl.h> | 24 | #include <linux/ioctl.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | 26 | #include <linux/firewire-constants.h> | |
28 | #define TCODE_WRITE_QUADLET_REQUEST 0 | ||
29 | #define TCODE_WRITE_BLOCK_REQUEST 1 | ||
30 | #define TCODE_WRITE_RESPONSE 2 | ||
31 | #define TCODE_READ_QUADLET_REQUEST 4 | ||
32 | #define TCODE_READ_BLOCK_REQUEST 5 | ||
33 | #define TCODE_READ_QUADLET_RESPONSE 6 | ||
34 | #define TCODE_READ_BLOCK_RESPONSE 7 | ||
35 | #define TCODE_CYCLE_START 8 | ||
36 | #define TCODE_LOCK_REQUEST 9 | ||
37 | #define TCODE_STREAM_DATA 10 | ||
38 | #define TCODE_LOCK_RESPONSE 11 | ||
39 | |||
40 | #define TCODE_LOCK_MASK_SWAP 0x11 | ||
41 | #define TCODE_LOCK_COMPARE_SWAP 0x12 | ||
42 | #define TCODE_LOCK_FETCH_ADD 0x13 | ||
43 | #define TCODE_LOCK_LITTLE_ADD 0x14 | ||
44 | #define TCODE_LOCK_BOUNDED_ADD 0x15 | ||
45 | #define TCODE_LOCK_WRAP_ADD 0x16 | ||
46 | #define TCODE_LOCK_VENDOR_DEPENDENT 0x17 | ||
47 | |||
48 | #define RCODE_COMPLETE 0x0 | ||
49 | #define RCODE_CONFLICT_ERROR 0x4 | ||
50 | #define RCODE_DATA_ERROR 0x5 | ||
51 | #define RCODE_TYPE_ERROR 0x6 | ||
52 | #define RCODE_ADDRESS_ERROR 0x7 | ||
53 | |||
54 | #define RCODE_SEND_ERROR 0x10 | ||
55 | #define RCODE_CANCELLED 0x11 | ||
56 | #define RCODE_BUSY 0x12 | ||
57 | #define RCODE_GENERATION 0x13 | ||
58 | #define RCODE_NO_ACK 0x14 | ||
59 | |||
60 | #define SCODE_100 0x0 | ||
61 | #define SCODE_200 0x1 | ||
62 | #define SCODE_400 0x2 | ||
63 | #define SCODE_800 0x3 | ||
64 | #define SCODE_1600 0x4 | ||
65 | #define SCODE_3200 0x5 | ||
66 | 27 | ||
67 | #define FW_CDEV_EVENT_BUS_RESET 0x00 | 28 | #define FW_CDEV_EVENT_BUS_RESET 0x00 |
68 | #define FW_CDEV_EVENT_RESPONSE 0x01 | 29 | #define FW_CDEV_EVENT_RESPONSE 0x01 |
@@ -265,4 +226,4 @@ struct fw_cdev_stop_iso { | |||
265 | __u32 handle; | 226 | __u32 handle; |
266 | }; | 227 | }; |
267 | 228 | ||
268 | #endif /* __fw_cdev_h */ | 229 | #endif /* _LINUX_FIREWIRE_CDEV_H */ |
diff --git a/include/linux/firewire-constants.h b/include/linux/firewire-constants.h new file mode 100644 index 000000000000..b316770a43fd --- /dev/null +++ b/include/linux/firewire-constants.h | |||
@@ -0,0 +1,67 @@ | |||
1 | #ifndef _LINUX_FIREWIRE_CONSTANTS_H | ||
2 | #define _LINUX_FIREWIRE_CONSTANTS_H | ||
3 | |||
4 | #define TCODE_WRITE_QUADLET_REQUEST 0x0 | ||
5 | #define TCODE_WRITE_BLOCK_REQUEST 0x1 | ||
6 | #define TCODE_WRITE_RESPONSE 0x2 | ||
7 | #define TCODE_READ_QUADLET_REQUEST 0x4 | ||
8 | #define TCODE_READ_BLOCK_REQUEST 0x5 | ||
9 | #define TCODE_READ_QUADLET_RESPONSE 0x6 | ||
10 | #define TCODE_READ_BLOCK_RESPONSE 0x7 | ||
11 | #define TCODE_CYCLE_START 0x8 | ||
12 | #define TCODE_LOCK_REQUEST 0x9 | ||
13 | #define TCODE_STREAM_DATA 0xa | ||
14 | #define TCODE_LOCK_RESPONSE 0xb | ||
15 | |||
16 | #define EXTCODE_MASK_SWAP 0x1 | ||
17 | #define EXTCODE_COMPARE_SWAP 0x2 | ||
18 | #define EXTCODE_FETCH_ADD 0x3 | ||
19 | #define EXTCODE_LITTLE_ADD 0x4 | ||
20 | #define EXTCODE_BOUNDED_ADD 0x5 | ||
21 | #define EXTCODE_WRAP_ADD 0x6 | ||
22 | #define EXTCODE_VENDOR_DEPENDENT 0x7 | ||
23 | |||
24 | /* Juju specific tcodes */ | ||
25 | #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) | ||
26 | #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) | ||
27 | #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) | ||
28 | #define TCODE_LOCK_LITTLE_ADD (0x10 | EXTCODE_LITTLE_ADD) | ||
29 | #define TCODE_LOCK_BOUNDED_ADD (0x10 | EXTCODE_BOUNDED_ADD) | ||
30 | #define TCODE_LOCK_WRAP_ADD (0x10 | EXTCODE_WRAP_ADD) | ||
31 | #define TCODE_LOCK_VENDOR_DEPENDENT (0x10 | EXTCODE_VENDOR_DEPENDENT) | ||
32 | |||
33 | #define RCODE_COMPLETE 0x0 | ||
34 | #define RCODE_CONFLICT_ERROR 0x4 | ||
35 | #define RCODE_DATA_ERROR 0x5 | ||
36 | #define RCODE_TYPE_ERROR 0x6 | ||
37 | #define RCODE_ADDRESS_ERROR 0x7 | ||
38 | |||
39 | /* Juju specific rcodes */ | ||
40 | #define RCODE_SEND_ERROR 0x10 | ||
41 | #define RCODE_CANCELLED 0x11 | ||
42 | #define RCODE_BUSY 0x12 | ||
43 | #define RCODE_GENERATION 0x13 | ||
44 | #define RCODE_NO_ACK 0x14 | ||
45 | |||
46 | #define SCODE_100 0x0 | ||
47 | #define SCODE_200 0x1 | ||
48 | #define SCODE_400 0x2 | ||
49 | #define SCODE_800 0x3 | ||
50 | #define SCODE_1600 0x4 | ||
51 | #define SCODE_3200 0x5 | ||
52 | #define SCODE_BETA 0x3 | ||
53 | |||
54 | #define ACK_COMPLETE 0x1 | ||
55 | #define ACK_PENDING 0x2 | ||
56 | #define ACK_BUSY_X 0x4 | ||
57 | #define ACK_BUSY_A 0x5 | ||
58 | #define ACK_BUSY_B 0x6 | ||
59 | #define ACK_DATA_ERROR 0xd | ||
60 | #define ACK_TYPE_ERROR 0xe | ||
61 | |||
62 | #define RETRY_1 0x00 | ||
63 | #define RETRY_X 0x01 | ||
64 | #define RETRY_A 0x02 | ||
65 | #define RETRY_B 0x03 | ||
66 | |||
67 | #endif /* _LINUX_FIREWIRE_CONSTANTS_H */ | ||