-
Notifications
You must be signed in to change notification settings - Fork 140
soundwire: intel: simplify sync_go sequence #4153
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
Conversation
6b251c6 to
f44a72d
Compare
In the existing code, the SHIM_SYNC::SYNC_GO bit is set, and the code waits for it to return to zero. That second wait part is just wrong: the SYNC_GO bit is *write-only* so there's no way to know if it's cleared by hardware. The code works because the value for a read-only bit is zero, but that's really just luck. Simplify the sequence to a plain read-modify-write. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
f44a72d to
bc2dde8
Compare
ujfalusi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it makes more sense.
|
additional simplifications are possible, closing for now. |
|
actually no, it's too complicated to simplify further. |
|
@plbossart the CML SDW tests are failing with this PR. Is this a known issue or is this because of this PR |
Ok looks like its happening in other PRs too |
yes, that board has severe issues with timeouts in suspend/resume. I don't think it's related to this PR. |
|
already merged with #4157 |
In the existing code, the SHIM_SYNC::SYNC_GO bit is set, and the code waits for it to return to zero.
That second wait part is just wrong: the SYNC_GO bit is write-only so there's no way to know if it's cleared by hardware. The code works because the value for a read-only bit is zero, but that's really just luck.
Simplify the sequence to a plain read-modify-write.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com