Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2c-imx: Driver fixes #21

Open
wants to merge 2 commits into
base: lf-6.6.y
Choose a base branch
from
Open

i2c-imx: Driver fixes #21

wants to merge 2 commits into from

Conversation

tremmet
Copy link
Contributor

@tremmet tremmet commented Aug 12, 2024

We are noticing boot lock ups in the past 3 or 4 NXP kernel releases on some of our i.MX8M boards. The hang is always related to our i2c RTC.

We figured out that the lock and mutex handing is done incorrect in the i2c-imx driver.
The issues where already resolved upstream but it seems that due not properly solved rebase conflicts in the past they have been reintroduced again.

Please see the commit messages of the patches for more detailed information. We would appreciate if the issues are being resolved in future so that we do not have to apply the patches for every release.

Like other i2c controllers we see deadlock issues with clock
prepare mutex. I our case this came up with a clock output of a rtc
connected to i2c bus.

This issue has already been fixed upstream by:
(d9a22d7) i2c: imx: avoid taking clk_prepare mutex in PM callbacks

But was reintroduced by a wrongly resolved merge conflict with this commit:
(66c0769) MLK-11403: I2C: imx: restore pin setting for i2c

So again we keep the i2c clock prepared and only enable and disable it for
a transfer.

Signed-off-by: Teresa Remmet <[email protected]>
As clk_get_rate() also keeps the clk prepare lock which
can lead into a deadlock. It was removed upstream with this commit:
(90ad2cb) i2c: imx: use clk notifier for rate changes

But it has been readded again with:
(0e94d44) MLK-20368 i2c-imx: Coverity: fix divide by zero warning

The commit meassage does not explain why it was readded. It is not needed
as the clk notifier is used. Removed it again.

Signed-off-by: Teresa Remmet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant