diff options
author | Luotao Fu <l.fu@pengutronix.de> | 2007-11-14 18:58:33 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-11-17 01:55:57 +0100 |
commit | fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5 (patch) | |
tree | 9a27e8a3db2f2f0e7a74e170d81b2344b94b77a8 | |
parent | 429c180edad038f91c989cb14b478228092e7054 (diff) | |
download | u-boot-imx-fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5.zip u-boot-imx-fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5.tar.gz u-boot-imx-fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5.tar.bz2 |
Fix the i2c frequency and default address in rsdproto board
rsdproto board support has wrong I2C frequency and wrong return value
handling.
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
-rw-r--r-- | board/rsdproto/rsdproto.c | 4 | ||||
-rw-r--r-- | include/configs/rsdproto.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/board/rsdproto/rsdproto.c b/board/rsdproto/rsdproto.c index bf4fd53..312d4b8 100644 --- a/board/rsdproto/rsdproto.c +++ b/board/rsdproto/rsdproto.c @@ -210,7 +210,7 @@ void read_RS5C372_time (struct tm *timedate) #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) - if (i2c_read (RS5C372_PPC_I2C_ADR, 0, 1, buffer, sizeof (buffer))) { + if (! i2c_read (RS5C372_PPC_I2C_ADR, 0, 1, buffer, sizeof (buffer))) { timedate->tm_sec = BCD_TO_BIN (buffer[0]); timedate->tm_min = BCD_TO_BIN (buffer[1]); timedate->tm_hour = BCD_TO_BIN (buffer[2]); @@ -231,7 +231,7 @@ int read_LM84_temp (int address) unsigned char buffer[8]; /*int rc;*/ - if (i2c_read (address, 0, 1, buffer, 1)) { + if (! i2c_read (address, 0, 1, buffer, 1)) { return (int) buffer[0]; } else { /*printf("i2c error %02x\n", rc); */ diff --git a/include/configs/rsdproto.h b/include/configs/rsdproto.h index 814082c..40a05fa 100644 --- a/include/configs/rsdproto.h +++ b/include/configs/rsdproto.h @@ -92,8 +92,8 @@ /* enable I2C */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CFG_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CFG_I2C_SLAVE 0x7F +#define CFG_I2C_SPEED 50000 /* I2C speed and slave address */ +#define CFG_I2C_SLAVE 0x30 /* system clock rate (CLKIN) - equal to the 60x and local bus speed */ |