Page MenuHomeFreeBSD

Add a generic ahci attachment
ClosedPublic

Authored by andrew on Nov 24 2015, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 13 2024, 4:32 AM
Unknown Object (File)
Jan 21 2024, 6:55 AM
Unknown Object (File)
Jan 10 2024, 1:55 AM
Unknown Object (File)
Nov 14 2023, 12:11 PM
Unknown Object (File)
Nov 11 2023, 12:16 AM
Unknown Object (File)
Oct 13 2023, 11:16 AM
Unknown Object (File)
Oct 9 2023, 11:14 PM
Unknown Object (File)
Sep 14 2023, 4:54 PM
Subscribers

Details

Summary

This adds support for AHCI to attach to a generic bus. On arm64 this is
on the internal memory bus and will appear as a memory-mapped device.

While this is currently FDT specific I expect this to be reused with ACPI
as this is an option on ARMv8 servers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Add a generic ahci attachment.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: mav, mmel.

I have no real objections, other then it looks suspiciously simplistic: no quirks, no suspend-resume, no setting for some controller properties (I am not sure newbus will always zero softc), ...

sys/dev/ahci/ahci_generic.c
57 ↗(On Diff #10473)

Why is this function needed at all?

In D4269#89984, @mav wrote:

I have no real objections, other then it looks suspiciously simplistic: no quirks, no suspend-resume, no setting for some controller properties (I am not sure newbus will always zero softc), ...

There are no quirks because we won't hit the only know errata on the hardware I tested this on. It's related to the second sata port which is disabled meaning the driver never sees it.

I left out suspend/resume as I it's untested, none of the suspend/resume paths have been tested as there is currently nothing similar to the Cx idle states on arm64.

The device_get_softc man page datest "The softc is automatically allocated and zeroed when the device is attached".

sys/dev/ahci/ahci_generic.c
57 ↗(On Diff #10473)

The larger patch I pulled this from did some extra work here that seems to not be needed on the hardware I have.

andrew edited edge metadata.

Remove an unneeded call to ofw_bus_get_node

Please, see inline comment. The rest is OK for me.

sys/conf/files.arm64
60 ↗(On Diff #10478)

Use other name that ahci_fdt. ahci_generic (although is still ugly) at least matched with driver name.

mmel edited edge metadata.
mmel added inline comments.
sys/conf/files.arm64
60 ↗(On Diff #10478)

Taking back, i misread option name as "ahci_fdt" (with underscore). Sorry.

This revision is now accepted and ready to land.Dec 3 2015, 11:18 AM
This revision was automatically updated to reflect the committed changes.