Gabor Juhos | e5553f0 | 2013-10-17 09:42:15 +0200 | [diff] [blame] | 1 | /* Copyright (C) 2009 - 2010 Ivo van Doorn <IvDoorn@gmail.com> |
| 2 | * Copyright (C) 2009 Alban Browaeys <prahal@yahoo.com> |
| 3 | * Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org> |
| 4 | * Copyright (C) 2009 Luis Correia <luis.f.correia@gmail.com> |
| 5 | * Copyright (C) 2009 Mattias Nissler <mattias.nissler@gmx.de> |
| 6 | * Copyright (C) 2009 Mark Asselstine <asselsm@gmail.com> |
| 7 | * Copyright (C) 2009 Xose Vazquez Perez <xose.vazquez@gmail.com> |
| 8 | * Copyright (C) 2009 Bart Zolnierkiewicz <bzolnier@gmail.com> |
| 9 | * <http://rt2x00.serialmonkey.com> |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or |
| 14 | * (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the |
| 23 | * Free Software Foundation, Inc., |
| 24 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | */ |
| 26 | |
| 27 | /* Module: rt2800mmio |
| 28 | * Abstract: forward declarations for the rt2800mmio module. |
| 29 | */ |
| 30 | |
| 31 | #ifndef RT2800MMIO_H |
| 32 | #define RT2800MMIO_H |
| 33 | |
Gabor Juhos | 0bc202b | 2013-10-17 09:42:17 +0200 | [diff] [blame^] | 34 | /* |
| 35 | * DMA descriptor defines. |
| 36 | */ |
| 37 | #define TXD_DESC_SIZE (4 * sizeof(__le32)) |
| 38 | |
| 39 | /* |
| 40 | * TX descriptor format for TX, PRIO and Beacon Ring. |
| 41 | */ |
| 42 | |
| 43 | /* |
| 44 | * Word0 |
| 45 | */ |
| 46 | #define TXD_W0_SD_PTR0 FIELD32(0xffffffff) |
| 47 | |
| 48 | /* |
| 49 | * Word1 |
| 50 | */ |
| 51 | #define TXD_W1_SD_LEN1 FIELD32(0x00003fff) |
| 52 | #define TXD_W1_LAST_SEC1 FIELD32(0x00004000) |
| 53 | #define TXD_W1_BURST FIELD32(0x00008000) |
| 54 | #define TXD_W1_SD_LEN0 FIELD32(0x3fff0000) |
| 55 | #define TXD_W1_LAST_SEC0 FIELD32(0x40000000) |
| 56 | #define TXD_W1_DMA_DONE FIELD32(0x80000000) |
| 57 | |
| 58 | /* |
| 59 | * Word2 |
| 60 | */ |
| 61 | #define TXD_W2_SD_PTR1 FIELD32(0xffffffff) |
| 62 | |
| 63 | /* |
| 64 | * Word3 |
| 65 | * WIV: Wireless Info Valid. 1: Driver filled WI, 0: DMA needs to copy WI |
| 66 | * QSEL: Select on-chip FIFO ID for 2nd-stage output scheduler. |
| 67 | * 0:MGMT, 1:HCCA 2:EDCA |
| 68 | */ |
| 69 | #define TXD_W3_WIV FIELD32(0x01000000) |
| 70 | #define TXD_W3_QSEL FIELD32(0x06000000) |
| 71 | #define TXD_W3_TCO FIELD32(0x20000000) |
| 72 | #define TXD_W3_UCO FIELD32(0x40000000) |
| 73 | #define TXD_W3_ICO FIELD32(0x80000000) |
| 74 | |
| 75 | |
| 76 | /* TX descriptor initialization */ |
| 77 | __le32 *rt2800mmio_get_txwi(struct queue_entry *entry); |
| 78 | void rt2800mmio_write_tx_desc(struct queue_entry *entry, |
| 79 | struct txentry_desc *txdesc); |
| 80 | |
Gabor Juhos | e5553f0 | 2013-10-17 09:42:15 +0200 | [diff] [blame] | 81 | #endif /* RT2800MMIO_H */ |