forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: mmc: sunxi: fix A64 calibration routine
The calibration facility in the A64 MMC block seems to have been misunderstood: the result value is not the value to program into the delay bits, but is the number of delay cells that result in a full clock cycle delay. So this value has to be scaled by the desired phase, which we still have to know and program. Change the calibration routine to take a phase parameter and scale the calibration value accordingly. Also introduce sun50i-a64 delay parameters to store the required phase. Looking at the BSP kernel the sample delay for anything below HS200 is 0, so we go with that value. Once the driver supports HS200 and faster modes, we can enter confirmed working values in there. This fixes the MMC driver for the Pine64. SD card works, but eMMC (on another A64 board) does not. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
- Loading branch information
Showing
1 changed file
with
21 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters