Page MenuHomeFreeBSD

uart: Add support for snps,dw-apb-uart clock and hwreset resources
ClosedPublic

Authored by jmcneill on Mar 26 2016, 6:05 PM.
Tags
Referenced Files
Unknown Object (File)
Wed, Dec 11, 6:16 AM
Unknown Object (File)
Sun, Dec 8, 1:20 AM
Unknown Object (File)
Nov 22 2024, 10:22 PM
Unknown Object (File)
Nov 13 2024, 1:19 PM
Unknown Object (File)
Nov 13 2024, 3:00 AM
Unknown Object (File)
Nov 9 2024, 5:27 AM
Unknown Object (File)
Oct 29 2024, 3:43 PM
Unknown Object (File)
Oct 27 2024, 3:32 AM

Details

Summary

This change moves support for Synopsys Designware APB UART out of ns8250 into a separate driver, and adds support for activating clock and hwreset resources when the EXT_RESOURCES option is present.

Diff Detail

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

Event Timeline

jmcneill retitled this revision from to uart: Add support for snps,dw-apb-uart clock and hwreset resources.
jmcneill updated this object.
jmcneill edited the test plan for this revision. (Show Details)
jmcneill added a reviewer: ARM.
jmcneill set the repository for this revision to rS FreeBSD src repository - subversion.
jmcneill added a project: ARM.
manu_bidouilliste.com added inline comments.
sys/arm/conf/A20
75

Shouldn't the dependancy on ns8250 be handled in sys/conf/files ?
Something like :
dev/uart/uart_dev_ns8250.c optional uart uart_ns8250 | uart_snps

I'm really not sure if this kind of stuff is ok.

sys/arm/conf/A20
75

When you have two options that need to be set it would be: ... optional uart uart_foo | uart uart_bar

  • Make uart_snps depend on uart_ns8250
  • Remove redundant clk_disable calls before clk_release
sys/dev/uart/uart_dev_ns8250.c
455–456

This doesn't seems to be needed anymore, the busy-detect property was when ns8250 wasn't snps aware.

sys/dev/uart/uart_dev_ns8250.c
455–456

It was kept around to give people a chance to update their dtb. It can be removed now.

sys/dev/uart/uart_dev_snps.c
159

There seems to be a lot happening in this probe function that should be moved to attach.

sys/dev/uart/uart_dev_snps.c
159

Two problems --

  • uart_bus_probe needs to know the ref clock frequency
  • uart_bus_probe -> ns8250_bus_probe access registers, so clocks must be enabled
  • uart_dev_ns8250: Remove support for "busy-detect" property.
  • uart_dev_snps: allow to attach to ofwbus as well as simplebus to match uart_bus_fdt behavior.
mmel added inline comments.
sys/dev/uart/uart_dev_snps.c
284

This is not needed. Owfbus is subclass of simplebus for some time, so binding to simplebus also matches to ofwbus.

sys/dev/uart/uart_dev_snps.c
284

Have you tested this? I've found both are needed if the device could be a child of either.

sys/dev/uart/uart_dev_snps.c
284

Yes, sure. Tegra, for example, doesn't not have 'base' SoC simplebus at all, all devices are children of ofwbus. Binding to base class also matches to all its subclasses.

andrew added a reviewer: andrew.
This revision is now accepted and ready to land.Mar 30 2016, 10:20 AM
adrian added a reviewer: adrian.
This revision was automatically updated to reflect the committed changes.