亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
色呦呦国产精品| 777精品伊人久久久久大香线蕉| 99精品国产一区二区三区不卡| 欧美探花视频资源| 国产三级一区二区三区| 亚洲高清免费在线| www.欧美日韩| 精品国产乱码久久久久久图片| 亚洲永久免费视频| 国产风韵犹存在线视精品| 91精品黄色片免费大全| 一区二区视频在线看| 国产盗摄一区二区三区| 日韩亚洲欧美一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 国产一区二区三区在线观看免费| 4438x亚洲最大成人网| 一个色综合av| 91美女视频网站| 欧美国产精品v| 国产综合色产在线精品| 欧美二区三区91| 亚洲国产日韩一级| 在线精品国精品国产尤物884a| 国产精品免费视频观看| 国产精品主播直播| 久久精品欧美日韩| 国产成人精品免费网站| 精品日韩在线观看| 蜜臀av一级做a爰片久久| 欧美人与禽zozo性伦| 亚洲国产精品影院| 欧美三区免费完整视频在线观看| 亚洲精品视频在线| 91麻豆国产福利精品| 亚洲精选一二三| 色香蕉成人二区免费| 亚洲精品一二三| 欧洲精品中文字幕| 天天色图综合网| 国产午夜精品久久久久久免费视| 青青草国产成人99久久| 日韩免费高清电影| 国产美女精品人人做人人爽| 精品国产91乱码一区二区三区 | 蜜臀精品一区二区三区在线观看| 欧美久久久久免费| 美腿丝袜亚洲一区| www国产亚洲精品久久麻豆| 国产真实乱偷精品视频免| 久久久久国色av免费看影院| 狠狠狠色丁香婷婷综合久久五月| 久久综合丝袜日本网| jiyouzz国产精品久久| 自拍av一区二区三区| 在线免费不卡视频| 日韩福利电影在线观看| 久久影院午夜片一区| 成人激情黄色小说| 亚洲午夜免费视频| 久久综合中文字幕| 99久久亚洲一区二区三区青草| 亚洲精品国产品国语在线app| 欧美剧在线免费观看网站| 久久99精品网久久| 国产精品美女一区二区三区| 在线观看国产日韩| 精品系列免费在线观看| 中文字幕一区二区三区在线播放 | 国产精品中文字幕一区二区三区| 国产精品乱码一区二三区小蝌蚪| 国产片一区二区| 欧美怡红院视频| 韩国视频一区二区| 亚洲精品一二三四区| 日韩精品资源二区在线| 97se狠狠狠综合亚洲狠狠| 日韩va欧美va亚洲va久久| 亚洲国产精品激情在线观看| 欧美剧情片在线观看| 成人美女在线视频| 久久精品999| 一区二区三区精品在线| 2020国产精品| 91精品国产综合久久久久久漫画| 北岛玲一区二区三区四区| 蜜臀久久99精品久久久画质超高清| 日韩理论片网站| www国产成人免费观看视频 深夜成人网| 在线免费亚洲电影| 高清不卡一二三区| 另类小说视频一区二区| 一区二区三区四区不卡在线 | 国内精品视频一区二区三区八戒| 亚洲与欧洲av电影| 1区2区3区精品视频| 国产亚洲视频系列| 日韩欧美精品在线视频| 欧美精品日韩一本| 色婷婷亚洲综合| bt欧美亚洲午夜电影天堂| 精品一二线国产| 美女视频黄a大片欧美| 亚洲国产综合视频在线观看| 中文字幕中文在线不卡住| 26uuu国产一区二区三区| 国产精品天干天干在线综合| 欧美成人免费网站| 日韩一区二区三区观看| 在线成人高清不卡| 欧美日韩一区二区在线观看视频 | 在线视频一区二区三| 99久久99久久免费精品蜜臀| 国产高清亚洲一区| 黑人巨大精品欧美一区| 久久99国产精品麻豆| 麻豆精品视频在线| 捆绑紧缚一区二区三区视频| 日韩高清不卡一区二区| 日本欧美久久久久免费播放网| 日韩精品视频网| 伦理电影国产精品| 麻豆91在线播放免费| 久久精品国产精品亚洲综合| 九九热在线视频观看这里只有精品| 日日夜夜一区二区| 免费黄网站欧美| 国产精品一区二区不卡| 成人妖精视频yjsp地址| 91在线porny国产在线看| 色欧美乱欧美15图片| 在线观看网站黄不卡| 欧美人牲a欧美精品| 日韩欧美国产一区二区三区| 精品国产免费久久| 中文av一区特黄| 亚洲精品国产一区二区精华液| 亚洲一区二区高清| 日韩国产欧美一区二区三区| 国产综合一区二区| av一本久道久久综合久久鬼色| 日本丶国产丶欧美色综合| 欧美军同video69gay| 2024国产精品| 最新中文字幕一区二区三区| 国产福利91精品| 欧美网站大全在线观看| 日韩精品一区在线| 中文字幕在线一区免费| 亚洲影院理伦片| 激情另类小说区图片区视频区| 不卡av电影在线播放| 欧美无砖砖区免费| 久久天堂av综合合色蜜桃网| 亚洲欧美乱综合| 精品一区二区精品| 色噜噜狠狠色综合欧洲selulu| 91麻豆精品国产91久久久使用方法| 久久婷婷国产综合精品青草| 夜夜爽夜夜爽精品视频| 国产在线不卡一区| 在线一区二区三区做爰视频网站| 欧美一区二区人人喊爽| 亚洲欧洲三级电影| 蜜臀久久99精品久久久画质超高清| 99久久精品国产一区| 日韩欧美另类在线| 亚洲一级二级三级| 丰满亚洲少妇av| 日韩欧美一二三区| 一区二区三区**美女毛片| 国产在线精品视频| 51久久夜色精品国产麻豆| 亚洲色图色小说| 国产精选一区二区三区| 欧美三级电影在线看| 国产精品欧美久久久久无广告| 免费在线观看视频一区| 日本高清成人免费播放| 中文字幕免费观看一区| 欧美aⅴ一区二区三区视频| 在线观看亚洲精品| 亚洲男人的天堂在线aⅴ视频| 国内精品不卡在线| 91精品在线一区二区| 亚洲大片免费看| 色婷婷av久久久久久久| 国产精品免费视频观看| 国产老肥熟一区二区三区| 51精品久久久久久久蜜臀| 中文字幕在线不卡一区| 麻豆91精品91久久久的内涵| 欧美日韩国产三级| 国产精品超碰97尤物18| 国内精品自线一区二区三区视频| 精品日韩99亚洲| 天堂在线亚洲视频| 一本一本大道香蕉久在线精品| ...xxx性欧美| 成人蜜臀av电影|