diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-01-26 00:38:26 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 16:02:47 -0500 |
commit | 93c4cceb963ebb133531e5e3f4f6e2da0d222656 (patch) | |
tree | 3d53c8720e64a8f02278b0f958251195574d2caa /drivers/firewire/fw-transaction.h | |
parent | 746083d86cf5f874741e3ddecf56ea3ed32959c8 (diff) |
firewire: Handle access to CSR resources on local node.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r-- | drivers/firewire/fw-transaction.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 903235b142f2..fb46ef78a323 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define TCODE_STREAM_DATA 10 | 40 | #define TCODE_STREAM_DATA 10 |
41 | #define TCODE_LOCK_RESPONSE 11 | 41 | #define TCODE_LOCK_RESPONSE 11 |
42 | 42 | ||
43 | #define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4) | ||
43 | #define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0) | 44 | #define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0) |
44 | #define TCODE_IS_REQUEST(tcode) (((tcode) & 2) == 0) | 45 | #define TCODE_IS_REQUEST(tcode) (((tcode) & 2) == 0) |
45 | #define TCODE_IS_RESPONSE(tcode) (((tcode) & 2) != 0) | 46 | #define TCODE_IS_RESPONSE(tcode) (((tcode) & 2) != 0) |
@@ -103,6 +104,34 @@ | |||
103 | #define PHY_PACKET_LINK_ON 0x1 | 104 | #define PHY_PACKET_LINK_ON 0x1 |
104 | #define PHY_PACKET_SELF_ID 0x2 | 105 | #define PHY_PACKET_SELF_ID 0x2 |
105 | 106 | ||
107 | #define CSR_REGISTER_BASE 0xfffff0000000ULL | ||
108 | |||
109 | /* register offsets relative to CSR_REGISTER_BASE */ | ||
110 | #define CSR_STATE_CLEAR 0x0 | ||
111 | #define CSR_STATE_SET 0x4 | ||
112 | #define CSR_NODE_IDS 0x8 | ||
113 | #define CSR_RESET_START 0xc | ||
114 | #define CSR_SPLIT_TIMEOUT_HI 0x18 | ||
115 | #define CSR_SPLIT_TIMEOUT_LO 0x1c | ||
116 | #define CSR_CYCLE_TIME 0x200 | ||
117 | #define CSR_BUS_TIME 0x204 | ||
118 | #define CSR_BUSY_TIMEOUT 0x210 | ||
119 | #define CSR_BUS_MANAGER_ID 0x21c | ||
120 | #define CSR_BANDWIDTH_AVAILABLE 0x220 | ||
121 | #define CSR_CHANNELS_AVAILABLE 0x224 | ||
122 | #define CSR_CHANNELS_AVAILABLE_HI 0x224 | ||
123 | #define CSR_CHANNELS_AVAILABLE_LO 0x228 | ||
124 | #define CSR_BROADCAST_CHANNEL 0x234 | ||
125 | #define CSR_CONFIG_ROM 0x400 | ||
126 | #define CSR_CONFIG_ROM_END 0x800 | ||
127 | #define CSR_FCP_COMMAND 0xB00 | ||
128 | #define CSR_FCP_RESPONSE 0xD00 | ||
129 | #define CSR_FCP_END 0xF00 | ||
130 | #define CSR_TOPOLOGY_MAP 0x1000 | ||
131 | #define CSR_TOPOLOGY_MAP_END 0x1400 | ||
132 | #define CSR_SPEED_MAP 0x2000 | ||
133 | #define CSR_SPEED_MAP_END 0x3000 | ||
134 | |||
106 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) | 135 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) |
107 | #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) | 136 | #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) |
108 | #define fw_debug(s, args...) printk(KERN_DEBUG KBUILD_MODNAME ": " s, ## args) | 137 | #define fw_debug(s, args...) printk(KERN_DEBUG KBUILD_MODNAME ": " s, ## args) |
@@ -227,6 +256,8 @@ extern const struct fw_address_region fw_unit_space_region; | |||
227 | int fw_core_add_address_handler(struct fw_address_handler *handler, | 256 | int fw_core_add_address_handler(struct fw_address_handler *handler, |
228 | const struct fw_address_region *region); | 257 | const struct fw_address_region *region); |
229 | void fw_core_remove_address_handler(struct fw_address_handler *handler); | 258 | void fw_core_remove_address_handler(struct fw_address_handler *handler); |
259 | void fw_fill_response(struct fw_packet *response, u32 *request_header, | ||
260 | int rcode, void *payload, size_t length); | ||
230 | void fw_send_response(struct fw_card *card, | 261 | void fw_send_response(struct fw_card *card, |
231 | struct fw_request *request, int rcode); | 262 | struct fw_request *request, int rcode); |
232 | 263 | ||