diff options
author | Timur Tabi <timur@freescale.com> | 2006-10-31 21:23:16 -0600 |
---|---|---|
committer | Kim Phillips <kim.phillips@freescale.com> | 2006-11-03 19:42:22 -0600 |
commit | 9ca880a250870a7d55754291b5591d2b5fe89b54 (patch) | |
tree | bfef7c3013d3423222e2af4522b3341f42398f8e /board/mpc8360emds/pci.c | |
parent | ac4b5622ce050b5ee1e154b98df630d778661632 (diff) | |
download | u-boot-imx-9ca880a250870a7d55754291b5591d2b5fe89b54.zip u-boot-imx-9ca880a250870a7d55754291b5591d2b5fe89b54.tar.gz u-boot-imx-9ca880a250870a7d55754291b5591d2b5fe89b54.tar.bz2 |
mpc83xx: Fix dual I2C support for the MPC8349ITX, MPC8349EMDS, TQM834x, and MPC8360EMDS
This patch also adds an improved I2C set_speed(), which handles all clock
frequencies.
Signed-off-by: Timur Tabi <timur@freescale.com>
Diffstat (limited to 'board/mpc8360emds/pci.c')
-rw-r--r-- | board/mpc8360emds/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/board/mpc8360emds/pci.c b/board/mpc8360emds/pci.c index 880b2ec..64ea509 100644 --- a/board/mpc8360emds/pci.c +++ b/board/mpc8360emds/pci.c @@ -198,8 +198,11 @@ void pci_init_board(void) * Assign PIB PMC slot to desired PCI bus */ - mpc83xx_i2c = (i2c_t *) (CFG_IMMRBAR + CFG_I2C2_OFFSET); - i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); + /* Switch temporarily to I2C bus #2 */ + orig_i2c_bus = i2c_get_bus_num(); + + if(orig_i2c_bus != 2) + i2c_set_bus_num(2); val8 = 0; i2c_write(0x23, 0x6, 1, &val8, 1); @@ -227,6 +230,10 @@ void pci_init_board(void) i2c_write(0x27, 0x3, 1, &val8, 1); asm("eieio"); + /* Reset to original I2C bus */ + if(orig_i2c_bus != 2) + i2c_set_bus_num(orig_i2c_bus); + /* * Release PCI RST Output signal */ |