From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v3, 4/4] cmd_eeprom: bug fix for i2c read/write
Date: Mon, 09 Dec 2013 07:56:05 +0100 [thread overview]
Message-ID: <52A56985.80109@denx.de> (raw)
In-Reply-To: <1385971379-3096-5-git-send-email-dantesu@gmail.com>
Hello Kuo-jung,
Am 02.12.2013 09:02, schrieb Kuo-Jung Su:
> From: Kuo-Jung Su<dantesu@faraday-tech.com>
>
> The local pointer of address (i.e., addr) only gets
> referenced under SPI mode, and it won't be appropriate
> to pass only 1-byte addr[1] to i2c_read/i2c_write while
> CONFIG_SYS_I2C_EEPROM_ADDR_LEN> 1.
>
> 1. In U-boot's I2C model, the address would be re-assembled
> to a byte string in MSB order inside I2C controller drivers.
>
> 2. The 'CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW' option which could
> be found at soft_i2c.c is always turned on in cmd_eeprom.c,
> the addr[0] always contains the device address with overflowed
> MSB address bits.
>
> Signed-off-by: Kuo-Jung Su<dantesu@faraday-tech.com>
> Cc: Alexey Brodkin<abrodkin@synopsys.com>
> Cc: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft.com>
> cc: Peter Tyser<ptyser@xes-inc.com>
> Cc: Heiko Schocher<hs@denx.de>
> Cc: Wolfgang Denk<wd@denx.de>
> Cc: Stefan Roese<sr@denx.de>
> Cc: Mischa Jonker<mjonker@synopsys.com>
>
> ---
> Changes for v3:
> - It turns out that what we did before 2013-11-13
> (i.e., cmd_eeprom: fix i2c_{read|write} usage if env is in I2C EEPROM)
> is still the best one, this patch simply rollback to it with coding
> style fix.
>
> Changes for v2:
> - Initial release
>
> common/cmd_eeprom.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to u-boot.i2c.git, thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2013-12-09 6:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 2:48 [U-Boot] [PATCH 0/2] i2c: fti2c010: migrate to new i2c model Kuo-Jung Su
2013-11-25 2:48 ` [U-Boot] [PATCH 1/2] i2c: fti2c010: cosmetic: coding style cleanup Kuo-Jung Su
2013-11-25 2:48 ` [U-Boot] [PATCH 2/2] i2c: fti2c010: migrate to new i2c model Kuo-Jung Su
2013-11-28 2:47 ` [U-Boot] [PATCH v2 0/4] i2c: fti2c010: bug fix & new driver model Kuo-Jung Su
2013-11-28 2:47 ` [U-Boot] [PATCH v2 1/4] i2c: fti2c010: cosmetic: coding style cleanup Kuo-Jung Su
2013-11-28 2:47 ` [U-Boot] [PATCH v2 2/4] i2c: fti2c010: migrate to new i2c model Kuo-Jung Su
2013-11-28 2:47 ` [U-Boot] [PATCH v2 3/4] i2c: fti2c010: serial out r/w address in MSB order Kuo-Jung Su
2013-11-28 2:47 ` [U-Boot] [PATCH v2 4/4] cmd_eeprom: bug fix for i2c read/write Kuo-Jung Su
2013-11-28 10:39 ` Alexey Brodkin
2013-11-29 0:59 ` Kuo-Jung Su
2013-11-29 9:10 ` Alexey Brodkin
2013-11-29 9:32 ` Kuo-Jung Su
2013-11-29 9:56 ` Alexey Brodkin
2013-11-29 15:04 ` Kuo-Jung Su
2013-12-02 2:57 ` [U-Boot] [PATCH v3 0/4] i2c: fti2c010: bug fix & new driver model Kuo-Jung Su
2013-12-02 2:57 ` [U-Boot] [PATCH v3 1/4] i2c: fti2c010: cosmetic: coding style cleanup Kuo-Jung Su
2013-12-02 7:30 ` [U-Boot] [PATCH v3 0/4] i2c: fti2c010: bug fix & new driver model Heiko Schocher
2013-12-02 8:09 ` Kuo-Jung Su
2013-12-02 8:36 ` Heiko Schocher
2013-12-02 8:02 ` Kuo-Jung Su
2013-12-02 8:02 ` [U-Boot] [PATCH v3 1/4] i2c: fti2c010: cosmetic: coding style cleanup Kuo-Jung Su
2013-12-09 6:52 ` [U-Boot] [U-Boot, v3, " Heiko Schocher
2013-12-02 8:02 ` [U-Boot] [PATCH v3 2/4] i2c: fti2c010: migrate to new i2c model Kuo-Jung Su
2013-12-09 6:53 ` [U-Boot] [U-Boot, v3, " Heiko Schocher
2013-12-02 8:02 ` [U-Boot] [PATCH v3 3/4] i2c: fti2c010: serial out r/w address in MSB order Kuo-Jung Su
2013-12-09 6:55 ` [U-Boot] [U-Boot, v3, " Heiko Schocher
2013-12-02 8:02 ` [U-Boot] [PATCH v3 4/4] cmd_eeprom: bug fix for i2c read/write Kuo-Jung Su
2013-12-02 11:09 ` Alexey Brodkin
2013-12-03 0:55 ` Kuo-Jung Su
2013-12-03 7:42 ` Alexey Brodkin
2013-12-09 6:56 ` Heiko Schocher [this message]
2013-12-09 10:35 ` [U-Boot] [U-Boot, v3, " Alexey Brodkin
2013-12-09 11:21 ` Heiko Schocher
2013-12-10 10:18 ` Alexey Brodkin
2013-12-11 1:13 ` Kuo-Jung Su
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A56985.80109@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox