Setting up repository
[linux-libre-firmware.git] / ath9k_htc / target_firmware / magpie_fw_dev / target / inc / magpie / hif_pci.h
1
2 #ifndef __HIF_PCI_H
3 #define __HIF_PCI_H
4
5 #include <hif_api.h>
6 #include <dma_lib.h>
7
8
9 #define PCI_MAX_DATA_PKT_LEN            1664
10 #define PCI_MAX_CMD_PKT_LEN             512
11 #define PCI_MAX_BOOT_DESC               2 
12      
13 typedef enum hif_pci_pipe_rx{
14     HIF_PCI_PIPE_RX0, /*Normal Priority RX*/
15     HIF_PCI_PIPE_RX1,
16     HIF_PCI_PIPE_RX2,
17     HIF_PCI_PIPE_RX3,
18     HIF_PCI_PIPE_RX_MAX
19 }hif_pci_pipe_rx_t;
20
21 typedef enum hif_pci_pipe_tx{
22     HIF_PCI_PIPE_TX0, /*Normal Priority TX*/
23     HIF_PCI_PIPE_TX1,
24     HIF_PCI_PIPE_TX_MAX
25 }hif_pci_pipe_tx_t;
26
27 typedef struct __pci_softc{
28     HIF_CALLBACK       sw;
29 }__pci_softc_t;
30
31 struct hif_pci_api{
32     void          (*pci_boot_init)(void);
33     hif_handle_t  (*pci_init)(HIF_CONFIG *pConfig);
34     void          (*pci_reset)(void);
35     void          (*pci_enable)(void);
36     void          (*pci_reap_xmitted)(__pci_softc_t  *sc, 
37                                       dma_engine_t  eng_no);
38     void          (*pci_reap_recv)(__pci_softc_t  *sc, dma_engine_t  eng_no);
39     A_UINT8       (*pci_get_pipe)(dma_engine_t   eng);
40     dma_engine_t  (*pci_get_tx_eng)(hif_pci_pipe_tx_t  pipe);
41     dma_engine_t  (*pci_get_rx_eng)(hif_pci_pipe_rx_t  pipe);
42
43 };
44
45 void        hif_pci_api_install(struct hif_pci_api *apis);
46 void        hif_pci_module_install(struct hif_api *apis);
47 #endif
48
49