diff options
| -rw-r--r-- | drivers/firewire/fw-transaction.h | 61 | ||||
| -rw-r--r-- | include/linux/firewire-cdev.h | 51 | ||||
| -rw-r--r-- | include/linux/firewire-constants.h | 67 |
3 files changed, 74 insertions, 105 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index a1507cf8d764..acdc3be38c61 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
| @@ -25,18 +25,7 @@ | |||
| 25 | #include <linux/list.h> | 25 | #include <linux/list.h> |
| 26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
| 27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
| 28 | 28 | #include <linux/firewire-constants.h> | |
| 29 | #define TCODE_WRITE_QUADLET_REQUEST 0 | ||
| 30 | #define TCODE_WRITE_BLOCK_REQUEST 1 | ||
| 31 | #define TCODE_WRITE_RESPONSE 2 | ||
| 32 | #define TCODE_READ_QUADLET_REQUEST 4 | ||
| 33 | #define TCODE_READ_BLOCK_REQUEST 5 | ||
| 34 | #define TCODE_READ_QUADLET_RESPONSE 6 | ||
| 35 | #define TCODE_READ_BLOCK_RESPONSE 7 | ||
| 36 | #define TCODE_CYCLE_START 8 | ||
| 37 | #define TCODE_LOCK_REQUEST 9 | ||
| 38 | #define TCODE_STREAM_DATA 10 | ||
| 39 | #define TCODE_LOCK_RESPONSE 11 | ||
| 40 | 29 | ||
| 41 | #define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4) | 30 | #define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4) |
| 42 | #define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0) | 31 | #define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0) |
| @@ -45,54 +34,6 @@ | |||
| 45 | #define TCODE_HAS_REQUEST_DATA(tcode) (((tcode) & 12) != 4) | 34 | #define TCODE_HAS_REQUEST_DATA(tcode) (((tcode) & 12) != 4) |
| 46 | #define TCODE_HAS_RESPONSE_DATA(tcode) (((tcode) & 12) != 0) | 35 | #define TCODE_HAS_RESPONSE_DATA(tcode) (((tcode) & 12) != 0) |
| 47 | 36 | ||
| 48 | /* Juju specific tcodes */ | ||
| 49 | #define TCODE_DEALLOCATE 0x10 | ||
| 50 | #define TCODE_LOCK_MASK_SWAP 0x11 | ||
| 51 | #define TCODE_LOCK_COMPARE_SWAP 0x12 | ||
| 52 | #define TCODE_LOCK_FETCH_ADD 0x13 | ||
| 53 | #define TCODE_LOCK_LITTLE_ADD 0x14 | ||
| 54 | #define TCODE_LOCK_BOUNDED_ADD 0x15 | ||
| 55 | #define TCODE_LOCK_WRAP_ADD 0x16 | ||
| 56 | #define TCODE_LOCK_VENDOR_SPECIFIC 0x17 | ||
| 57 | |||
| 58 | #define SCODE_100 0x0 | ||
| 59 | #define SCODE_200 0x1 | ||
| 60 | #define SCODE_400 0x2 | ||
| 61 | #define SCODE_BETA 0x3 | ||
| 62 | |||
| 63 | #define EXTCODE_MASK_SWAP 0x1 | ||
| 64 | #define EXTCODE_COMPARE_SWAP 0x2 | ||
| 65 | #define EXTCODE_FETCH_ADD 0x3 | ||
| 66 | #define EXTCODE_LITTLE_ADD 0x4 | ||
| 67 | #define EXTCODE_BOUNDED_ADD 0x5 | ||
| 68 | #define EXTCODE_WRAP_ADD 0x6 | ||
| 69 | |||
| 70 | #define ACK_COMPLETE 0x1 | ||
| 71 | #define ACK_PENDING 0x2 | ||
| 72 | #define ACK_BUSY_X 0x4 | ||
| 73 | #define ACK_BUSY_A 0x5 | ||
| 74 | #define ACK_BUSY_B 0x6 | ||
| 75 | #define ACK_DATA_ERROR 0xd | ||
| 76 | #define ACK_TYPE_ERROR 0xe | ||
| 77 | |||
| 78 | #define RCODE_COMPLETE 0x0 | ||
| 79 | #define RCODE_CONFLICT_ERROR 0x4 | ||
| 80 | #define RCODE_DATA_ERROR 0x5 | ||
| 81 | #define RCODE_TYPE_ERROR 0x6 | ||
| 82 | #define RCODE_ADDRESS_ERROR 0x7 | ||
| 83 | |||
| 84 | /* Juju specific rcodes */ | ||
| 85 | #define RCODE_SEND_ERROR 0x10 | ||
| 86 | #define RCODE_CANCELLED 0x11 | ||
| 87 | #define RCODE_BUSY 0x12 | ||
| 88 | #define RCODE_GENERATION 0x13 | ||
| 89 | #define RCODE_NO_ACK 0x14 | ||
| 90 | |||
| 91 | #define RETRY_1 0x00 | ||
| 92 | #define RETRY_X 0x01 | ||
| 93 | #define RETRY_A 0x02 | ||
| 94 | #define RETRY_B 0x03 | ||
| 95 | |||
| 96 | #define LOCAL_BUS 0xffc0 | 37 | #define LOCAL_BUS 0xffc0 |
| 97 | 38 | ||
| 98 | #define SELFID_PORT_CHILD 0x3 | 39 | #define SELFID_PORT_CHILD 0x3 |
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 */ | ||
