From 27b207fd0a0941b03f27e2a82c0468b1a090c745 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 24 Jul 2003 23:38:38 +0000 Subject: * Implement new mechanism to export U-Boot's functions to standalone applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS) --- cpu/mpc824x/drivers/i2c/i2c1.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpu/mpc824x/drivers') diff --git a/cpu/mpc824x/drivers/i2c/i2c1.c b/cpu/mpc824x/drivers/i2c/i2c1.c index dc1c97ca0f..94c671e567 100644 --- a/cpu/mpc824x/drivers/i2c/i2c1.c +++ b/cpu/mpc824x/drivers/i2c/i2c1.c @@ -1197,13 +1197,16 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) uchar *p; int i; - p = dummy_buffer; /* fill in address in big endian order */ - for (i=0; i> (i * 8)) & 0xFF; + for (i=alen-1; i>=0; --i) { + buffer[i] = addr & 0xFF; + addr >>= 8; + } /* fill in data */ + p = dummy_buffer + alen; + for (i=0; i