Page MenuHomeFreeBSD

Split out the attachment from the generic-ehci driver
ClosedPublic

Authored by andrew on Feb 27 2019, 4:55 PM.

Details

Summary

Create an attachment file for the existing ACPI attachment, and create a
new FDT attachment for the generic-ehci driver.

Test Plan

Boots on NanoPC-T4 (RokcChip RK3399) with GENERIC-UP. It seems to cause
a fault when SMP is enabled, however I'm unsure why.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 22807
Build 21898: arc lint + arc unit

Event Timeline

andrew created this revision.Feb 27 2019, 4:55 PM
andrew added inline comments.Feb 27 2019, 4:58 PM
sys/dev/usb/controller/generic_ehci.c
186

I'm not sure this is the best name for it, but should be ok for testing.

sys/dev/usb/controller/generic_ehci_acpi.c
79

This should probably be in a header, although it will be the only thing in the header if it's generic_ehci.h.

manu added a comment.Feb 27 2019, 5:13 PM

This miss all the ext_resources stuff (phy, clocks) but that could be added later I guess.
Don't you need to DECLARE_CLASS and DEFINE_CLASS_0 ? (This stuff was always obscure to me ...)
Otherwise looks good for me.

sys/dev/usb/controller/generic_ehci.c
186

generic_ehci_driver ?

I've noticed a generic-ehci driver in sys/mips/mediatek/mtk_ehci.c already (and tried on my RK3399, it does attach). That should probably be replaced by this. Does anyone test mediatek MIPS these days? :)

andrew updated this revision to Diff 54530.Feb 28 2019, 1:10 PM

Split out the header
Enable clocks, etc

manu accepted this revision.Feb 28 2019, 1:27 PM

LGTM

sys/dev/usb/controller/generic_ehci_fdt.c
194

s/De-//

This revision is now accepted and ready to land.Feb 28 2019, 1:27 PM
This revision was automatically updated to reflect the committed changes.