fix compiler error caused by previous commit
[acx-mac80211.git] / acxpci.h
bloba57cc112338e5487958285e5b268f59e68261d72
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 enum {
34 ACX_IO_SOFT_RESET = 0,
36 ACX_IO_SLV_MEM_ADDR,
37 ACX_IO_SLV_MEM_DATA,
38 ACX_IO_SLV_MEM_CTL,
39 ACX_IO_SLV_END_CTL,
41 ACX_IO_FEMR, /* Function Event Mask */
43 ACX_IO_INT_TRIG,
44 ACX_IO_IRQ_MASK,
45 ACX_IO_IRQ_STATUS_NON_DES,
46 ACX_IO_IRQ_REASON,
47 ACX_IO_IRQ_ACK,
48 ACX_IO_HINT_TRIG,
50 ACX_IO_ENABLE,
52 ACX_IO_EEPROM_CTL,
53 ACX_IO_EEPROM_ADDR,
54 ACX_IO_EEPROM_DATA,
55 ACX_IO_EEPROM_CFG,
57 ACX_IO_PHY_ADDR,
58 ACX_IO_PHY_DATA,
59 ACX_IO_PHY_CTL,
61 ACX_IO_GPIO_OE,
63 ACX_IO_GPIO_OUT,
65 ACX_IO_CMD_MAILBOX_OFFS,
66 ACX_IO_INFO_MAILBOX_OFFS,
67 ACX_IO_EEPROM_INFORMATION,
69 ACX_IO_EE_START,
70 ACX_IO_SOR_CFG,
71 ACX_IO_ECPU_CTRL
73 /* ***** ABSOLUTELY ALWAYS KEEP OFFSETS IN SYNC WITH THE INITIALIZATION
74 ** OF THE I/O ARRAYS!!!! (grep for '^IO_ACX') ***** */
76 /* Values for ACX_IO_INT_TRIG register: */
77 /* inform hw that rxdesc in queue needs processing */
78 #define INT_TRIG_RXPRC 0x08
79 /* inform hw that txdesc in queue needs processing */
80 #define INT_TRIG_TXPRC 0x04
81 /* ack that we received info from info mailbox */
82 #define INT_TRIG_INFOACK 0x02
83 /* inform hw that we have filled command mailbox */
84 #define INT_TRIG_CMD 0x01
87 * In-hardware TX/RX structures
90 struct txhostdesc {
91 acx_ptr data_phy; /* 0x00 [u8 *] */
92 u16 data_offset; /* 0x04 */
93 u16 reserved; /* 0x06 */
94 u16 Ctl_16; /* 16bit value, endianness!! */
95 u16 length; /* 0x0a */
96 acx_ptr desc_phy_next; /* 0x0c [txhostdesc *] */
97 acx_ptr pNext; /* 0x10 [txhostdesc *] */
98 u32 Status; /* 0x14, unused on Tx */
99 /* From here on you can use this area as you want (variable length, too!) */
100 u8 *data;
101 struct ieee80211_tx_status txstatus;
102 struct sk_buff *skb;
104 } __attribute__ ((packed));
106 struct rxhostdesc {
107 acx_ptr data_phy; /* 0x00 [rxbuffer_t *] */
108 u16 data_offset; /* 0x04 */
109 u16 reserved; /* 0x06 */
110 u16 Ctl_16; /* 0x08; 16bit value, endianness!! */
111 u16 length; /* 0x0a */
112 acx_ptr desc_phy_next; /* 0x0c [rxhostdesc_t *] */
113 acx_ptr pNext; /* 0x10 [rxhostdesc_t *] */
114 u32 Status; /* 0x14 */
115 /* From here on you can use this area as you want (variable length, too!) */
116 rxbuffer_t *data;
117 } __attribute__ ((packed));
120 #endif /* _ACXPCI_H_ */