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)
Wed, Feb 28, 10:54 AM
Unknown Object (File)
Feb 25 2024, 1:46 PM
Unknown Object (File)
Jan 30 2024, 2:11 AM
Unknown Object (File)
Jan 6 2024, 8:45 AM
Unknown Object (File)
Jan 3 2024, 9:59 AM
Unknown Object (File)
Dec 29 2023, 5:22 PM
Unknown Object (File)
Dec 20 2023, 12:10 AM
Unknown Object (File)
Dec 9 2023, 10:27 AM
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.