Page MenuHomeFreeBSD

eswin sdhci driver
Needs ReviewPublic

Authored by br on Dec 3 2024, 5:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 7:15 PM
Unknown Object (File)
Sun, Dec 8, 6:20 AM
Subscribers

Details

Reviewers
mhorne
jrtc27
Summary

Add driver for Eswin SDHCI controller.

This one requires PHY initialization otherwise it does not start.

Sorry for some amount of crap -- I found it Linux/U-Boot.

Test Plan

Works on Premier P550.

No prior sdcard initialization needed in U-Boot (I think)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br requested review of this revision.Dec 3 2024, 5:35 PM

I have never written or studied an sdhci driver in depth. Maybe @manu would like to look.

TODO: MMCCAM (?)

sys/riscv/eswin/eswin_sdhci.c
107

Better as either BIT_SHIFT or BIT_S.

139

This may as well be sorted next to irq_res.

187โ€“200

This is the ugliness you mean? If you want to submit this, I don't mind, it is your driver. Presumably what lands in upstream linux/u-boot will be documented a little better, and I hope you can update this to match.

236
487

Ideally we would disable the clocks here too.

sys/riscv/eswin/eswin_sdhci.c
412โ€“417

This type of thing is more typical in an attach routine.

I have never written or studied an sdhci driver in depth. Maybe @manu would like to look.

TODO: MMCCAM (?)

mmccam should be covered as it's an sdhci subdriver.

sys/riscv/eswin/eswin_sdhci.c
126

I can't find any doc on this one in linux master branch, is that a compatible from some vendor u-boot ?