⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sbchipc.h

📁 wi-fi sources for asus wl138g v2 pci card
💻 H
📖 第 1 页 / 共 2 页
字号:
#define JCMD_ACC_PDR		0x00050000#define JCMD_IRW_MASK		0x00001f00#define JCMD_IRW_SHIFT		8#define JCMD_DRW_MASK		0x0000003f/* jtagctrl */#define JCTRL_FORCE_CLK		4		/* Force clock */#define JCTRL_EXT_EN		2		/* Enable external targets */#define JCTRL_EN		1		/* Enable Jtag master *//* Fields in clkdiv */#define	CLKD_SFLASH		0x0f000000#define	CLKD_SFLASH_SHIFT	24#define	CLKD_OTP		0x000f0000#define	CLKD_OTP_SHIFT		16#define	CLKD_JTAG		0x00000f00#define	CLKD_JTAG_SHIFT		8#define	CLKD_UART		0x000000ff/* intstatus/intmask */#define	CI_GPIO			0x00000001	/* gpio intr */#define	CI_EI			0x00000002	/* ro: ext intr pin (corerev >= 3) */#define	CI_WDRESET		0x80000000	/* watchdog reset occurred *//* slow_clk_ctl */#define SCC_SS_MASK		0x00000007	/* slow clock source mask */#define	SCC_SS_LPO		0x00000000	/* source of slow clock is LPO */#define	SCC_SS_XTAL		0x00000001	/* source of slow clock is crystal */#define	SCC_SS_PCI		0x00000002	/* source of slow clock is PCI */#define SCC_LF			0x00000200	/* LPOFreqSel, 1: 160Khz, 0: 32KHz */#define SCC_LP			0x00000400	/* LPOPowerDown, 1: LPO is disabled,						 * 0: LPO is enabled						 */#define SCC_FS			0x00000800	/* ForceSlowClk, 1: sb/cores running on slow clock,						 * 0: power logic control						 */#define SCC_IP			0x00001000	/* IgnorePllOffReq, 1/0: power logic ignores/honors						 * PLL clock disable requests from core						 */#define SCC_XC			0x00002000	/* XtalControlEn, 1/0: power logic does/doesn't						 * disable crystal when appropriate						 */#define SCC_XP			0x00004000	/* XtalPU (RO), 1/0: crystal running/disabled */#define SCC_CD_MASK		0xffff0000	/* ClockDivider (SlowClk = 1/(4+divisor)) */#define SCC_CD_SHIFT		16/* system_clk_ctl */#define	SYCC_IE			0x00000001	/* ILPen: Enable Idle Low Power */#define	SYCC_AE			0x00000002	/* ALPen: Enable Active Low Power */#define	SYCC_FP			0x00000004	/* ForcePLLOn */#define	SYCC_AR			0x00000008	/* Force ALP (or HT if ALPen is not set */#define	SYCC_HR			0x00000010	/* Force HT */#define SYCC_CD_MASK		0xffff0000	/* ClkDiv  (ILP = 1/(4 * (divisor + 1)) */#define SYCC_CD_SHIFT		16/* gpiotimerval */#define GPIO_ONTIME_SHIFT	16/* clockcontrol_n */#define	CN_N1_MASK		0x3f		/* n1 control */#define	CN_N2_MASK		0x3f00		/* n2 control */#define	CN_N2_SHIFT		8#define	CN_PLLC_MASK		0xf0000		/* pll control */#define	CN_PLLC_SHIFT		16/* clockcontrol_sb/pci/uart */#define	CC_M1_MASK		0x3f		/* m1 control */#define	CC_M2_MASK		0x3f00		/* m2 control */#define	CC_M2_SHIFT		8#define	CC_M3_MASK		0x3f0000	/* m3 control */#define	CC_M3_SHIFT		16#define	CC_MC_MASK		0x1f000000	/* mux control */#define	CC_MC_SHIFT		24/* N3M Clock control magic field values */#define	CC_F6_2			0x02		/* A factor of 2 in */#define	CC_F6_3			0x03		/* 6-bit fields like */#define	CC_F6_4			0x05		/* N1, M1 or M3 */#define	CC_F6_5			0x09#define	CC_F6_6			0x11#define	CC_F6_7			0x21#define	CC_F5_BIAS		5		/* 5-bit fields get this added */#define	CC_MC_BYPASS		0x08#define	CC_MC_M1		0x04#define	CC_MC_M1M2		0x02#define	CC_MC_M1M2M3		0x01#define	CC_MC_M1M3		0x11/* Type 2 Clock control magic field values */#define	CC_T2_BIAS		2		/* n1, n2, m1 & m3 bias */#define	CC_T2M2_BIAS		3		/* m2 bias */#define	CC_T2MC_M1BYP		1#define	CC_T2MC_M2BYP		2#define	CC_T2MC_M3BYP		4/* Type 6 Clock control magic field values */#define	CC_T6_MMASK		1		/* bits of interest in m */#define	CC_T6_M0		120000000	/* sb clock for m = 0 */#define	CC_T6_M1		100000000	/* sb clock for m = 1 */#define	SB2MIPS_T6(sb)		(2 * (sb))/* Common clock base */#define	CC_CLOCK_BASE1		24000000	/* Half the clock freq */#define CC_CLOCK_BASE2		12500000	/* Alternate crystal on some PLL's *//* Clock control values for 200Mhz in 5350 */#define	CLKC_5350_N		0x0311#define	CLKC_5350_M		0x04020009/* Flash types in the chipcommon capabilities register */#define FLASH_NONE		0x000		/* No flash */#define SFLASH_ST		0x100		/* ST serial flash */#define SFLASH_AT		0x200		/* Atmel serial flash */#define	PFLASH			0x700		/* Parallel flash *//* Bits in the config registers */#define	CC_CFG_EN		0x0001		/* Enable */#define	CC_CFG_EM_MASK		0x000e		/* Extif Mode */#define	CC_CFG_EM_ASYNC		0x0002		/*   Async/Parallel flash */#define	CC_CFG_EM_SYNC		0x0004		/*   Synchronous */#define	CC_CFG_EM_PCMCIA	0x0008		/*   PCMCIA */#define	CC_CFG_EM_IDE		0x000a		/*   IDE */#define	CC_CFG_DS		0x0010		/* Data size, 0=8bit, 1=16bit */#define	CC_CFG_CD_MASK		0x0060		/* Sync: Clock divisor */#define	CC_CFG_CE		0x0080		/* Sync: Clock enable */#define	CC_CFG_SB		0x0100		/* Sync: Size/Bytestrobe *//* Start/busy bit in flashcontrol */#define SFLASH_START		0x80000000#define SFLASH_BUSY		SFLASH_START/* flashcontrol opcodes for ST flashes */#define SFLASH_ST_WREN		0x0006		/* Write Enable */#define SFLASH_ST_WRDIS		0x0004		/* Write Disable */#define SFLASH_ST_RDSR		0x0105		/* Read Status Register */#define SFLASH_ST_WRSR		0x0101		/* Write Status Register */#define SFLASH_ST_READ		0x0303		/* Read Data Bytes */#define SFLASH_ST_PP		0x0302		/* Page Program */#define SFLASH_ST_SE		0x02d8		/* Sector Erase */#define SFLASH_ST_BE		0x00c7		/* Bulk Erase */#define SFLASH_ST_DP		0x00b9		/* Deep Power-down */#define SFLASH_ST_RES		0x03ab		/* Read Electronic Signature *//* Status register bits for ST flashes */#define SFLASH_ST_WIP		0x01		/* Write In Progress */#define SFLASH_ST_WEL		0x02		/* Write Enable Latch */#define SFLASH_ST_BP_MASK	0x1c		/* Block Protect */#define SFLASH_ST_BP_SHIFT	2#define SFLASH_ST_SRWD		0x80		/* Status Register Write Disable *//* flashcontrol opcodes for Atmel flashes */#define SFLASH_AT_READ				0x07e8#define SFLASH_AT_PAGE_READ			0x07d2#define SFLASH_AT_BUF1_READ#define SFLASH_AT_BUF2_READ#define SFLASH_AT_STATUS			0x01d7#define SFLASH_AT_BUF1_WRITE			0x0384#define SFLASH_AT_BUF2_WRITE			0x0387#define SFLASH_AT_BUF1_ERASE_PROGRAM		0x0283#define SFLASH_AT_BUF2_ERASE_PROGRAM		0x0286#define SFLASH_AT_BUF1_PROGRAM			0x0288#define SFLASH_AT_BUF2_PROGRAM			0x0289#define SFLASH_AT_PAGE_ERASE			0x0281#define SFLASH_AT_BLOCK_ERASE			0x0250#define SFLASH_AT_BUF1_WRITE_ERASE_PROGRAM	0x0382#define SFLASH_AT_BUF2_WRITE_ERASE_PROGRAM	0x0385#define SFLASH_AT_BUF1_LOAD			0x0253#define SFLASH_AT_BUF2_LOAD			0x0255#define SFLASH_AT_BUF1_COMPARE			0x0260#define SFLASH_AT_BUF2_COMPARE			0x0261#define SFLASH_AT_BUF1_REPROGRAM		0x0258#define SFLASH_AT_BUF2_REPROGRAM		0x0259/* Status register bits for Atmel flashes */#define SFLASH_AT_READY				0x80#define SFLASH_AT_MISMATCH			0x40#define SFLASH_AT_ID_MASK			0x38#define SFLASH_AT_ID_SHIFT			3/* OTP regions */#define	OTP_HW_REGION	OTPS_HW_PROTECT#define	OTP_SW_REGION	OTPS_SW_PROTECT#define	OTP_CID_REGION	OTPS_CID_PROTECT/* OTP regions (Byte offsets from otp size) */#define	OTP_SWLIM_OFF	(-8)#define	OTP_CIDBASE_OFF	0#define	OTP_CIDLIM_OFF	8/* Predefined OTP words (Word offset from otp size) */#define	OTP_BOUNDARY_OFF (-4)#define	OTP_HWSIGN_OFF	(-3)#define	OTP_SWSIGN_OFF	(-2)#define	OTP_CIDSIGN_OFF	(-1)#define	OTP_CID_OFF	0#define	OTP_PKG_OFF	1#define	OTP_FID_OFF	2#define	OTP_RSV_OFF	3#define	OTP_LIM_OFF	4#define	OTP_SIGNATURE	0x578a#define	OTP_MAGIC	0x4e56/*  * These are the UART port assignments, expressed as offsets from the base * register.  These assignments should hold for any serial port based on * a 8250, 16450, or 16550(A). */#define UART_RX		0	/* In:  Receive buffer (DLAB=0) */#define UART_TX		0	/* Out: Transmit buffer (DLAB=0) */#define UART_DLL	0	/* Out: Divisor Latch Low (DLAB=1) */#define UART_IER	1	/* In/Out: Interrupt Enable Register (DLAB=0) */#define UART_DLM	1	/* Out: Divisor Latch High (DLAB=1) */#define UART_IIR	2	/* In: Interrupt Identity Register  */#define UART_FCR	2	/* Out: FIFO Control Register */#define UART_LCR	3	/* Out: Line Control Register */#define UART_MCR	4	/* Out: Modem Control Register */#define UART_LSR	5	/* In:  Line Status Register */#define UART_MSR	6	/* In:  Modem Status Register */#define UART_SCR	7	/* I/O: Scratch Register */#define UART_LCR_DLAB	0x80	/* Divisor latch access bit */#define UART_LCR_WLEN8	0x03	/* Wordlength: 8 bits */#define UART_MCR_OUT2	0x08	/* MCR GPIO out 2 */#define UART_MCR_LOOP	0x10	/* Enable loopback test mode */#define UART_LSR_THRE	0x20	/* Transmit-hold-register empty */#define UART_LSR_RXRDY	0x01	/* Receiver ready */#define UART_FCR_FIFO_ENABLE 1	/* FIFO control register bit controlling FIFO enable/disable *//* Interrupt Enable Register (IER) bits */#define UART_IER_EDSSI	8	/* enable modem status interrupt */#define UART_IER_ELSI	4	/* enable receiver line status interrupt */#define UART_IER_ETBEI  2	/* enable transmitter holding register empty interrupt */#define UART_IER_ERBFI	1	/* enable data available interrupt */#endif	/* _SBCHIPC_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -