]> git.dujemihanovic.xyz Git - u-boot.git/commit
i2c: designware: fix reset handling on socfpga gen5
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Thu, 28 Mar 2019 20:11:48 +0000 (21:11 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 24 Apr 2019 22:00:49 +0000 (00:00 +0200)
commit36821b3f55adc26c593520d8c207eea36c5c264a
tree72be8704e3eb332c48903f1cd6f191befaba5400
parentbbecfd4cf2a8f7baeef6037303b8b4380a71aa12
i2c: designware: fix reset handling on socfpga gen5

Using this driver on socfpga gen5 with DM_I2C enabled leads to a data abort
as the 'i2c' reset property cannot be found (the gen5 dtsi does not provide
reset-names).

The actual bug was to check 'if (&priv->reset_ctl)', which is never false.

While at it, convert the driver to use 'reset_get_bulk' instead of looking
at a specific named reset and also make it release the reset on driver
remove before starting the OS.

Fixes: 622597dee4f6 ("i2c: designware: add reset ctrl to driver")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/designware_i2c.c