]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mxc_i2c: place i2c_reset code inline
authorTroy Kisky <troy.kisky@boundarydevices.com>
Thu, 19 Jul 2012 08:18:12 +0000 (08:18 +0000)
committerHeiko Schocher <hs@denx.de>
Tue, 31 Jul 2012 05:49:48 +0000 (07:49 +0200)
imx_reset is only referenced once so
move to that location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
drivers/i2c/mxc_i2c.c

index 9efa9bdae54f18b8c2ae511f5d7afc8059b53f58..717bc7ae0159a0832ab8ec951f1521ddae37d916 100644 (file)
@@ -113,17 +113,6 @@ static uint8_t i2c_imx_get_clk(unsigned int rate)
        return clk_div;
 }
 
-/*
- * Reset I2C Controller
- */
-void i2c_reset(void)
-{
-       struct mxc_i2c_regs *i2c_regs = (struct mxc_i2c_regs *)I2C_BASE;
-
-       writeb(0, &i2c_regs->i2cr);     /* Reset module */
-       writeb(0, &i2c_regs->i2sr);
-}
-
 /*
  * Init I2C Bus
  */
@@ -136,7 +125,9 @@ void i2c_init(int speed, int unused)
        /* Store divider value */
        writeb(idx, &i2c_regs->ifdr);
 
-       i2c_reset();
+       /* Reset module */
+       writeb(0, &i2c_regs->i2cr);
+       writeb(0, &i2c_regs->i2sr);
 }
 
 /*