From: Heiko Schocher Date: Wed, 13 Mar 2019 06:07:44 +0100 Subject: [U-Boot] [PATCH 1/4] i2c: designware: fix reset handling on socfpga gen5 In-Reply-To: <20190312210110.30910-2-simon.k.r.goldschmidt@gmail.com> References: <20190312210110.30910-1-simon.k.r.goldschmidt@gmail.com> <20190312210110.30910-2-simon.k.r.goldschmidt@gmail.com> Message-ID: <187fc562-b47d-91fd-41bd-1a9228ceeb7e@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, Am 12.03.2019 um 22:01 schrieb Simon Goldschmidt: > 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 > --- > > drivers/i2c/designware_i2c.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) Reviewed-by: Heiko Schocher bye, Heiko -- -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de