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

📄 sbchipc.h

📁 wi-fi sources for asus wl138g v2 pci card
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * SiliconBackplane Chipcommon core hardware definitions. * * The chipcommon core provides chip identification, SB control, * jtag, 0/1/2 uarts, clock frequency control, a watchdog interrupt timer, * gpio interface, extbus, and support for serial and parallel flashes. * * $Id$ * Copyright 2005-2006, Broadcom Corporation * All Rights Reserved. *  * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * */#ifndef	_SBCHIPC_H#define	_SBCHIPC_H#ifndef _LANGUAGE_ASSEMBLY/* cpp contortions to concatenate w/arg prescan */#ifndef PAD#define	_PADLINE(line)	pad ## line#define	_XSTR(line)	_PADLINE(line)#define	PAD		_XSTR(__LINE__)#endif	/* PAD */typedef volatile struct {	uint32	chipid;			/* 0x0 */	uint32	capabilities;	uint32	corecontrol;		/* corerev >= 1 */	uint32	bist;	/* OTP */	uint32	otpstatus;		/* 0x10, corerev >= 10 */	uint32	otpcontrol;	uint32	otpprog;	uint32	PAD;	/* Interrupt control */	uint32	intstatus;		/* 0x20 */	uint32	intmask;	uint32	chipcontrol;		/* 0x28, rev >= 11 */	uint32	chipstatus;		/* 0x2c, rev >= 11 */	/* Jtag Master */	uint32	jtagcmd;		/* 0x30, rev >= 10 */	uint32	jtagir;	uint32	jtagdr;	uint32	jtagctrl;	/* serial flash interface registers */	uint32	flashcontrol;		/* 0x40 */	uint32	flashaddress;	uint32	flashdata;	uint32	PAD[1];	/* Silicon backplane configuration broadcast control */	uint32	broadcastaddress;	/* 0x50 */	uint32	broadcastdata;	uint32	PAD[2];	/* gpio - cleared only by power-on-reset */	uint32	gpioin;			/* 0x60 */	uint32	gpioout;	uint32	gpioouten;	uint32	gpiocontrol;	uint32	gpiointpolarity;	uint32	gpiointmask;	uint32	PAD[2];	/* Watchdog timer */	uint32	watchdog;		/* 0x80 */	uint32	PAD[1];	/* GPIO based LED powersave registers corerev >= 16 */	uint32  gpiotimerval;		/* 0x88 */	uint32  gpiotimeroutmask;	/* clock control */	uint32	clockcontrol_n;		/* 0x90 */	uint32	clockcontrol_sb;	/* aka m0 */	uint32	clockcontrol_pci;	/* aka m1 */	uint32	clockcontrol_m2;	/* mii/uart/mipsref */	uint32	clockcontrol_m3;	/* cpu */	uint32	clkdiv;			/* corerev >= 3 */	uint32	PAD[2];	/* pll delay registers (corerev >= 4) */	uint32	pll_on_delay;		/* 0xb0 */	uint32	fref_sel_delay;	uint32	slow_clk_ctl;		/* 5 < corerev < 10 */	uint32	PAD[1];	/* Instaclock registers (corerev >= 10) */	uint32	system_clk_ctl;		/* 0xc0 */	uint32	clkstatestretch;	uint32	PAD[14];	/* ExtBus control registers (corerev >= 3) */	uint32	pcmcia_config;		/* 0x100 */	uint32	pcmcia_memwait;	uint32	pcmcia_attrwait;	uint32	pcmcia_iowait;	uint32	ide_config;	uint32	ide_memwait;	uint32	ide_attrwait;	uint32	ide_iowait;	uint32	prog_config;	uint32	prog_waitcount;	uint32	flash_config;	uint32	flash_waitcount;	uint32	PAD[116];	/* uarts */	uint8	uart0data;		/* 0x300 */	uint8	uart0imr;	uint8	uart0fcr;	uint8	uart0lcr;	uint8	uart0mcr;	uint8	uart0lsr;	uint8	uart0msr;	uint8	uart0scratch;	uint8	PAD[248];		/* corerev >= 1 */	uint8	uart1data;		/* 0x400 */	uint8	uart1imr;	uint8	uart1fcr;	uint8	uart1lcr;	uint8	uart1mcr;	uint8	uart1lsr;	uint8	uart1msr;	uint8	uart1scratch;} chipcregs_t;#endif /* _LANGUAGE_ASSEMBLY */#define	CC_CHIPID		0#define	CC_CAPABILITIES		4#define	CC_JTAGCMD		0x30#define	CC_JTAGIR		0x34#define	CC_JTAGDR		0x38#define	CC_JTAGCTRL		0x3c#define	CC_WATCHDOG		0x80#define	CC_CLKC_N		0x90#define	CC_CLKC_M0		0x94#define	CC_CLKC_M1		0x98#define	CC_CLKC_M2		0x9c#define	CC_CLKC_M3		0xa0#define	CC_CLKDIV		0xa4#define	CC_SYS_CLK_CTL		0xc0#define	CC_OTP			0x800/* chipid */#define	CID_ID_MASK		0x0000ffff	/* Chip Id mask */#define	CID_REV_MASK		0x000f0000	/* Chip Revision mask */#define	CID_REV_SHIFT		16		/* Chip Revision shift */#define	CID_PKG_MASK		0x00f00000	/* Package Option mask */#define	CID_PKG_SHIFT		20		/* Package Option shift */#define	CID_CC_MASK		0x0f000000	/* CoreCount (corerev >= 4) */#define CID_CC_SHIFT		24/* capabilities */#define	CAP_UARTS_MASK		0x00000003	/* Number of uarts */#define CAP_MIPSEB		0x00000004	/* MIPS is in big-endian mode */#define CAP_UCLKSEL		0x00000018	/* UARTs clock select */#define CAP_UINTCLK		0x00000008	/* UARTs are driven by internal divided clock */#define CAP_UARTGPIO		0x00000020	/* UARTs own Gpio's 15:12 */#define CAP_EXTBUS		0x00000040	/* External bus present */#define	CAP_FLASH_MASK		0x00000700	/* Type of flash */#define	CAP_PLL_MASK		0x00038000	/* Type of PLL */#define CAP_PWR_CTL		0x00040000	/* Power control */#define CAP_OTPSIZE		0x00380000	/* OTP Size (0 = none) */#define CAP_OTPSIZE_SHIFT	19		/* OTP Size shift */#define CAP_OTPSIZE_BASE	5		/* OTP Size base */#define CAP_JTAGP		0x00400000	/* JTAG Master Present */#define CAP_ROM			0x00800000	/* Internal boot rom active */#define CAP_BKPLN64		0x08000000	/* 64-bit backplane *//* PLL type */#define PLL_NONE		0x00000000#define PLL_TYPE1		0x00010000	/* 48Mhz base, 3 dividers */#define PLL_TYPE2		0x00020000	/* 48Mhz, 4 dividers */#define PLL_TYPE3		0x00030000	/* 25Mhz, 2 dividers */#define PLL_TYPE4		0x00008000	/* 48Mhz, 4 dividers */#define PLL_TYPE5		0x00018000	/* 25Mhz, 4 dividers */#define PLL_TYPE6		0x00028000	/* 100/200 or 120/240 only */#define PLL_TYPE7		0x00038000	/* 25Mhz, 4 dividers *//* corecontrol */#define CC_UARTCLKO		0x00000001	/* Drive UART with internal clock */#define	CC_SE			0x00000002	/* sync clk out enable (corerev >= 3) *//* Fields in the otpstatus register */#define	OTPS_PROGFAIL		0x80000000#define	OTPS_PROTECT		0x00000007#define	OTPS_HW_PROTECT		0x00000001#define	OTPS_SW_PROTECT		0x00000002#define	OTPS_CID_PROTECT	0x00000004/* Fields in the otpcontrol register */#define	OTPC_RECWAIT		0xff000000#define	OTPC_PROGWAIT		0x00ffff00#define	OTPC_PRW_SHIFT		8#define	OTPC_MAXFAIL		0x00000038#define	OTPC_VSEL		0x00000006#define	OTPC_SELVL		0x00000001/* Fields in otpprog */#define	OTPP_COL_MASK		0x000000ff#define	OTPP_ROW_MASK		0x0000ff00#define	OTPP_ROW_SHIFT		8#define	OTPP_READERR		0x10000000#define	OTPP_VALUE		0x20000000#define	OTPP_VALUE_SHIFT		29#define	OTPP_READ		0x40000000#define	OTPP_START		0x80000000#define	OTPP_BUSY		0x80000000/* jtagcmd */#define JCMD_START		0x80000000#define JCMD_BUSY		0x80000000#define JCMD_PAUSE		0x40000000#define JCMD0_ACC_MASK		0x0000f000#define JCMD0_ACC_IRDR		0x00000000#define JCMD0_ACC_DR		0x00001000#define JCMD0_ACC_IR		0x00002000#define JCMD0_ACC_RESET		0x00003000#define JCMD0_ACC_IRPDR		0x00004000#define JCMD0_ACC_PDR		0x00005000#define JCMD0_IRW_MASK		0x00000f00#define JCMD_ACC_MASK		0x000f0000	/* Changes for corerev 11 */#define JCMD_ACC_IRDR		0x00000000#define JCMD_ACC_DR		0x00010000#define JCMD_ACC_IR		0x00020000#define JCMD_ACC_RESET		0x00030000#define JCMD_ACC_IRPDR		0x00040000

⌨️ 快捷键说明

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