diff options
author | Heiko Schocher <hs@denx.de> | 2009-12-03 11:23:17 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2009-12-22 05:52:48 +0100 |
commit | 072e754b6b9bef438fc0870318755e33051baa7d (patch) | |
tree | 43916f202637ababbd6fe5f2306e36ca7855e32b /board/sandburst/common/ppc440gx_i2c.h | |
parent | bb3bcfa2426cc6a0aecec7270e3ee67ca843a125 (diff) | |
download | u-boot-imx-072e754b6b9bef438fc0870318755e33051baa7d.zip u-boot-imx-072e754b6b9bef438fc0870318755e33051baa7d.tar.gz u-boot-imx-072e754b6b9bef438fc0870318755e33051baa7d.tar.bz2 |
i2c, ppc4xx: fix compiling KAREF and METROBOX boards.
commit eb5eb2b0f744f0cba405160c5d01335c40f09acf
ppc4xx: Cleanup PPC4xx I2C infrastructure
This patch cleans up the PPC4xx I2C intrastructure:
- Use C struct to describe the I2C registers instead of defines
- Coding style cleanup (braces, whitespace, comments, line length)
- Extract common code from i2c_read() and i2c_write()
- Remove unneeded IIC defines from ppc405.h & ppc440.h
breaks comiling for the KAREF and METROBOX boards.
This patch fixes this issue.
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/sandburst/common/ppc440gx_i2c.h')
-rw-r--r-- | board/sandburst/common/ppc440gx_i2c.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/board/sandburst/common/ppc440gx_i2c.h b/board/sandburst/common/ppc440gx_i2c.h index 90f27ca..0676c0e 100644 --- a/board/sandburst/common/ppc440gx_i2c.h +++ b/board/sandburst/common/ppc440gx_i2c.h @@ -34,21 +34,21 @@ #define I2C_BUS1_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x00000500) #define I2C_REGISTERS_BUS1_BASE_ADDRESS I2C_BUS1_BASE_ADDR -#define IIC_MDBUF1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICMDBUF) -#define IIC_SDBUF1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICSDBUF) -#define IIC_LMADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICLMADR) -#define IIC_HMADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICHMADR) -#define IIC_CNTL1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICCNTL) -#define IIC_MDCNTL1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICMDCNTL) -#define IIC_STS1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICSTS) -#define IIC_EXTSTS1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICEXTSTS) -#define IIC_LSADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICLSADR) -#define IIC_HSADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICHSADR) -#define IIC_CLKDIV1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IIC0_CLKDIV) -#define IIC_INTRMSK1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICINTRMSK) -#define IIC_XFRCNT1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICXFRCNT) -#define IIC_XTCNTLSS1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICXTCNTLSS) -#define IIC_DIRECTCNTL1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICDIRECTCNTL) +#define IIC_MDBUF1 (&i2c->mdbuf) +#define IIC_SDBUF1 (&i2c->sdbuf) +#define IIC_LMADR1 (&i2c->lmadr) +#define IIC_HMADR1 (&i2c->hmadr) +#define IIC_CNTL1 (&i2c->cntl) +#define IIC_MDCNTL1 (&i2c->mdcntl) +#define IIC_STS1 (&i2c->sts) +#define IIC_EXTSTS1 (&i2c->extsts) +#define IIC_LSADR1 (&i2c->lsadr) +#define IIC_HSADR1 (&i2c->hsadr) +#define IIC_CLKDIV1 (&i2c->clkdiv) +#define IIC_INTRMSK1 (&i2c->intrmsk) +#define IIC_XFRCNT1 (&i2c->xfrcnt) +#define IIC_XTCNTLSS1 (&i2c->xtcntlss) +#define IIC_DIRECTCNTL1 (&i2c->directcntl) void i2c1_init (int speed, int slaveadd); int i2c_probe1 (uchar chip); |