Annotation of embedtools/inc/athctl.h, revision 1.1.2.4
1.1.2.1 misho 1: /*************************************************************************
2: * (C) 2010 AITNET - Sofia/Bulgaria - <office@aitbg.com>
3: * by Michael Pounov <misho@aitbg.com>
4: *
5: * $Author: misho $
1.1.2.4 ! misho 6: * $Id: athctl.h,v 1.1.2.3 2010/10/25 14:46:30 misho Exp $
1.1.2.1 misho 7: *
8: *************************************************************************/
9: #ifndef __ATHCTL_H
10: #define __ATHCTL_H
11:
12:
13: #define SC_SLOTTIME "dev.ath.%d.slottime"
14: #define SC_ACKTIMEOUT "dev.ath.%d.acktimeout"
15: #define SC_CTSTIMEOUT "dev.ath.%d.ctstimeout"
16:
17:
1.1.2.2 misho 18: #define AR5K_PCICFG 0x4010
19: #define AR5K_PCICFG_EEAE 0x00000001
20: #define AR5K_PCICFG_CLKRUNEN 0x00000004
21: #define AR5K_PCICFG_LED_PEND 0x00000020
22: #define AR5K_PCICFG_LED_ACT 0x00000040
23: #define AR5K_PCICFG_SL_INTEN 0x00000800
24: #define AR5K_PCICFG_BCTL 0x00001000
25: #define AR5K_PCICFG_SPWR_DN 0x00010000
26:
27: /* EEPROM Registers in the MAC */
28: #define AR5211_EEPROM_ADDR 0x6000
29: #define AR5211_EEPROM_DATA 0x6004
30: #define AR5211_EEPROM_COMD 0x6008
31: #define AR5211_EEPROM_COMD_READ 0x0001
32: #define AR5211_EEPROM_COMD_WRITE 0x0002
33: #define AR5211_EEPROM_COMD_RESET 0x0003
34: #define AR5211_EEPROM_STATUS 0x600C
35: #define AR5211_EEPROM_STAT_RDERR 0x0001
36: #define AR5211_EEPROM_STAT_RDDONE 0x0002
37: #define AR5211_EEPROM_STAT_WRERR 0x0003
38: #define AR5211_EEPROM_STAT_WRDONE 0x0004
39: #define AR5211_EEPROM_CONF 0x6010
40:
41:
42: #define ATH_PCI_MEM_SIZE 0x10000
43: #define ATH_EEPROM_SIZE 0x800
44:
1.1.2.3 misho 45: #define ATH_ACCESS_TIMEOUT 10000
46: #define ATH_ACCESS_WAIT 5
47: #define ATH_ACCESS_WAITDOWN 500
48: #define ATH_ACCESS_WAITPCI 50
49: #define ATH_WRITE_RETRY 100
50:
1.1.2.4 ! misho 51: #define ATH_OFFSET_REGDOMAIN 0xBF
! 52:
1.1.2.2 misho 53:
54: #define ATH_IN(__mbase, x) (*((volatile unsigned long*)((__mbase) + (x))))
55: #define ATH_OUT(__mbase, x, v) (*((volatile unsigned long*)((__mbase) + (x))) = (v))
56:
57:
1.1.2.1 misho 58:
59: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>