Page MenuHomeFreeBSD

Add a driver for the TI watchdog.
ClosedPublic

Authored by rpaulo on Oct 18 2014, 7:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 4:32 AM
Unknown Object (File)
Sat, Nov 23, 8:43 PM
Unknown Object (File)
Fri, Nov 22, 9:07 PM
Unknown Object (File)
Thu, Nov 21, 7:15 PM
Unknown Object (File)
Thu, Nov 21, 3:05 AM
Unknown Object (File)
Wed, Nov 20, 7:27 PM
Unknown Object (File)
Wed, Nov 20, 5:18 PM
Unknown Object (File)
Thu, Nov 14, 11:50 PM
Subscribers

Details

Reviewers
andrew
Group Reviewers
ARM
Commits
rS273257: Add a driver for the TI watchdog.
Summary

The TI watchdog timer is present on BeagleBone's. Since 2014, U-Boot
has been booting the BeagleBone with the watchdog enabled. We need to
disable it on boot to avoid a spurious reset.
The timer isn't exactly precise, but it will do as a watchdog. This
is also a reflection of the watchdog(9) API.

In the future, we could handle interrupts, but the watchdog(9) API
needs to be a bit smarter before that can happen.

Test Plan

Booted the BBB with a new U-Boot and confirmed it survives more than
one minute.
Used watchdog and watchdog to test the code.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rpaulo retitled this revision from to Add a driver for the TI watchdog..
rpaulo updated this object.
rpaulo edited the test plan for this revision. (Show Details)
andrew added inline comments.
sys/arm/ti/files.ti
22 ↗(On Diff #2030)

I think this should be optional, with the above warning in the kernel config.

sys/arm/ti/ti_wdt.c
126 ↗(On Diff #2030)

What do these magic numbers mean? Are they just values the user manual says we need to write to the register?

148 ↗(On Diff #2030)

This should handle "ti,omap3-wdt" as that is what Linux uses.

sys/arm/ti/ti_wdt.c
126 ↗(On Diff #2030)

Yes. I suspect it's a sequence to avoid enabling/disabling the watchdog accidentally.

Changes based on review comments.

Fixing the previous revision.

Fixing the compatible string.

andrew added a reviewer: andrew.
This revision is now accepted and ready to land.Oct 18 2014, 4:49 PM
rpaulo updated this revision to Diff 2040.

Closed by commit rS273257 (authored by @rpaulo).

stas added inline comments.
head/sys/arm/ti/ti_wdt.c
102

Missing blank line. It looks like you're using style(9) like blank lines in ti_wdt_enable(), but not here and not in some other functions.