From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Tue, 14 Jan 2014 16:25:51 -0700 Subject: [U-Boot] mxc_i2c driver In-Reply-To: <52D5AB9B.5010007@freescale.com> References: <52D5AB9B.5010007@freescale.com> Message-ID: <52D5C77F.6000504@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 1/14/2014 2:26 PM, York Sun wrote: > Troy, > > I am trying to use mxc_i2c driver with multiple buses. I didn't figure out how > the bases are set. Can you shed some light on this? > > Thanks, > > York > see board/boundary/nitrogen6x/nitrogen6x.c It calls setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2); which is in arch/arm/imx-common/i2c-mxv7.c This file has an array of base addresses static void * const i2c_bases[] = { (void *)I2C1_BASE_ADDR, (void *)I2C2_BASE_ADDR, #ifdef I2C3_BASE_ADDR (void *)I2C3_BASE_ADDR, #endif };