iPXE
ar9003_mac.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2011 Atheros Communications Inc.
3  *
4  * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5  * Original from Linux kernel 3.0.1
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef AR9003_MAC_H
21 #define AR9003_MAC_H
22 
23 FILE_SECBOOT ( FORBIDDEN );
24 
25 #define AR_DescId 0xffff0000
26 #define AR_DescId_S 16
27 #define AR_CtrlStat 0x00004000
28 #define AR_CtrlStat_S 14
29 #define AR_TxRxDesc 0x00008000
30 #define AR_TxRxDesc_S 15
31 #define AR_TxQcuNum 0x00000f00
32 #define AR_TxQcuNum_S 8
33 
34 #define AR_BufLen 0x0fff0000
35 #define AR_BufLen_S 16
36 
37 #define AR_TxDescId 0xffff0000
38 #define AR_TxDescId_S 16
39 #define AR_TxPtrChkSum 0x0000ffff
40 
41 #define AR_LowRxChain 0x00004000
42 
43 #define AR_Not_Sounding 0x20000000
44 
45 /* ctl 12 */
46 #define AR_PAPRDChainMask 0x00000e00
47 #define AR_PAPRDChainMask_S 9
48 
49 #define MAP_ISR_S2_CST 6
50 #define MAP_ISR_S2_GTT 6
51 #define MAP_ISR_S2_TIM 3
52 #define MAP_ISR_S2_CABEND 0
53 #define MAP_ISR_S2_DTIMSYNC 7
54 #define MAP_ISR_S2_DTIM 7
55 #define MAP_ISR_S2_TSFOOR 4
56 #define MAP_ISR_S2_BB_WATCHDOG 6
57 
58 #define AR9003TXC_CONST(_ds) ((const struct ar9003_txc *) _ds)
59 
60 struct ar9003_rxs {
73 } __attribute__((packed, aligned(4)));
74 
75 /* Transmit Control Descriptor */
76 struct ar9003_txc {
77  u32 info; /* descriptor information */
78  u32 link; /* link pointer */
79  u32 data0; /* data pointer to 1st buffer */
80  u32 ctl3; /* DMA control 3 */
81  u32 data1; /* data pointer to 2nd buffer */
82  u32 ctl5; /* DMA control 5 */
83  u32 data2; /* data pointer to 3rd buffer */
84  u32 ctl7; /* DMA control 7 */
85  u32 data3; /* data pointer to 4th buffer */
86  u32 ctl9; /* DMA control 9 */
87  u32 ctl10; /* DMA control 10 */
88  u32 ctl11; /* DMA control 11 */
89  u32 ctl12; /* DMA control 12 */
90  u32 ctl13; /* DMA control 13 */
91  u32 ctl14; /* DMA control 14 */
92  u32 ctl15; /* DMA control 15 */
93  u32 ctl16; /* DMA control 16 */
94  u32 ctl17; /* DMA control 17 */
95  u32 ctl18; /* DMA control 18 */
96  u32 ctl19; /* DMA control 19 */
97  u32 ctl20; /* DMA control 20 */
98  u32 ctl21; /* DMA control 21 */
99  u32 ctl22; /* DMA control 22 */
100  u32 pad[9]; /* pad to cache line (128 bytes/32 dwords) */
101 } __attribute__((packed, aligned(4)));
102 
103 struct ar9003_txs {
113 } __attribute__((packed, aligned(4)));
114 
115 void ar9003_hw_attach_mac_ops(struct ath_hw *hw);
116 void ath9k_hw_set_rx_bufsize(struct ath_hw *ah, u16 buf_size);
117 void ath9k_hw_addrxbuf_edma(struct ath_hw *ah, u32 rxdp,
118  enum ath9k_rx_qtype qtype);
119 
121  struct ath_rx_status *rxs,
122  void *buf_addr);
124 void ath9k_hw_setup_statusring(struct ath_hw *ah, void *ts_start,
125  u32 ts_paddr_start,
126  u8 size);
127 #endif
uint16_t u16
Definition: stdint.h:22
Definition: hw.h:657
u32 pad[9]
Definition: ar9003_mac.h:100
u32 status10
Definition: ar9003_mac.h:71
u32 status3
Definition: ar9003_mac.h:64
uint16_t size
Buffer size.
Definition: dwmac.h:14
Definition: hw.c:16
u32 status8
Definition: ar9003_mac.h:69
void ath9k_hw_set_rx_bufsize(struct ath_hw *ah, u16 buf_size)
u32 status1
Definition: ar9003_mac.h:62
void ath9k_hw_setup_statusring(struct ath_hw *ah, void *ts_start, u32 ts_paddr_start, u8 size)
void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)
int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, void *buf_addr)
u32 status6
Definition: ar9003_mac.h:67
u32 status9
Definition: ar9003_mac.h:70
u32 status4
Definition: ar9003_mac.h:65
void ar9003_hw_attach_mac_ops(struct ath_hw *hw)
void ath9k_hw_addrxbuf_edma(struct ath_hw *ah, u32 rxdp, enum ath9k_rx_qtype qtype)
u32 status2
Definition: ar9003_mac.h:63
Definition: sis900.h:32
u32 status5
Definition: ar9003_mac.h:66
uint8_t ah
Definition: registers.h:85
FILE_SECBOOT(FORBIDDEN)
u32 status11
Definition: ar9003_mac.h:72
ath9k_rx_qtype
Definition: hw.h:400
u32 ds_info
Definition: ar9003_mac.h:61
u32 status7
Definition: ar9003_mac.h:68
uint8_t u8
Definition: stdint.h:20
uint32_t u32
Definition: stdint.h:24
struct ar9003_rxs __attribute__((packed, aligned(4)))