Page MenuHomeFreeBSD

Update clock names
ClosedPublic

Authored by oh on Sep 20 2024, 12:23 PM.
Tags
None
Referenced Files
F170587552: D46713.id185356.diff
Sat, Sep 5, 1:04 PM
F170486717: D46713.id154231.diff
Sat, Sep 5, 1:33 AM
F170479467: D46713.id143535.diff
Sat, Sep 5, 12:40 AM
F170479459: D46713.id143537.diff
Sat, Sep 5, 12:40 AM
F170476098: D46713.diff
Sat, Sep 5, 12:20 AM
Unknown Object (File)
Wed, Sep 2, 5:16 AM
Unknown Object (File)
Fri, Aug 28, 4:55 PM
Unknown Object (File)
Fri, Aug 14, 9:11 PM

Details

Diff Detail

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

Event Timeline

oh requested review of this revision.Sep 20 2024, 12:23 PM

Don't know about the names

This revision is now accepted and ready to land.Sep 20 2024, 12:58 PM

Sorry, missed dmtimer that was not part of D27889 but still needs to be updated

This revision now requires review to proceed.Sep 20 2024, 1:10 PM
This revision is now accepted and ready to land.Oct 1 2024, 10:45 PM

sync the patch to 2452bcd8913bb45ec269d0a3219ca8bfc0c7a183. No changes in the actual patch, but ti_pruss.c was updated in ef9ffb8594eee294334ced627755bf5b46b48f9f

This revision now requires review to proceed.Mar 30 2025, 1:54 PM

Previously the review also did some cleanup (ti_pruss.c) and silences if its not in the bootverbose mode.

Now, only do the update of the DTS clock names

oh retitled this revision from Update clock names and silent drivers if not in verbose to Update clock names.Apr 24 2025, 4:07 PM
This revision is now accepted and ready to land.Apr 24 2025, 4:32 PM

Tested on hardware as part of this stack: D46703, D46712, D46713, D46714, D41888, D46722, D46723, D46742, D46743, D46744 and D46746 rebased from stable/14 onto stable/15 (6b25004d1d18), KERNCONF=AM335X, on a BeagleBone Black Rev B3. The board boots 15.1-STABLE to multi-user with zero device attach failures. Full results and evidence: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297800, discussion on D46723.

This revision is accepted, so a note before it lands: the version of this change on the malavon stablebbb/14 branch (commit 6d93b69bcf99) also fixes am335x_musb.c to request usbotg_fck rather than usbotg_fck@47c. That hunk is not in this diff, which touches four files against the branch commit's six.

Without it USB does not attach on a BeagleBone Black: clk_get_by_name() returns ENXIO and musbotg_attach() fails. I rebased from the Phabricator diffs, hit the failure, and diagnosed it before discovering it had already been fixed on the branch. The fix is yours, not mine. Worth folding in before this is committed, or landing alongside it.

The hunk, in musbotg_attach(), so it is a paste rather than a lookup:

-	err = clk_get_by_name(dev, "usbotg_fck@47c", &clk_usbotg_fck);
+	err = clk_get_by_name(dev, "usbotg_fck", &clk_usbotg_fck);
 	if (err) {
-		device_printf(dev, "Can not find usbotg_fck@47c\n");
+		device_printf(dev, "Can not find usbotg_fck\n");
 		return (ENXIO);
 	}
 	err = clk_enable(clk_usbotg_fck);
 	if (err) {
-		device_printf(dev, "Can not enable usbotg_fck@47c\n");
+		device_printf(dev, "Can not enable usbotg_fck\n");
 		return (ENXIO);
 	}

The gate is registered under the name from its clock-output-names property, so the unit-address form never matches. The FIXME comment above it could stay, reworded: the node still has no clocks property, and the gate still lives at offset 0x47c per TRM 8.1.12.2.

Also note commit 46bed482 on that branch is a one-line fixup to this revision; applying this diff without it leaves the build broken.

This revision was automatically updated to reflect the committed changes.