Skip to contentSkip to conversation

compulab: eeprom: enable any i2c driver

PATCH In review Ilya Ledvich 3 participants 6 messages Apr 16, 2014 – May 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compulab: eeprom: enable any i2c driver

Make the common eeprom library available for any I2C driver.

---
 board/compulab/common/Makefile |    2 +-
 board/compulab/common/eeprom.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
board/compulab/common/Makefile +1 -1
index 6d7d068..4044ac9 100644
@@ -6,5 +6,5 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_SYS_I2C_OMAP34XX) += eeprom.o
+obj-$(CONFIG_SYS_I2C) += eeprom.o
 obj-$(CONFIG_LCD) += omap3_display.o
board/compulab/common/eeprom.h +1 -1
index e871629..85d5bf0 100644
@@ -10,7 +10,7 @@
 #ifndef _EEPROM_
 #define _EEPROM_
 
-#ifdef CONFIG_SYS_I2C_OMAP34XX
+#ifdef CONFIG_SYS_I2C
 int cl_eeprom_read_mac_addr(uchar *buf);
 u32 cl_eeprom_get_board_rev(void);
 #else
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 compulab: eeprom: enable any i2c driver

Quoted 3 lines · Ilya Ledvich

Make the common eeprom library available for any I2C driver.

Quoted 30 lines
---
  board/compulab/common/Makefile |    2 +-
  board/compulab/common/eeprom.h |    2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
board/compulab/common/Makefile +1 -1
index 6d7d068..4044ac9 100644
@@ -6,5 +6,5 @@
  # SPDX-License-Identifier:	GPL-2.0+
  #
 
-obj-$(CONFIG_SYS_I2C_OMAP34XX) += eeprom.o
+obj-$(CONFIG_SYS_I2C) += eeprom.o
  obj-$(CONFIG_LCD) += omap3_display.o
board/compulab/common/eeprom.h +1 -1
index e871629..85d5bf0 100644
@@ -10,7 +10,7 @@
  #ifndef _EEPROM_
  #define _EEPROM_
 
-#ifdef CONFIG_SYS_I2C_OMAP34XX
+#ifdef CONFIG_SYS_I2C
  int cl_eeprom_read_mac_addr(uchar *buf);
  u32 cl_eeprom_get_board_rev(void);
  #else
#2 lore raw
In reply to Ilya Ledvich
Quoted 4 lines · Ilya Ledvich

Make the common eeprom library available for any I2C driver.

This breaks the compulab trimslice board, please fix.

Signature · 8 lines
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/20140514/e7d02df0/attachment.pgp>
#3 lore raw

PATCH 1/1 compulab: eeprom: add default eeprom address

Add default eeprom address setting.

---
Tom, please apply this one first and then the
"compulab: eeprom: enable any i2c driver".

Thanks!

 board/compulab/common/eeprom.c | 5 +++++
 1 file changed, 5 insertions(+)
board/compulab/common/eeprom.c +5 -0
index 5aa3dbd..20fe3e1 100644
@@ -10,6 +10,11 @@
 #include <common.h>
 #include <i2c.h>
 
+#ifndef CONFIG_SYS_I2C_EEPROM_ADDR
+# define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
+# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
+#endif
+
 #define EEPROM_LAYOUT_VER_OFFSET	44
 #define BOARD_SERIAL_OFFSET		20
 #define BOARD_SERIAL_OFFSET_LEGACY	8
Signature · 1 line
1.8.5.5
#4 lore raw

[U-Boot] compulab: eeprom: add default eeprom address

Quoted 3 lines · Igor Grinberg

Add default eeprom address setting.

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
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/20140523/51b283e2/attachment.pgp>
#5 lore raw
In reply to Ilya Ledvich
Quoted 4 lines · Ilya Ledvich

Make the common eeprom library available for any I2C driver.

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
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/20140523/a27747a4/attachment.pgp>