summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2012-10-25 11:07:00 +0200
committerHeiko Schocher <hs@denx.de>2013-07-23 08:34:54 +0200
commitf3e9361771af69b12699c8e58b174d72f0bb545e (patch)
tree196d60b261ee7feeb0f96f8589b493518cce9845
parent9a2accb44f871af9c87c34d1c9ac95010f4e6f09 (diff)
downloadu-boot-f3e9361771af69b12699c8e58b174d72f0bb545e.tar.gz
i2c, multibus, keymile: get rid of EEprom_ivm envvariable
as the keymile boards use now the new i2c multibus/multiadapter framework, remove the EEprom_ivm Environmentvar, as not longer needed. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Holger Brunck <holger.brunck@keymile.com> Tested-By: Holger Brunck <holger.brunck@keymile.com>
-rw-r--r--board/keymile/common/ivm.c7
-rw-r--r--include/configs/km/km83xx-common.h3
-rw-r--r--include/configs/km/km_arm.h1
-rw-r--r--include/configs/km82xx.h3
-rw-r--r--include/configs/km_kirkwood.h12
5 files changed, 12 insertions, 14 deletions
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index a14496f5fb..ac3cc9c839 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -315,16 +315,13 @@ int ivm_analyze_eeprom(unsigned char *buf, int len)
int ivm_read_eeprom(void)
{
uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
- char *buf;
- unsigned long dev_addr = CONFIG_SYS_IVM_EEPROM_ADR;
int ret;
- buf = getenv("EEprom_ivm");
- i2c_set_bus_num(buf ? (int)simple_strtol(buf, NULL, 10) : 0);
+ i2c_set_bus_num(CONFIG_KM_IVM_BUS);
/* add deblocking here */
i2c_make_abort();
- ret = i2c_read(dev_addr, 0, 1, i2c_buffer,
+ ret = i2c_read(CONFIG_SYS_IVM_EEPROM_ADR, 0, 1, i2c_buffer,
CONFIG_SYS_IVM_EEPROM_MAX_LEN);
if (ret != 0) {
printf("Error reading EEprom\n");
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index a6f8ebd9de..8f97f679bb 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -220,6 +220,8 @@
{0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
{1, {I2C_NULL_HOP} } }
+#define CONFIG_KM_IVM_BUS 2 /* I2C2 (Mux-Port 1)*/
+
/* I2C SYSMON (LM75, AD7414 is almost compatible) */
#define CONFIG_DTT_LM75 /* ON Semi's LM75 */
#define CONFIG_DTT_SENSORS {0, 1, 2, 3} /* Sensor addresses */
@@ -322,7 +324,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_KM_DEF_ENV \
CONFIG_KM_DEF_ARCH \
- "EEprom_ivm=2\0" \
"newenv=" \
"prot off 0xF00C0000 +0x40000 && " \
"era 0xF00C0000 +0x40000\0" \
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index c2c67c1582..ebbfa840d4 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -309,7 +309,6 @@ int get_scl(void);
CONFIG_KM_DEF_ENV \
CONFIG_KM_NEW_ENV \
"arch=arm\0" \
- "EEprom_ivm=" __stringify(KM_IVM_BUS) "\0" \
""
#if defined(CONFIG_SYS_NO_FLASH)
diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h
index 54041f3574..4278be26e2 100644
--- a/include/configs/km82xx.h
+++ b/include/configs/km82xx.h
@@ -212,7 +212,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_KM_BOARD_EXTRA_ENV \
CONFIG_KM_DEF_ENV \
- "EEprom_ivm=1\0" \
"unlock=yes\0" \
"newenv=" \
"prot off 0xFE0C0000 +0x40000 && " \
@@ -253,6 +252,8 @@
{0, {{I2C_MUX_PCA9542, 0x70, 0} } }, \
{0, {{I2C_MUX_PCA9542, 0x70, 1} } } }
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+
/*
* Software (bit-bang) I2C driver configuration
*/
diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h
index a0ad47e73a..5f3e4449ba 100644
--- a/include/configs/km_kirkwood.h
+++ b/include/configs/km_kirkwood.h
@@ -42,18 +42,18 @@
#define CONFIG_IDENT_STRING "\nKeymile Kirkwood"
#define CONFIG_HOSTNAME km_kirkwood
#define CONFIG_KM_DISABLE_PCIE
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
/* KM_KIRKWOOD_PCI */
#elif defined(CONFIG_KM_KIRKWOOD_PCI)
#define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI"
#define CONFIG_HOSTNAME km_kirkwood_pci
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
#define CONFIG_KM_FPGA_CONFIG
/* KM_NUSA */
#elif defined(CONFIG_KM_NUSA)
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
#define CONFIG_IDENT_STRING "\nKeymile NUSA"
#define CONFIG_HOSTNAME kmnusa
#undef CONFIG_SYS_KWD_CONFIG
@@ -69,7 +69,7 @@
#elif defined(CONFIG_KM_MGCOGE3UN)
#define CONFIG_IDENT_STRING "\nKeymile COGE3UN"
#define CONFIG_HOSTNAME mgcoge3un
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
#undef CONFIG_SYS_KWD_CONFIG
#define CONFIG_SYS_KWD_CONFIG \
$(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-memphis.cfg
@@ -81,7 +81,7 @@
/* KMCOGE5UN */
#elif defined(CONFIG_KM_COGE5UN)
#define CONFIG_IDENT_STRING "\nKeymile COGE5UN"
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
#undef CONFIG_SYS_KWD_CONFIG
#define CONFIG_SYS_KWD_CONFIG \
$(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage_256M8_1.cfg
@@ -95,7 +95,7 @@
#elif defined(CONFIG_KM_PORTL2)
#define CONFIG_IDENT_STRING "\nKeymile Port-L2"
#define CONFIG_HOSTNAME portl2
-#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
+#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/
#define CONFIG_KM_PIGGY4_88E6061
/* KM_SUV31 */