11#ifndef _FIREWIRE_CORE_H
22#define _FIREWIRE_CORE_H
33
4- #include <linux/dma-mapping.h>
54#include <linux/fs.h>
65#include <linux/list.h>
76#include <linux/idr.h>
@@ -97,17 +96,6 @@ int fw_core_initiate_bus_reset(struct fw_card *card, int short_reset);
9796int fw_compute_block_crc (u32 * block );
9897void fw_schedule_bm_work (struct fw_card * card , unsigned long delay );
9998
100- struct fw_descriptor {
101- struct list_head link ;
102- size_t length ;
103- u32 immediate ;
104- u32 key ;
105- const u32 * data ;
106- };
107-
108- int fw_core_add_descriptor (struct fw_descriptor * desc );
109- void fw_core_remove_descriptor (struct fw_descriptor * desc );
110-
11199
112100/* -cdev */
113101
@@ -130,77 +118,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event);
130118
131119/* -iso */
132120
133- /*
134- * The iso packet format allows for an immediate header/payload part
135- * stored in 'header' immediately after the packet info plus an
136- * indirect payload part that is pointer to by the 'payload' field.
137- * Applications can use one or the other or both to implement simple
138- * low-bandwidth streaming (e.g. audio) or more advanced
139- * scatter-gather streaming (e.g. assembling video frame automatically).
140- */
141- struct fw_iso_packet {
142- u16 payload_length ; /* Length of indirect payload. */
143- u32 interrupt :1 ; /* Generate interrupt on this packet */
144- u32 skip :1 ; /* Set to not send packet at all. */
145- u32 tag :2 ;
146- u32 sy :4 ;
147- u32 header_length :8 ; /* Length of immediate header. */
148- u32 header [0 ];
149- };
150-
151- #define FW_ISO_CONTEXT_TRANSMIT 0
152- #define FW_ISO_CONTEXT_RECEIVE 1
153-
154- #define FW_ISO_CONTEXT_MATCH_TAG0 1
155- #define FW_ISO_CONTEXT_MATCH_TAG1 2
156- #define FW_ISO_CONTEXT_MATCH_TAG2 4
157- #define FW_ISO_CONTEXT_MATCH_TAG3 8
158- #define FW_ISO_CONTEXT_MATCH_ALL_TAGS 15
159-
160- /*
161- * An iso buffer is just a set of pages mapped for DMA in the
162- * specified direction. Since the pages are to be used for DMA, they
163- * are not mapped into the kernel virtual address space. We store the
164- * DMA address in the page private. The helper function
165- * fw_iso_buffer_map() will map the pages into a given vma.
166- */
167- struct fw_iso_buffer {
168- enum dma_data_direction direction ;
169- struct page * * pages ;
170- int page_count ;
171- };
172-
173- typedef void (* fw_iso_callback_t )(struct fw_iso_context * context ,
174- u32 cycle , size_t header_length ,
175- void * header , void * data );
176-
177- struct fw_iso_context {
178- struct fw_card * card ;
179- int type ;
180- int channel ;
181- int speed ;
182- size_t header_size ;
183- fw_iso_callback_t callback ;
184- void * callback_data ;
185- };
186-
187- int fw_iso_buffer_init (struct fw_iso_buffer * buffer , struct fw_card * card ,
188- int page_count , enum dma_data_direction direction );
189121int fw_iso_buffer_map (struct fw_iso_buffer * buffer , struct vm_area_struct * vma );
190- void fw_iso_buffer_destroy (struct fw_iso_buffer * buffer , struct fw_card * card );
191-
192- struct fw_iso_context * fw_iso_context_create (struct fw_card * card ,
193- int type , int channel , int speed , size_t header_size ,
194- fw_iso_callback_t callback , void * callback_data );
195- int fw_iso_context_queue (struct fw_iso_context * ctx ,
196- struct fw_iso_packet * packet ,
197- struct fw_iso_buffer * buffer ,
198- unsigned long payload );
199- int fw_iso_context_start (struct fw_iso_context * ctx ,
200- int cycle , int sync , int tags );
201- int fw_iso_context_stop (struct fw_iso_context * ctx );
202- void fw_iso_context_destroy (struct fw_iso_context * ctx );
203-
204122void fw_iso_resource_manage (struct fw_card * card , int generation ,
205123 u64 channels_mask , int * channel , int * bandwidth , bool allocate );
206124
@@ -285,9 +203,4 @@ void fw_flush_transactions(struct fw_card *card);
285203void fw_send_phy_config (struct fw_card * card ,
286204 int node_id , int generation , int gap_count );
287205
288- static inline int fw_stream_packet_destination_id (int tag , int channel , int sy )
289- {
290- return tag << 14 | channel << 8 | sy ;
291- }
292-
293206#endif /* _FIREWIRE_CORE_H */
0 commit comments