diff options
Diffstat (limited to 'drivers/ieee1394/hosts.h')
-rw-r--r-- | drivers/ieee1394/hosts.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index 9ad4b2463077..69a7c9ff5ed7 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h | |||
@@ -2,17 +2,19 @@ | |||
2 | #define _IEEE1394_HOSTS_H | 2 | #define _IEEE1394_HOSTS_H |
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/wait.h> | ||
6 | #include <linux/list.h> | 5 | #include <linux/list.h> |
7 | #include <linux/timer.h> | ||
8 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/timer.h> | ||
8 | #include <linux/types.h> | ||
9 | #include <linux/workqueue.h> | ||
10 | #include <asm/atomic.h> | ||
9 | 11 | ||
10 | #include <asm/semaphore.h> | 12 | struct pci_dev; |
13 | struct module; | ||
11 | 14 | ||
12 | #include "ieee1394_types.h" | 15 | #include "ieee1394_types.h" |
13 | #include "csr.h" | 16 | #include "csr.h" |
14 | 17 | ||
15 | |||
16 | struct hpsb_packet; | 18 | struct hpsb_packet; |
17 | struct hpsb_iso; | 19 | struct hpsb_iso; |
18 | 20 | ||
@@ -112,7 +114,7 @@ enum devctl_cmd { | |||
112 | 114 | ||
113 | enum isoctl_cmd { | 115 | enum isoctl_cmd { |
114 | /* rawiso API - see iso.h for the meanings of these commands | 116 | /* rawiso API - see iso.h for the meanings of these commands |
115 | (they correspond exactly to the hpsb_iso_* API functions) | 117 | * (they correspond exactly to the hpsb_iso_* API functions) |
116 | * INIT = allocate resources | 118 | * INIT = allocate resources |
117 | * START = begin transmission/reception | 119 | * START = begin transmission/reception |
118 | * STOP = halt transmission/reception | 120 | * STOP = halt transmission/reception |
@@ -160,7 +162,8 @@ struct hpsb_host_driver { | |||
160 | /* The hardware driver may optionally support a function that is used | 162 | /* The hardware driver may optionally support a function that is used |
161 | * to set the hardware ConfigROM if the hardware supports handling | 163 | * to set the hardware ConfigROM if the hardware supports handling |
162 | * reads to the ConfigROM on its own. */ | 164 | * reads to the ConfigROM on its own. */ |
163 | void (*set_hw_config_rom) (struct hpsb_host *host, quadlet_t *config_rom); | 165 | void (*set_hw_config_rom)(struct hpsb_host *host, |
166 | quadlet_t *config_rom); | ||
164 | 167 | ||
165 | /* This function shall implement packet transmission based on | 168 | /* This function shall implement packet transmission based on |
166 | * packet->type. It shall CRC both parts of the packet (unless | 169 | * packet->type. It shall CRC both parts of the packet (unless |
@@ -170,20 +173,21 @@ struct hpsb_host_driver { | |||
170 | * called. Return 0 on success, negative errno on failure. | 173 | * called. Return 0 on success, negative errno on failure. |
171 | * NOTE: The function must be callable in interrupt context. | 174 | * NOTE: The function must be callable in interrupt context. |
172 | */ | 175 | */ |
173 | int (*transmit_packet) (struct hpsb_host *host, | 176 | int (*transmit_packet)(struct hpsb_host *host, |
174 | struct hpsb_packet *packet); | 177 | struct hpsb_packet *packet); |
175 | 178 | ||
176 | /* This function requests miscellanous services from the driver, see | 179 | /* This function requests miscellanous services from the driver, see |
177 | * above for command codes and expected actions. Return -1 for unknown | 180 | * above for command codes and expected actions. Return -1 for unknown |
178 | * command, though that should never happen. | 181 | * command, though that should never happen. |
179 | */ | 182 | */ |
180 | int (*devctl) (struct hpsb_host *host, enum devctl_cmd command, int arg); | 183 | int (*devctl)(struct hpsb_host *host, enum devctl_cmd command, int arg); |
181 | 184 | ||
182 | /* ISO transmission/reception functions. Return 0 on success, -1 | 185 | /* ISO transmission/reception functions. Return 0 on success, -1 |
183 | * (or -EXXX errno code) on failure. If the low-level driver does not | 186 | * (or -EXXX errno code) on failure. If the low-level driver does not |
184 | * support the new ISO API, set isoctl to NULL. | 187 | * support the new ISO API, set isoctl to NULL. |
185 | */ | 188 | */ |
186 | int (*isoctl) (struct hpsb_iso *iso, enum isoctl_cmd command, unsigned long arg); | 189 | int (*isoctl)(struct hpsb_iso *iso, enum isoctl_cmd command, |
190 | unsigned long arg); | ||
187 | 191 | ||
188 | /* This function is mainly to redirect local CSR reads/locks to the iso | 192 | /* This function is mainly to redirect local CSR reads/locks to the iso |
189 | * management registers (bus manager id, bandwidth available, channels | 193 | * management registers (bus manager id, bandwidth available, channels |
@@ -196,19 +200,11 @@ struct hpsb_host_driver { | |||
196 | quadlet_t data, quadlet_t compare); | 200 | quadlet_t data, quadlet_t compare); |
197 | }; | 201 | }; |
198 | 202 | ||
199 | |||
200 | struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, | 203 | struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, |
201 | struct device *dev); | 204 | struct device *dev); |
202 | int hpsb_add_host(struct hpsb_host *host); | 205 | int hpsb_add_host(struct hpsb_host *host); |
203 | void hpsb_remove_host(struct hpsb_host *h); | 206 | void hpsb_remove_host(struct hpsb_host *h); |
204 | 207 | ||
205 | /* The following 2 functions are deprecated and will be removed when the | ||
206 | * raw1394/libraw1394 update is complete. */ | ||
207 | int hpsb_update_config_rom(struct hpsb_host *host, | ||
208 | const quadlet_t *new_rom, size_t size, unsigned char rom_version); | ||
209 | int hpsb_get_config_rom(struct hpsb_host *host, quadlet_t *buffer, | ||
210 | size_t buffersize, size_t *rom_size, unsigned char *rom_version); | ||
211 | |||
212 | /* Updates the configuration rom image of a host. rom_version must be the | 208 | /* Updates the configuration rom image of a host. rom_version must be the |
213 | * current version, otherwise it will fail with return value -1. If this | 209 | * current version, otherwise it will fail with return value -1. If this |
214 | * host does not support config-rom-update, it will return -EINVAL. | 210 | * host does not support config-rom-update, it will return -EINVAL. |