i2c-omap24xx.h

来自「Linux Kernel 2.6.9 for OMAP1710」· C头文件 代码 · 共 105 行

H
105
字号
/* * drivers/i2c/busses/i2c-omap24xx.h * * I2C driver for OMAP24xx I2C controller. * * Author: Andy Lowe (source@mvista.com) * * Copyright (C) 2004 MontaVista Software, Inc. * Copyright (C) 2004 Texas Instruments. * * This file is licensed under the terms of the GNU General Public License  * version 2. This program is licensed "as is" without any warranty of any  * kind, whether express or implied. */#ifndef OMAP24XXI2C_H#define OMAP24XXI2C_H/* physical memory map definitions */	/* I2C1 module */#define I2C1_REG_BASE		0x48070000#define I2C1_REG_SIZE		0x00001000	/* I2C2 module */#define I2C2_REG_BASE		0x48072000#define I2C2_REG_SIZE		0x00001000/* define I2C register offsets */#define I2C_REV			0x00#define I2C_IE			0x04#define I2C_STAT		0x08#define I2C_SYSS		0x10#define I2C_BUF			0x14#define I2C_CNT			0x18#define I2C_DATA		0x1C#define I2C_SYSC		0x20#define I2C_CON			0x24#define I2C_OA			0x28#define I2C_SA			0x2C#define I2C_PSC			0x30#define I2C_SCLL		0x34#define I2C_SCLH		0x38#define I2C_SYSTEST		0x3C/* Define bit fields within selected registers */#define I2C_REV_MAJOR				(15 << 4)#define I2C_REV_MAJOR_SHIFT			4#define I2C_REV_MINOR				(15 << 0)#define I2C_REV_MINOR_SHIFT			0#define I2C_IE_GC_IE				(1 <<  5)#define I2C_IE_XRDY_IE				(1 <<  4)#define I2C_IE_RRDY_IE				(1 <<  3)#define I2C_IE_ARDY_IE				(1 <<  2)#define I2C_IE_NACK_IE				(1 <<  1)#define I2C_IE_AL_IE				(1 <<  0)#define I2C_STAT_SBD				(1 << 15)#define I2C_STAT_BB				(1 << 12)#define I2C_STAT_ROVR				(1 << 11)#define I2C_STAT_XUDF				(1 << 10)#define I2C_STAT_AAS				(1 <<  9)#define I2C_STAT_GC				(1 <<  5)#define I2C_STAT_XRDY				(1 <<  4)#define I2C_STAT_RRDY				(1 <<  3)#define I2C_STAT_ARDY				(1 <<  2)#define I2C_STAT_NACK				(1 <<  1)#define I2C_STAT_AL				(1 <<  0)#define I2C_SYSS_RDONE				(1 <<  0)#define I2C_BUF_RDMA_EN	 			(1 << 15)#define I2C_BUF_XDMA_EN	 			(1 <<  7)#define I2C_SYSC_SRST				(1 <<  1)#define I2C_CON_I2C_EN				(1 << 15)#define I2C_CON_BE				(1 << 14)#define I2C_CON_STB				(1 << 11)#define I2C_CON_MST				(1 << 10)#define I2C_CON_TRX				(1 <<  9)#define I2C_CON_XA				(1 <<  8)#define I2C_CON_STP				(1 <<  1)#define I2C_CON_STT				(1 <<  0)#define I2C_SYSTEST_ST_EN			(1 << 15)#define I2C_SYSTEST_FREE			(1 << 14)#define I2C_SYSTEST_TMODE			(3 << 12)#define I2C_SYSTEST_TMODE_FUNCTIONAL		(0 << 12)#define I2C_SYSTEST_TMODE_CLOCK			(2 << 12)#define I2C_SYSTEST_TMODE_LOOPBACK		(3 << 12)#define I2C_SYSTEST_SCL_I			(1 <<  3)#define I2C_SYSTEST_SCL_O			(1 <<  2)#define I2C_SYSTEST_SDA_I			(1 <<  1)#define I2C_SYSTEST_SDA_O			(1 <<  0)#define PRCM_CLK_EN_PLL      0x500#define PRCM_CLK_SEL1_PLL    0x540#define PRCM_FCLK_EN2_CORE   0x204#define PRCM_ICLK_EN2_CORE   0x214#define omap_prcmreg_read(reg) readl(OMAP24XX_VA_PRCM_BASE + reg)#define omap_prcmreg_write(data,reg) writel(data, OMAP24XX_VA_PRCM_BASE + reg)#endif	/* ifndef OMAP24XXI2C_H */

⌨️ 快捷键说明

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