4 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
5 defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
6 #define I2C_BASE_ADDR (CFG_PERIPHERAL_BASE + 0x00000700)
8 #define I2C_BASE_ADDR (CFG_PERIPHERAL_BASE + 0x00000400)
9 #endif /*CONFIG_440EP CONFIG_440GR*/
11 #define I2C_REGISTERS_BASE_ADDRESS I2C_BASE_ADDR
12 #define IIC_MDBUF (I2C_REGISTERS_BASE_ADDRESS+IICMDBUF)
13 #define IIC_SDBUF (I2C_REGISTERS_BASE_ADDRESS+IICSDBUF)
14 #define IIC_LMADR (I2C_REGISTERS_BASE_ADDRESS+IICLMADR)
15 #define IIC_HMADR (I2C_REGISTERS_BASE_ADDRESS+IICHMADR)
16 #define IIC_CNTL (I2C_REGISTERS_BASE_ADDRESS+IICCNTL)
17 #define IIC_MDCNTL (I2C_REGISTERS_BASE_ADDRESS+IICMDCNTL)
18 #define IIC_STS (I2C_REGISTERS_BASE_ADDRESS+IICSTS)
19 #define IIC_EXTSTS (I2C_REGISTERS_BASE_ADDRESS+IICEXTSTS)
20 #define IIC_LSADR (I2C_REGISTERS_BASE_ADDRESS+IICLSADR)
21 #define IIC_HSADR (I2C_REGISTERS_BASE_ADDRESS+IICHSADR)
22 #define IIC_CLKDIV (I2C_REGISTERS_BASE_ADDRESS+IICCLKDIV)
23 #define IIC_INTRMSK (I2C_REGISTERS_BASE_ADDRESS+IICINTRMSK)
24 #define IIC_XFRCNT (I2C_REGISTERS_BASE_ADDRESS+IICXFRCNT)
25 #define IIC_XTCNTLSS (I2C_REGISTERS_BASE_ADDRESS+IICXTCNTLSS)
26 #define IIC_DIRECTCNTL (I2C_REGISTERS_BASE_ADDRESS+IICDIRECTCNTL)
28 /* MDCNTL Register Bit definition */
29 #define IIC_MDCNTL_HSCL 0x01
30 #define IIC_MDCNTL_EUBS 0x02
31 #define IIC_MDCNTL_EINT 0x04
32 #define IIC_MDCNTL_ESM 0x08
33 #define IIC_MDCNTL_FSM 0x10
34 #define IIC_MDCNTL_EGC 0x20
35 #define IIC_MDCNTL_FMDB 0x40
36 #define IIC_MDCNTL_FSDB 0x80
38 /* CNTL Register Bit definition */
39 #define IIC_CNTL_PT 0x01
40 #define IIC_CNTL_READ 0x02
41 #define IIC_CNTL_CHT 0x04
42 #define IIC_CNTL_RPST 0x08
43 /* bit 2/3 for Transfer count*/
44 #define IIC_CNTL_AMD 0x40
45 #define IIC_CNTL_HMT 0x80
47 /* STS Register Bit definition */
48 #define IIC_STS_PT 0X01
49 #define IIC_STS_IRQA 0x02
50 #define IIC_STS_ERR 0X04
51 #define IIC_STS_SCMP 0x08
52 #define IIC_STS_MDBF 0x10
53 #define IIC_STS_MDBS 0X20
54 #define IIC_STS_SLPR 0x40
55 #define IIC_STS_SSS 0x80
57 /* EXTSTS Register Bit definition */
58 #define IIC_EXTSTS_XFRA 0X01
59 #define IIC_EXTSTS_ICT 0X02
60 #define IIC_EXTSTS_LA 0X04
62 /* XTCNTLSS Register Bit definition */
63 #define IIC_XTCNTLSS_SRST 0x01
64 #define IIC_XTCNTLSS_EPI 0x02
65 #define IIC_XTCNTLSS_SDBF 0x04
66 #define IIC_XTCNTLSS_SBDD 0x08
67 #define IIC_XTCNTLSS_SWS 0x10
68 #define IIC_XTCNTLSS_SWC 0x20
69 #define IIC_XTCNTLSS_SRS 0x40
70 #define IIC_XTCNTLSS_SRC 0x80