[U-Boot] [PATCH 1/2] i2c: mvtwsi: disable i2c slave on Armada 38x
Baruch Siach
baruch at tkos.co.il
Tue May 29 02:39:50 UTC 2018
Hi Chris,
On Tue, May 29, 2018 at 10:32:47AM +1200, Chris Packham wrote:
> Did you intend to omit the u-boot mailing list?
No, sorry. Thanks for noticing. I'll resend with the change that Stefan
suggested and keep your Tested-by.
> On Tue, May 29, 2018 at 3:11 AM Baruch Siach <baruch at tkos.co.il> wrote:
> > Equivalent code that disables the hidden i2c0 slave already exists in
> > the Turris Omnia platform specific code. But this hidden i2c0 slave that
> > interferes the i2c bus is not board specific. All Armada 38x SoCs are
> > affected. Add code to disable this slave to the i2c bus driver to make
> > it work on all affected hardware.
>
> > Use the bind callback because we want this to always run at boot,
> > regardless of whether U-Boot uses the i2c bus.
>
> > Cc: Rabeeh Khoury <rabeeh at solid-run.com>
> > Signed-off-by: Baruch Siach <baruch at tkos.co.il>
>
> Tested-by: Chris Packham <judge.packham at gmail.com>
[snip]
>
> > + /* Disable the hidden slave on i2c0 of 38x */
> > + if (IS_ENABLED(CONFIG_ARMADA_38X) && bus->req_seq == 0)
>
> I'll submit a patch to add IS_ENABLED(CONFIG_KIRKWOOD) when this hits
> u-boot.git.
Have you hit this issue on Kirkwood? Which one?
Thanks,
baruch
> > + twsi_disable_i2c_slave(twsi);
> > +
> > + return 0;
> > +}
> > +
> > static int mvtwsi_i2c_probe(struct udevice *bus)
> > {
> > struct mvtwsi_i2c_dev *dev = dev_get_priv(bus);
> > @@ -850,6 +873,7 @@ U_BOOT_DRIVER(i2c_mvtwsi) = {
> > .name = "i2c_mvtwsi",
> > .id = UCLASS_I2C,
> > .of_match = mvtwsi_i2c_ids,
> > + .bind = mvtwsi_i2c_bind,
> > .probe = mvtwsi_i2c_probe,
> > .ofdata_to_platdata = mvtwsi_i2c_ofdata_to_platdata,
> > .priv_auto_alloc_size = sizeof(struct mvtwsi_i2c_dev),
> > --
> > 2.17.0
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
More information about the U-Boot
mailing list