diff options
author | Alan Carvalho de Assis <acassis@gmail.com> | 2011-11-27 11:12:14 -0200 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2011-11-27 14:35:36 +0100 |
commit | 83d9dcc0170119cbab908b72128e0e7ee265c646 (patch) | |
tree | 624328a2834d6229f965e7ad6d8d9c9297d94d6e | |
parent | cb8998e33c5ea962c34048cdeb8c8b348e8530d8 (diff) |
i2c: fix maximum address an I2C chip can assign
I2C bus support up to 128 devices (mask 0x7F), but current calypso driver
is masked it to 64 (0x3F). I discover it because Motorola W220 has an I/O
expander PCA9537 at address 0x49 which could be reached.
Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r-- | src/target/firmware/calypso/i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/firmware/calypso/i2c.c b/src/target/firmware/calypso/i2c.c index 02e1a033..bf441780 100644 --- a/src/target/firmware/calypso/i2c.c +++ b/src/target/firmware/calypso/i2c.c @@ -69,7 +69,7 @@ int i2c_write(uint8_t chip, uint32_t addr, int alen, const uint8_t *buffer, int printd("i2c_write(chip=0x%02u, addr=0x%02u): ", chip, addr); - writeb(chip & 0x3f, I2C_REG(DEVICE_REG)); + writeb(chip & 0x7f, I2C_REG(DEVICE_REG)); writeb(addr & 0xff, I2C_REG(ADDRESS_REG)); /* we have to tell the controller how many bits we'll put into the fifo ?!? */ |