acxpci.h: fix stupid error which prevented compile
[acx-mac80211.git] / acxpci.h
blob57f36224b59cc47619194fc24d57ac8fbcbf44f6
1 #ifndef _ACXPCI_H_
2 #define _ACXPCI_H_
4 /*
5 * acxpci.h: PCI related constants and structures.
7 * Copyright (c) 2008 Francis Galiegue <fgaliegue@gmail.com> for the ACX100
8 * driver project.
10 * This file is licensed under the GPLv2. See the README file for details.
14 * MMIO registers
17 /* Register I/O offsets */
18 #define ACX100_EEPROM_ID_OFFSET 0x380
21 * Please add further ACX hardware register definitions only when
22 * it turns out you need them in the driver, and please try to use firmware
23 * functionality instead, since using direct I/O access instead of letting the
24 * firmware do it might confuse the firmware's state machine.
27 /* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
28 ** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
31 * NOTE about ACX_IO_IRQ_REASON: this register is CLEARED ON READ.
33 #define ACX_IO_SOFT_RESET 0
34 #define ACX_IO_SLV_MEM_ADDR 1
35 #define ACX_IO_SLV_MEM_DATA 2
36 #define ACX_IO_SLV_MEM_CTL 3
37 #define ACX_IO_SLV_END_CTL 4
39 * Original code said that the following is the "function event mask". Whatever
40 * that means.
42 #define ACX_IO_FEMR 5
43 #define ACX_IO_INT_TRIG 6
44 #define ACX_IO_IRQ_MASK 7
45 #define ACX_IO_IRQ_STATUS_NON_DES 8
46 #define ACX_IO_IRQ_REASON 9
47 #define ACX_IO_IRQ_ACK 10
48 #define ACX_IO_HINT_TRIG 11
49 #define ACX_IO_ENABLE 12
50 #define ACX_IO_EEPROM_CTL 13
51 #define ACX_IO_EEPROM_ADDR 14
52 #define ACX_IO_EEPROM_DATA 15
53 #define ACX_IO_EEPROM_CFG 16
54 #define ACX_IO_PHY_ADDR 17
55 #define ACX_IO_PHY_DATA 18
56 #define ACX_IO_PHY_CTL 19
57 #define ACX_IO_GPIO_OE 20
58 #define ACX_IO_GPIO_OUT 21
59 #define ACX_IO_CMD_MAILBOX_OFFS 22
60 #define ACX_IO_INFO_MAILBOX_OFFS 23
61 #define ACX_IO_EEPROM_INFORMATION 24
62 #define ACX_IO_EE_START 25
63 #define ACX_IO_SOR_CFG 26
64 #define ACX_IO_ECPU_CTRL 27
65 /* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
66 ** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
68 /* Values for ACX_IO_INT_TRIG register: */
69 /* inform hw that rxdesc in queue needs processing */
70 #define INT_TRIG_RXPRC 0x08
71 /* inform hw that txdesc in queue needs processing */
72 #define INT_TRIG_TXPRC 0x04
73 /* ack that we received info from info mailbox */
74 #define INT_TRIG_INFOACK 0x02
75 /* inform hw that we have filled command mailbox */
76 #define INT_TRIG_CMD 0x01
79 * In-hardware TX/RX structures
82 struct txhostdesc {
83 acx_ptr data_phy; /* 0x00 [u8 *] */
84 u16 data_offset; /* 0x04 */
85 u16 reserved; /* 0x06 */
86 u16 Ctl_16; /* 16bit value, endianness!! */
87 u16 length; /* 0x0a */
88 acx_ptr desc_phy_next; /* 0x0c [txhostdesc *] */
89 acx_ptr pNext; /* 0x10 [txhostdesc *] */
90 u32 Status; /* 0x14, unused on Tx */
91 /* From here on you can use this area as you want (variable length, too!) */
92 u8 *data;
93 struct ieee80211_tx_status txstatus;
94 struct sk_buff *skb;
96 } __attribute__ ((packed));
98 struct rxhostdesc {
99 acx_ptr data_phy; /* 0x00 [rxbuffer_t *] */
100 u16 data_offset; /* 0x04 */
101 u16 reserved; /* 0x06 */
102 u16 Ctl_16; /* 0x08; 16bit value, endianness!! */
103 u16 length; /* 0x0a */
104 acx_ptr desc_phy_next; /* 0x0c [rxhostdesc_t *] */
105 acx_ptr pNext; /* 0x10 [rxhostdesc_t *] */
106 u32 Status; /* 0x14 */
107 /* From here on you can use this area as you want (variable length, too!) */
108 rxbuffer_t *data;
109 } __attribute__ ((packed));
112 #endif /* _ACXPCI_H_ */