public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] beagle: expansion boards: retry i2c_read with 16bit addressing
@ 2013-02-04 16:03 Robert Nelson
  2013-02-19 16:15 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Nelson @ 2013-02-04 16:03 UTC (permalink / raw)
  To: u-boot

Some expansion boards now ship with at24 eeproms that need to communicate
via 16bit addressing.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 board/ti/beagle/beagle.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index b829a79..9493c6b 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -227,6 +227,14 @@ static unsigned int get_expansion_id(void)
 	i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config,
 		 sizeof(expansion_config));
 
+	/* retry reading configuration data with 16bit addressing */
+	if ((expansion_config.device_vendor == 0xFFFFFF00) ||
+	    (expansion_config.device_vendor == 0xFFFFFFFF)) {
+		printf("EEPROM is blank or 8bit addressing failed: retrying with 16bit:\n");
+		i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 2, (u8 *)&expansion_config,
+			 sizeof(expansion_config));
+	}
+
 	i2c_set_bus_num(TWL4030_I2C_BUS);
 
 	return expansion_config.device_vendor;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [U-Boot, 1/2] beagle: expansion boards: retry i2c_read with 16bit addressing
  2013-02-04 16:03 [U-Boot] [PATCH 1/2] beagle: expansion boards: retry i2c_read with 16bit addressing Robert Nelson
@ 2013-02-19 16:15 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2013-02-19 16:15 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 04, 2013 at 06:03:10AM -0000, robertcnelson at gmail.com wrote:

> Some expansion boards now ship with at24 eeproms that need to communicate
> via 16bit addressing.
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>

This and 2/2 have been applied to u-boot-ti/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130219/68d2d36f/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-19 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 16:03 [U-Boot] [PATCH 1/2] beagle: expansion boards: retry i2c_read with 16bit addressing Robert Nelson
2013-02-19 16:15 ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox