Page MenuHomeFreeBSD

Enable the SDHCI controller on ARMADA38X
ClosedPublic

Authored by loos on May 5 2017, 3:18 AM.

Details

Summary

Add the Marvell SDHCI controller the list of supported devices in sdhci_fdt.

Enable the SDHCI controller, bus and devices on ARMADA38X kernel.

Depends on: D10601, D10602
Sponsored by: Rubicon Communications, LLC (Netgate)

Test Plan

Tested on ClearFog Pro.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

loos created this revision.May 5 2017, 3:18 AM
loos retitled this revision from Enable the SDHCI controller for ARMADA38X to Enable the SDHCI controller on ARMADA38X.May 5 2017, 5:19 AM
mw_semihalf.com added inline comments.May 5 2017, 7:38 AM
sys/dev/sdhci/sdhci_fdt.c
196 ↗(On Diff #28046)

Hi,

Have you checked other quirks with linux drivers/mmc/host/sdhci-pxav3.c?

Also, I think this driver is also missing setting bus width - I guess it's always "4", right?

loos added inline comments.May 8 2017, 7:36 PM
sys/dev/sdhci/sdhci_fdt.c
196 ↗(On Diff #28046)

Yes, the other quirks are not applicable for our SDHCI layer (we are still using SDMA) or are not applicable to this hardware.

The quirks were also checked against the NetBSD drivers (where I found the missing bits): https://nxr.netbsd.org/xref/src/sys/arch/arm/marvell/mvsoc_sdhc.c#83

The SDHCI code seems to be doing the right thing with respect to bus-width. If necessary we can handle it based on FDT properties.

sys/dev/sdhci/sdhci_fdt.c
196 ↗(On Diff #28046)

Thanks. I think we can add bus-width handling and parsing in the separate patch (a38x supports 8-bits as well and with current code we won't make use of it). Other than that I'm ok with the patch, thanks!

mw_semihalf.com accepted this revision.May 10 2017, 7:05 PM
This revision is now accepted and ready to land.May 10 2017, 7:05 PM
This revision was automatically updated to reflect the committed changes.