Page MenuHomeFreeBSD

arm ti_mbox_attach: Write sysconfig to TI_MBOX_SYSCONFIG to request reset.
ClosedPublic

Authored by jhb on Apr 9 2022, 1:15 AM.
Tags
None
Referenced Files
F86617210: D34856.diff
Sun, Jun 23, 2:38 AM
F86604619: D34856.id104800.diff
Sat, Jun 22, 10:01 PM
F86603647: D34856.diff
Sat, Jun 22, 9:38 PM
Unknown Object (File)
Fri, Jun 21, 8:50 AM
Unknown Object (File)
Thu, Jun 20, 4:11 PM
Unknown Object (File)
Thu, Jun 20, 11:57 AM
Unknown Object (File)
Apr 27 2024, 8:28 AM
Unknown Object (File)
Apr 27 2024, 8:26 AM
Subscribers

Details

Summary

This variable was flagged as a set but unused warning as its value was
read from a register and then modified to set a bit
(TI_MBOX_SYSCONFIG_SOFTRST). After the variable is modified, the code
then loops waiting for the SOFTRST bit to go clear in the
TI_MBOX_SYSCONFIG register. Presumably merely reading from the
register does not request a reset as other places in the driver read
this register, so most likely the updated value of sysconfig setting
the reset bit is supposed to be written to the register to request a
reset before the polling loop that waits for the reset to finish.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 9 2022, 1:15 AM

Mostly seeking review to see if there is a real bug to be fixed here per my musings in the commit log.

Based on the loop looking for TI_MBOX_SYSCONFIG_SOFTRST to clear I suspect the intent was indeed to write to TI_MBOX_SYSCONFIG and the warning found a real bug. I'd almost be tempted to put the write in and ask for feedback on -current.

jhb retitled this revision from arm ti_mbox_attach: Mark sysconfig as unused. to arm ti_mbox_attach: Write sysconfig to TI_MBOX_SYSCONFIG to request reset..Apr 18 2022, 7:37 PM
jhb edited the summary of this revision. (Show Details)

Write the register rather than marking the variable unused.

LGTM. Hopefully someone with appropriate hardware will test after this lands.

This revision is now accepted and ready to land.Apr 18 2022, 7:51 PM