Page MenuHomeFreeBSD

arm/ti: take the register offset from a ti,clksel parent
Needs ReviewPublic

Authored by rick_sloservers.com on Aug 23 2026, 10:24 AM.
Tags
Referenced Files
F174608006: D59120.diff
Sun, Oct 4, 3:38 PM
Unknown Object (File)
Thu, Oct 1, 3:59 PM
Unknown Object (File)
Thu, Oct 1, 1:50 AM
Unknown Object (File)
Tue, Sep 22, 9:07 PM
Unknown Object (File)
Tue, Sep 22, 6:54 PM
Unknown Object (File)
Sun, Sep 20, 3:18 AM
Unknown Object (File)
Wed, Sep 16, 4:28 AM
Unknown Object (File)
Tue, Sep 15, 8:44 AM
Subscribers
None

Details

Reviewers
oh
imp
manu
andrew
Summary

The ti,clksel binding puts the register offset on the parent node; a
child's "reg" is only an index matching its unit address. The mux,
divider and gate clock drivers read the child's "reg" first and use it
as the offset, which on am335x makes unaligned syscon accesses and
faults while registering the mux clocks:

ti_clksel0: <TI CLKSEL> on ofw_clkbus0
ti_mux12: <TI Mux Clock> on ti_clksel0
Fatal kernel mode data abort: 'Alignment Fault' on read
FSR=00000001, FAR=ffd00001

Take the offset from the parent when it is a ti,clksel node, otherwise
from the child's "reg", and fail to attach if neither exists rather than
use a wrong offset.

Test Plan

Boots to multi-user on a BeagleBone Black Rev B3 with the full stack
applied, rebased onto stable/15. Without this change the boot dies at the
alignment fault above while registering mux clocks; with it, the TI clock
tree registers completely (mux, gate, divider and DPLL nodes all attach)
and the board reaches login with zero device attach failures across six
reboot cycles.

Full evidence: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297800

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Applying the published diffs in dependency order onto current main
(ee81cd1d8f55):

apply cleanly : D46703 D46712 D46713 D41888 D46722 D46742 D46746*
FAIL          : D46714 D46723 D46743 D46744
* D46746 needs -p0; it uses the older "Index:" diff format with no a//b/
  prefixes. That is a format quirk, not code drift.