[U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Marek Vasut
The i.MX28 has two I2C IP blocks, but the MXS I2C driver is hard-coded to use the I2C block 0 . Add multibus support so we can use both I2C busses as seen fit. Signed-off-by: Marek Vasut ma...@denx.de Cc: Stefano Babic sba...@denx.de --- drivers/i2c/mxs_i2c.c | 47

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Heiko Schocher
Hello Marek, Am 23.09.2014 13:15, schrieb Marek Vasut: The i.MX28 has two I2C IP blocks, but the MXS I2C driver is hard-coded to use the I2C block 0 . Add multibus support so we can use both I2C busses as seen fit. Signed-off-by: Marek Vasutma...@denx.de Cc: Stefano Babicsba...@denx.de ---

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Otavio Salvador
On Tue, Sep 23, 2014 at 8:48 AM, Heiko Schocher h...@denx.de wrote: Hello Marek, Am 23.09.2014 13:15, schrieb Marek Vasut: The i.MX28 has two I2C IP blocks, but the MXS I2C driver is hard-coded to use the I2C block 0 . Add multibus support so we can use both I2C busses as seen fit.

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Marek Vasut
On Tuesday, September 23, 2014 at 03:49:27 PM, Otavio Salvador wrote: On Tue, Sep 23, 2014 at 8:48 AM, Heiko Schocher h...@denx.de wrote: Hello Marek, Am 23.09.2014 13:15, schrieb Marek Vasut: The i.MX28 has two I2C IP blocks, but the MXS I2C driver is hard-coded to use the I2C block 0

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Fabio Estevam
Hi Marek, On Tue, Sep 23, 2014 at 8:15 AM, Marek Vasut ma...@denx.de wrote: -void i2c_init(int speed, int slaveadd) +int i2c_set_bus_num(unsigned int bus) { + uint32_t mxs_i2c_regs; + + switch (bus) { + case 0: + mxs_i2c_regs = MXS_I2C0_BASE; +

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Heiko Schocher
Hello Marek, Am 23.09.2014 16:30, schrieb Marek Vasut: On Tuesday, September 23, 2014 at 03:49:27 PM, Otavio Salvador wrote: On Tue, Sep 23, 2014 at 8:48 AM, Heiko Schocherh...@denx.de wrote: Hello Marek, Am 23.09.2014 13:15, schrieb Marek Vasut: The i.MX28 has two I2C IP blocks, but the

Re: [U-Boot] [PATCH] i2c: mxs: Add I2C multibus support

2014-09-23 Thread Heiko Schocher
Hello Fabio, Am 23.09.2014 17:16, schrieb Fabio Estevam: Hi Marek, On Tue, Sep 23, 2014 at 8:15 AM, Marek Vasutma...@denx.de wrote: -void i2c_init(int speed, int slaveadd) +int i2c_set_bus_num(unsigned int bus) { + uint32_t mxs_i2c_regs; + + switch (bus) { + case 0: +