Skip to contentSkip to conversation

ppc4xx: Switch to I2C bus numer 0 for chip_config command

PATCH New Stefan Roese 1 participant 2 messages Nov 9, 2009 – Nov 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ppc4xx: Switch to I2C bus numer 0 for chip_config command

All currently available 4xx derivats have the I2C bootstrap EEPROM located on I2C bus number 0. This patch now first sets this bus number, so that the chip_config command also works for board with multiple I2C busses, like Katmai.

---
 cpu/ppc4xx/cmd_chip_config.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
cpu/ppc4xx/cmd_chip_config.c +6 -0
index d360d5b..ba57211 100644
@@ -52,6 +52,12 @@ static int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	int cur_config_nr = -1;
 	u8 cur_config[CONFIG_4xx_CONFIG_BLOCKSIZE];
 
+	/*
+	 * First switch to correct I2C bus. This is I2C bus 0
+	 * for all currently available 4xx derivats.
+	 */
+	I2C_SET_BUS(0);
+
 #ifdef CONFIG_CMD_EEPROM
 	ret = eeprom_read(CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR,
 			  CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET,
Signature · 1 line
1.6.5.2
#1 lore raw

PATCH 1/2 ppc4xx: Switch to I2C bus numer 0 for chip_config command

Quoted 4 lines · On Monday 09 November 2009 14:16:43 Stefan Roese wrote:

All currently available 4xx derivats have the I2C bootstrap EEPROM located on I2C bus number 0. This patch now first sets this bus number, so that the chip_config command also works for board with multiple I2C busses, like Katmai.

Applied to u-boot-ppc4xx/next. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de