亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cpm_8260.h

?? 一個非常有用的SPI驅動程序,是在LINUX平臺下的,但也可以一直到其他平臺
?? H
?? 第 1 頁 / 共 3 頁
字號:

/*
 * MPC8260 Communication Processor Module.
 * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
 *
 * This file contains structures and information for the communication
 * processor channels found in the dual port RAM or parameter RAM.
 * All CPM control and status is available through the MPC8260 internal
 * memory map.  See immap.h for details.
 */
#ifdef __KERNEL__
#ifndef __CPM_82XX__
#define __CPM_82XX__

#include <asm/immap_8260.h>

/* CPM Command register.
*/
#define CPM_CR_RST	((uint)0x80000000)
#define CPM_CR_PAGE	((uint)0x7c000000)
#define CPM_CR_SBLOCK	((uint)0x03e00000)
#define CPM_CR_FLG	((uint)0x00010000)
#define CPM_CR_MCN	((uint)0x00003fc0)
#define CPM_CR_OPCODE	((uint)0x0000000f)

/* Device sub-block and page codes.
*/
#define CPM_CR_SCC1_SBLOCK	(0x04)
#define CPM_CR_SCC2_SBLOCK	(0x05)
#define CPM_CR_SCC3_SBLOCK	(0x06)
#define CPM_CR_SCC4_SBLOCK	(0x07)
#define CPM_CR_SMC1_SBLOCK	(0x08)
#define CPM_CR_SMC2_SBLOCK	(0x09)
#define CPM_CR_SPI_SBLOCK	(0x0a)
#define CPM_CR_I2C_SBLOCK	(0x0b)
#define CPM_CR_TIMER_SBLOCK	(0x0f)
#define CPM_CR_RAND_SBLOCK	(0x0e)
#define CPM_CR_FCC1_SBLOCK	(0x10)
#define CPM_CR_FCC2_SBLOCK	(0x11)
#define CPM_CR_FCC3_SBLOCK	(0x12)
#define CPM_CR_IDMA1_SBLOCK	(0x14)
#define CPM_CR_IDMA2_SBLOCK	(0x15)
#define CPM_CR_IDMA3_SBLOCK	(0x16)
#define CPM_CR_IDMA4_SBLOCK	(0x17)
#define CPM_CR_MCC1_SBLOCK	(0x1c)

#define CPM_CR_SCC1_PAGE	(0x00)
#define CPM_CR_SCC2_PAGE	(0x01)
#define CPM_CR_SCC3_PAGE	(0x02)
#define CPM_CR_SCC4_PAGE	(0x03)
#define CPM_CR_SMC1_PAGE	(0x07)
#define CPM_CR_SMC2_PAGE	(0x08)
#define CPM_CR_SPI_PAGE		(0x09)
#define CPM_CR_I2C_PAGE		(0x0a)
#define CPM_CR_TIMER_PAGE	(0x0a)
#define CPM_CR_RAND_PAGE	(0x0a)
#define CPM_CR_FCC1_PAGE	(0x04)
#define CPM_CR_FCC2_PAGE	(0x05)
#define CPM_CR_FCC3_PAGE	(0x06)
#define CPM_CR_IDMA1_PAGE	(0x07)
#define CPM_CR_IDMA2_PAGE	(0x08)
#define CPM_CR_IDMA3_PAGE	(0x09)
#define CPM_CR_IDMA4_PAGE	(0x0a)
#define CPM_CR_MCC1_PAGE	(0x07)
#define CPM_CR_MCC2_PAGE	(0x08)

/* Some opcodes (there are more...later)
*/
#define CPM_CR_INIT_TRX		((ushort)0x0000)
#define CPM_CR_INIT_RX		((ushort)0x0001)
#define CPM_CR_INIT_TX		((ushort)0x0002)
#define CPM_CR_HUNT_MODE	((ushort)0x0003)
#define CPM_CR_STOP_TX		((ushort)0x0004)
#define CPM_CR_RESTART_TX	((ushort)0x0006)
#define CPM_CR_SET_GADDR	((ushort)0x0008)
#define CPM_CR_START_IDMA	((ushort)0x0009)#define CPM_CR_STOP_IDMA	((ushort)0x000b)

#define mk_cr_cmd(PG, SBC, MCN, OP) \
	((PG << 26) | (SBC << 21) | (MCN << 6) | OP)

/* Dual Port RAM addresses.  The first 16K is available for almost
 * any CPM use, so we put the BDs there.  The first 128 bytes are
 * used for SMC1 and SMC2 parameter RAM, so we start allocating
 * BDs above that.  The last 64 bytes are reserved for I2C parameter
 * RAM. All of this must change when we start downloading RAM microcode.
 */
#ifdef CONFIG_MPC8272ADS#define CPM_DATAONLY_BASE	((uint)0x0)#define CPM_DATAONLY_SIZE	((uint)0x2000 - CPM_DATAONLY_BASE)#define CPM_DP_NOSPACE		((uint)0x7fffffff)#define CPM_FCC_SPECIAL_BASE	((uint)0x00009000)#else#define CPM_DATAONLY_BASE	((uint)0xB800)#define CPM_DATAONLY_SIZE	((uint)0xC000 - CPM_DATAONLY_BASE)#define CPM_DP_NOSPACE		((uint)0x7fffffff)#define CPM_FCC_SPECIAL_BASE	((uint)0x0000b000)#endif  
/* 
#define CPM_DATAONLY_BASE	((uint)128)
#define CPM_DATAONLY_SIZE	((uint)(16 * 1024) - CPM_DATAONLY_BASE - 64)
#define CPM_DP_NOSPACE		((uint)0x7fffffff)
#define CPM_FCC_SPECIAL_BASE	((uint)0x0000b000)
*/
/* The number of pages of host memory we allocate for CPM.  This is
 * done early in kernel initialization to get physically contiguous
 * pages.
 */
#define NUM_CPM_HOST_PAGES	2


/* Export the base address of the communication processor registers
 * and dual port ram.
 */
extern	cpm8260_t	*cpmp;		/* Pointer to comm processor */
uint		m8260_cpm_dpalloc(uint size, uint align);
uint		m8260_cpm_hostalloc(uint size, uint align);
void		m8260_cpm_setbrg(uint brg, uint rate);
void		m8260_cpm_fastbrg(uint brg, uint rate, int div16);

/* Buffer descriptors used by many of the CPM protocols.
*/
typedef struct cpm_buf_desc {
	ushort	cbd_sc;		/* Status and Control */
	ushort	cbd_datlen;	/* Data length in buffer */
	uint	cbd_bufaddr;	/* Buffer address in host memory */
} cbd_t;

#define BD_SC_EMPTY	((ushort)0x8000)	/* Receive is empty */
#define BD_SC_READY	((ushort)0x8000)	/* Transmit is ready */
#define BD_SC_WRAP	((ushort)0x2000)	/* Last buffer descriptor */
#define BD_SC_INTRPT	((ushort)0x1000)	/* Interrupt on change */
#define BD_SC_LAST	((ushort)0x0800)	/* Last buffer in frame */
#define BD_SC_CM	((ushort)0x0200)	/* Continous mode */
#define BD_SC_ID	((ushort)0x0100)	/* Rec'd too many idles */
#define BD_SC_P		((ushort)0x0100)	/* xmt preamble */
#define BD_SC_BR	((ushort)0x0020)	/* Break received */
#define BD_SC_FR	((ushort)0x0010)	/* Framing error */
#define BD_SC_PR	((ushort)0x0008)	/* Parity error */
#define BD_SC_OV	((ushort)0x0002)	/* Overrun */
#define BD_SC_CD	((ushort)0x0001)	/* ?? */

/* Function code bits, usually generic to devices.
*/
#define CPMFCR_GBL	((u_char)0x20)	/* Set memory snooping */
#define CPMFCR_EB	((u_char)0x10)	/* Set big endian byte order */
#define CPMFCR_TC2	((u_char)0x04)	/* Transfer code 2 value */
#define CPMFCR_DTB	((u_char)0x02)	/* Use local bus for data when set */
#define CPMFCR_BDB	((u_char)0x01)	/* Use local bus for BD when set */

/* Parameter RAM offsets from the base.
*/
#define PROFF_SCC1		((uint)0x8000)
#define PROFF_SCC2		((uint)0x8100)
#define PROFF_SCC3		((uint)0x8200)
#define PROFF_SCC4		((uint)0x8300)
#define PROFF_FCC1		((uint)0x8400)
#define PROFF_FCC2		((uint)0x8500)
#define PROFF_FCC3		((uint)0x8600)
#define PROFF_MCC1		((uint)0x8700)
#define PROFF_SMC1_BASE		((uint)0x87fc)
#define PROFF_IDMA1_BASE	((uint)0x87fe)
#define PROFF_MCC2		((uint)0x8800)
#define PROFF_SMC2_BASE		((uint)0x88fc)
#define PROFF_IDMA2_BASE	((uint)0x88fe)
#define PROFF_SPI_BASE		((uint)0x89fc)
#define PROFF_IDMA3_BASE	((uint)0x89fe)
#define PROFF_TIMERS		((uint)0x8ae0)
#define PROFF_REVNUM		((uint)0x8af0)
#define PROFF_RAND		((uint)0x8af8)
#define PROFF_I2C_BASE		((uint)0x8afc)
#define PROFF_IDMA4_BASE	((uint)0x8afe)

/* The SMCs are relocated to any of the first eight DPRAM pages.
 * We will fix these at the first locations of DPRAM, until we
 * get some microcode patches :-).
 * The parameter ram space for the SMCs is fifty-some bytes, and
 * they are required to start on a 64 byte boundary.
 */
#define PROFF_SMC1	(0)
/* 8248PC : fixed SMC2_PARAM_BASE to SCC1_PARAM_BASE in DPRAM as SCC1 is unused *//* #define PROFF_SMC2	(64) */#define PROFF_SMC2	PROFF_SCC1
#define PROFF_I2C	((16 * 1024) - 64)
#define PROFF_SPI	((16 * 1024) - 128)


/* Define enough so I can at least use the serial port as a UART.
 */
typedef struct smc_uart {
	ushort	smc_rbase;	/* Rx Buffer descriptor base address */
	ushort	smc_tbase;	/* Tx Buffer descriptor base address */
	u_char	smc_rfcr;	/* Rx function code */
	u_char	smc_tfcr;	/* Tx function code */
	ushort	smc_mrblr;	/* Max receive buffer length */
	uint	smc_rstate;	/* Internal */
	uint	smc_idp;	/* Internal */
	ushort	smc_rbptr;	/* Internal */
	ushort	smc_ibc;	/* Internal */
	uint	smc_rxtmp;	/* Internal */
	uint	smc_tstate;	/* Internal */
	uint	smc_tdp;	/* Internal */
	ushort	smc_tbptr;	/* Internal */
	ushort	smc_tbc;	/* Internal */
	uint	smc_txtmp;	/* Internal */
	ushort	smc_maxidl;	/* Maximum idle characters */
	ushort	smc_tmpidl;	/* Temporary idle counter */
	ushort	smc_brklen;	/* Last received break length */
	ushort	smc_brkec;	/* rcv'd break condition counter */
	ushort	smc_brkcr;	/* xmt break count register */
	ushort	smc_rmask;	/* Temporary bit mask */
	uint	smc_stmp;	/* SDMA Temp */
} smc_uart_t;

/* SMC uart mode register (Internal memory map).
*/
#define	SMCMR_REN	((ushort)0x0001)
#define SMCMR_TEN	((ushort)0x0002)
#define SMCMR_DM	((ushort)0x000c)
#define SMCMR_SM_GCI	((ushort)0x0000)
#define SMCMR_SM_UART	((ushort)0x0020)
#define SMCMR_SM_TRANS	((ushort)0x0030)
#define SMCMR_SM_MASK	((ushort)0x0030)
#define SMCMR_PM_EVEN	((ushort)0x0100)	/* Even parity, else odd */
#define SMCMR_REVD	SMCMR_PM_EVEN
#define SMCMR_PEN	((ushort)0x0200)	/* Parity enable */
#define SMCMR_BS	SMCMR_PEN
#define SMCMR_SL	((ushort)0x0400)	/* Two stops, else one */
#define SMCR_CLEN_MASK	((ushort)0x7800)	/* Character length */
#define smcr_mk_clen(C)	(((C) << 11) & SMCR_CLEN_MASK)

/* SMC Event and Mask register.
*/
#define	SMCM_TXE	((unsigned char)0x10)
#define	SMCM_BSY	((unsigned char)0x04)
#define	SMCM_TX		((unsigned char)0x02)
#define	SMCM_RX		((unsigned char)0x01)

/* Baud rate generators.
*/
#define CPM_BRG_RST		((uint)0x00020000)
#define CPM_BRG_EN		((uint)0x00010000)
#define CPM_BRG_EXTC_INT	((uint)0x00000000)
#define CPM_BRG_EXTC_CLK3_9	((uint)0x00004000)
#define CPM_BRG_EXTC_CLK5_15	((uint)0x00008000)
#define CPM_BRG_ATB		((uint)0x00002000)
#define CPM_BRG_CD_MASK		((uint)0x00001ffe)
#define CPM_BRG_DIV16		((uint)0x00000001)

/* SCCs.
*/
#define SCC_GSMRH_IRP		((uint)0x00040000)
#define SCC_GSMRH_GDE		((uint)0x00010000)
#define SCC_GSMRH_TCRC_CCITT	((uint)0x00008000)
#define SCC_GSMRH_TCRC_BISYNC	((uint)0x00004000)
#define SCC_GSMRH_TCRC_HDLC	((uint)0x00000000)
#define SCC_GSMRH_REVD		((uint)0x00002000)
#define SCC_GSMRH_TRX		((uint)0x00001000)
#define SCC_GSMRH_TTX		((uint)0x00000800)
#define SCC_GSMRH_CDP		((uint)0x00000400)
#define SCC_GSMRH_CTSP		((uint)0x00000200)
#define SCC_GSMRH_CDS		((uint)0x00000100)
#define SCC_GSMRH_CTSS		((uint)0x00000080)
#define SCC_GSMRH_TFL		((uint)0x00000040)
#define SCC_GSMRH_RFW		((uint)0x00000020)
#define SCC_GSMRH_TXSY		((uint)0x00000010)
#define SCC_GSMRH_SYNL16	((uint)0x0000000c)
#define SCC_GSMRH_SYNL8		((uint)0x00000008)
#define SCC_GSMRH_SYNL4		((uint)0x00000004)
#define SCC_GSMRH_RTSM		((uint)0x00000002)
#define SCC_GSMRH_RSYN		((uint)0x00000001)

#define SCC_GSMRL_SIR		((uint)0x80000000)	/* SCC2 only */
#define SCC_GSMRL_EDGE_NONE	((uint)0x60000000)
#define SCC_GSMRL_EDGE_NEG	((uint)0x40000000)
#define SCC_GSMRL_EDGE_POS	((uint)0x20000000)
#define SCC_GSMRL_EDGE_BOTH	((uint)0x00000000)
#define SCC_GSMRL_TCI		((uint)0x10000000)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩专区在线| 一级精品视频在线观看宜春院| 国产精品女同互慰在线看| 亚洲一区二区av在线| 国产一区二区精品久久99| 欧美日韩另类一区| 国产精品久久久久久久久晋中| 美女视频免费一区| 在线观看一区不卡| √…a在线天堂一区| 国模冰冰炮一区二区| 7777精品伊人久久久大香线蕉 | 自拍偷自拍亚洲精品播放| 看电视剧不卡顿的网站| 在线观看免费亚洲| 亚洲天堂中文字幕| 99久精品国产| 中文幕一区二区三区久久蜜桃| 老司机午夜精品| 91精品国产综合久久久久| 夜夜爽夜夜爽精品视频| 色综合天天综合网天天狠天天| 久久久精品免费免费| 国产一区欧美日韩| 欧美白人最猛性xxxxx69交| 石原莉奈一区二区三区在线观看| 色综合久久中文综合久久97| 中文字幕精品一区| 成人精品视频一区| 国产精品视频看| av成人老司机| 18涩涩午夜精品.www| 99精品欧美一区二区三区小说 | 亚洲sss视频在线视频| 色噜噜狠狠成人中文综合| 日韩一区欧美小说| 99re热这里只有精品免费视频| 国产精品国产三级国产aⅴ中文| 国产福利不卡视频| 国产精品入口麻豆九色| eeuss国产一区二区三区| 亚洲视频一区二区免费在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲欧洲精品成人久久奇米网| 99精品国产99久久久久久白柏| 亚洲欧洲性图库| 91在线免费看| 亚洲综合丁香婷婷六月香| 欧美三级日韩在线| 久久黄色级2电影| 国产日韩欧美a| 色综合天天综合狠狠| 亚洲福利一二三区| 日韩欧美色电影| 成人在线综合网站| 悠悠色在线精品| 欧美日韩情趣电影| 国产乱妇无码大片在线观看| 成人欧美一区二区三区白人| 欧美三级资源在线| 国产精品综合一区二区| 亚洲精品免费在线观看| 欧美一区二区三区喷汁尤物| 国产成人免费av在线| 亚洲制服丝袜av| 久久综合999| 欧美午夜电影网| 国产一区美女在线| 亚洲国产精品视频| 国产午夜精品久久久久久免费视| 色婷婷久久久久swag精品| 毛片av一区二区| 国产精品伦理一区二区| 3d动漫精品啪啪一区二区竹菊 | 日韩成人av影视| 国产三级三级三级精品8ⅰ区| 一本久久综合亚洲鲁鲁五月天 | 99久久精品国产网站| 亚洲一区免费在线观看| 久久综合九色综合97婷婷女人| 日本精品视频一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲成人高清在线| 久久精品人人做| 欧美精品在线视频| av资源站一区| 国产一区免费电影| 日韩成人一级大片| 亚洲同性gay激情无套| 2023国产精品自拍| 欧美精品乱码久久久久久| av电影在线观看完整版一区二区| 蜜臂av日日欢夜夜爽一区| 一区二区三区 在线观看视频| 久久九九久精品国产免费直播| 欧美视频一区二区三区| 91在线国产福利| 国产91精品在线观看| 精品一区二区在线播放| 日韩精品电影在线观看| 亚洲高清一区二区三区| 亚洲欧美激情小说另类| 国产精品毛片高清在线完整版| 久久综合九色综合97_久久久| 欧美日韩国产bt| 欧美在线免费视屏| 91女神在线视频| 成人久久18免费网站麻豆| 国产麻豆9l精品三级站| 国产一区二区女| 国产一区欧美二区| 国产成人亚洲综合a∨猫咪| 精东粉嫩av免费一区二区三区| 欧美aaa在线| 另类调教123区| 久久99在线观看| 国产一区二区三区四区五区入口| 久久精品国产网站| 国产乱码精品一区二区三区忘忧草 | www.欧美色图| www.欧美精品一二区| 99精品视频免费在线观看| 99re这里只有精品6| 91亚洲大成网污www| 一本久道久久综合中文字幕| 在线影视一区二区三区| 欧美亚洲国产bt| 欧美丰满嫩嫩电影| 91精品国产欧美一区二区18| 欧美va亚洲va香蕉在线| 国产欧美日韩在线视频| 自拍偷拍亚洲综合| 性做久久久久久免费观看 | 欧美电影影音先锋| 日韩女优电影在线观看| 久久亚洲一区二区三区明星换脸 | 欧美肥妇毛茸茸| 欧美精品一区二区高清在线观看| 久久久精品中文字幕麻豆发布| 中文字幕欧美区| 一区二区三区美女视频| 日韩中文欧美在线| 国产麻豆视频一区| 91偷拍与自偷拍精品| 欧美网站一区二区| 欧美成人综合网站| 国产精品另类一区| 亚洲 欧美综合在线网络| 国产资源在线一区| 91福利精品视频| 欧美精品一区二区久久久| 亚洲免费电影在线| 久久99在线观看| 欧美性大战久久久久久久| 日韩精品一区二区三区在线观看 | 欧美大白屁股肥臀xxxxxx| 久久久噜噜噜久久中文字幕色伊伊 | 欧美精品丝袜久久久中文字幕| 精品国产91乱码一区二区三区| 亚洲特级片在线| 蓝色福利精品导航| 欧美视频一区二区三区四区| 国产视频一区在线观看| 婷婷开心激情综合| 成人爱爱电影网址| 26uuu色噜噜精品一区| 亚洲一区欧美一区| 99免费精品视频| 久久在线免费观看| 午夜视频在线观看一区二区三区| 丰满岳乱妇一区二区三区| 3751色影院一区二区三区| 亚洲三级电影全部在线观看高清| 韩日欧美一区二区三区| 欧美挠脚心视频网站| 亚洲色图视频免费播放| 国产精品12区| 欧美mv和日韩mv的网站| 亚洲第一精品在线| 91蝌蚪porny九色| 国产精品免费av| 国产精品一区免费视频| 日韩欧美高清在线| 日韩综合在线视频| 欧美三级视频在线| 亚洲资源中文字幕| 在线视频亚洲一区| 亚洲免费观看视频| 色悠悠久久综合| 亚洲免费观看高清在线观看| 不卡电影一区二区三区| 亚洲国产精品成人综合| 国产精品亚洲一区二区三区在线 | 国产日产欧美一区二区视频| 久久精品国产99| 欧美不卡一区二区| 久久66热偷产精品| 久久综合久久鬼色| 成人一区在线观看| 中文字幕中文乱码欧美一区二区|