3 #include <linux/list.h>
4 #include <linux/tapi/tapi.h>
7 #include "vmmc-module.h"
14 struct vmmc_port
*ports
;
16 struct completion firmware_loaded_completion
;
17 struct completion cmd_completion
;
19 struct mps_mailbox mbox_cmd
;
20 struct mps_mailbox mbox_data
;
21 struct mps_fifo fifo_event
;
29 unsigned int num_coders
;
30 struct vmmc_coder
*coder
;
31 unsigned long coder_used
;
33 struct list_head modules
;
35 struct tapi_device tdev
;
37 struct sk_buff_head recv_queue
;
38 struct sk_buff_head send_queue
;
41 static inline struct vmmc
*tdev_to_vmmc(struct tapi_device
*tdev
)
43 return container_of(tdev
, struct vmmc
, tdev
);
46 static inline void vmmc_register_module(struct vmmc
*vmmc
,
47 struct vmmc_module
*module
)
49 list_add_tail(&module
->head
, &vmmc
->modules
);
52 static inline void vmmc_unregister_module(struct vmmc
*vmmc
,
53 struct vmmc_module
*module
)
55 list_del(&module
->head
);
58 int vmmc_command_write(struct vmmc
*vmmc
, uint32_t cmd
,
59 const uint32_t *data
);
60 int vmmc_command_read(struct vmmc
*vmmc
, uint32_t cmd
, uint32_t *result
);
62 struct vmmc_coder
*vmmc_coder_get(struct vmmc
*);
63 void vmmc_coder_put(struct vmmc
*, struct vmmc_coder
*);
64 void vmmc_init_coders(struct vmmc
*);
66 void vmmc_send_paket(struct vmmc
*vmmc
, unsigned int chan
, struct sk_buff
*skb
);