HomeFreeBSD

sdhci_fsl_fdt: Provide more accurate clk calculation

Description

sdhci_fsl_fdt: Provide more accurate clk calculation

SDHCI controllers found in the QorIQ SoCs offer improved accuracy of
the clock frequency selection, compared to the SDHCI standard. Frequency
selection is performed using two divider registers, named prescaler and
divisor, according to the following formula:
frequency = base clock / (prescaler * divisor), where prescaler can be
bypassed (set to 1) and divisor permitted to take odd values.

Rather than depend on clock division precalculated by sdhci core, make
use of this property of the divider registers and achieve frequencies
closer to the ones requested.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32706

Details

Provenance
ar_semihalf.comAuthored on Nov 5 2021, 9:17 AM
wmaCommitted on Nov 5 2021, 9:18 AM
Differential Revision
D32706: sdhci_fsl_fdt: Provide more accurate clk calculation
Parents
rG36b80dba1742: sdhci_fsl_fdt: Add full support for software reset
Branches
Unknown
Tags
Unknown