mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-08-19 11:46:07 -04:00
mxc_i2c: place i2c_reset code inline
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>
This commit is contained in:
parent
71e9f3cbeb
commit
83a1a19038
@ -113,17 +113,6 @@ static uint8_t i2c_imx_get_clk(unsigned int rate)
|
|||||||
return clk_div;
|
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
|
* Init I2C Bus
|
||||||
*/
|
*/
|
||||||
@ -136,7 +125,9 @@ void i2c_init(int speed, int unused)
|
|||||||
/* Store divider value */
|
/* Store divider value */
|
||||||
writeb(idx, &i2c_regs->ifdr);
|
writeb(idx, &i2c_regs->ifdr);
|
||||||
|
|
||||||
i2c_reset();
|
/* Reset module */
|
||||||
|
writeb(0, &i2c_regs->i2cr);
|
||||||
|
writeb(0, &i2c_regs->i2sr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user