From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 22 Jun 2012 19:06:23 +0200 Subject: [U-Boot] [PATCH 15/24] mxc_i2c: add i2c_regs argument to i2c_imx_stop In-Reply-To: <1340338339-11626-15-git-send-email-troy.kisky@boundarydevices.com> References: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> <1340338339-11626-15-git-send-email-troy.kisky@boundarydevices.com> Message-ID: <201206221906.23869.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Troy Kisky, > This is prep work for CONFIG_I2C_MULTI_BUS. > > Signed-off-by: Troy Kisky Acked-by: Marek Vasut > --- > drivers/i2c/mxc_i2c.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c > index 802f70f..cb061f7 100644 > --- a/drivers/i2c/mxc_i2c.c > +++ b/drivers/i2c/mxc_i2c.c > @@ -199,9 +199,8 @@ static int tx_byte(struct mxc_i2c_regs *i2c_regs, u8 > byte) /* > * Stop I2C transaction > */ > -void i2c_imx_stop(void) > +static void i2c_imx_stop(struct mxc_i2c_regs *i2c_regs) > { > - struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE; > unsigned int temp = readb(&i2c_regs->i2cr); > > temp &= ~(I2CR_MSTA | I2CR_MTX); > @@ -331,7 +330,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar > *buf, int len) buf[i] = readb(&i2c_regs->i2dr); > } > > - i2c_imx_stop(); > + i2c_imx_stop(i2c_regs); > > return ret; > } > @@ -355,7 +354,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar > *buf, int len) return ret; > } > > - i2c_imx_stop(); > + i2c_imx_stop(i2c_regs); > > return ret; > } Best regards, Marek Vasut