opnsense-src/sys/dev/sdhci
Kornel Duleba 29cb30dcb0 sdhci_fsl_fdt: Fix tuning code
- Some of the register writes were already done in the generic tuning code.
  Remove them.
- Increase the polling timeout. The previous value is probably fine, but since
  timeouts are treated as fatal errors increasing it to 200ms won't hurt.
- Rework the HS400 switching code. Make sure that the switch happens at the
  right time. Reset the DLL0 block. We need to do that if u-boot has previously
  configured the controller in HS400 mode.
- Check current timing before tuning. The tuning devmethod is always called,
  even for timings that don't require the tuning procedure.
- Rework software tuning routine code. Use inner formula for clock
  divider calculation, as previous one was incorrect.
- Implement custom re-tune procedure.

Co-authored-by: Hubert Mazur <hum@semihalf.com>
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D34027
2022-02-22 09:58:32 +01:00
..
fsl_sdhci.c sdhci: clean up empty lines in .c and .h files 2020-09-01 21:54:16 +00:00
sdhci.c sdhci: fix dumping support in MMCCAM configuration 2022-01-26 09:31:45 +02:00
sdhci.h sdhci: Provide devmethod for software reset 2021-11-05 10:18:57 +01:00
sdhci_acpi.c o Don't allocate resources for SDMA in sdhci(4) if the controller or the 2018-12-30 23:08:06 +00:00
sdhci_fdt.c sdhci: Make ext_resources non-optional 2022-02-21 17:28:46 +01:00
sdhci_fdt_gpio.c Release all previously allocated resources. 2017-03-08 14:52:03 +00:00
sdhci_fdt_gpio.h Add new helper routines for sdhci bridge drivers that use gpio pins for 2017-01-09 01:54:36 +00:00
sdhci_fsl_fdt.c sdhci_fsl_fdt: Fix tuning code 2022-02-22 09:58:32 +01:00
sdhci_if.m sdhci: Provide devmethod for software reset 2021-11-05 10:18:57 +01:00
sdhci_pci.c sdhci(4): Recognize the Texas Instruments PCIxx12 card reader. 2020-08-25 18:32:43 +00:00
sdhci_xenon.c sdhci_xenon: split driver file into generic file and fdt parts 2021-09-29 16:19:28 +02:00
sdhci_xenon.h sdhci_xenon: split driver file into generic file and fdt parts 2021-09-29 16:19:28 +02:00
sdhci_xenon_acpi.c sdhci: Make ext_resources non-optional 2022-02-21 17:28:46 +01:00
sdhci_xenon_fdt.c sdhci_xenon: split driver file into generic file and fdt parts 2021-09-29 16:19:28 +02:00