Skip to content

sunxi: clk/mmc: Fix T113-s3 MMC performance

Andre Przywara linux-sunxi u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sunxi: mmc: Fix T113-s3 MMC clock dividerdrivers/mmc/sunxi_mmc.c+7 -04 replies
2/2sunxi: sun50i_h6: clock: fix PLL_PERIPH0 rate calculationarch/arm/mach-sunxi/clock_sun50i_h6.c+10 -52 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJernej SkrabecPeng Fan
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] sunxi: clk/mmc: Fix T113-s3 MMC performance

Hi,

as Kuba reported, the MMC performance of the Allwinner T113-s3 chips in mainline Linux is only half of what's expected. Checking that in U-Boot revealed that's actually only one fourth there, since on top of the same bug as in the kernel, we also calculate the base PLL frequency wrongly.

Fix that by halving the frequency as reported by the clock function, and apply an extra divider of two in the MMC code - to compensate for that missing hidden divider (which is the same bug as in Linux). Seeing only one fourth of the base frequency makes the calculated internal divider go up by the factor of 4, so we get the MMC performance back its expected levels: from around 5.8 MB/s to ~23 MB/s.

Cheers,
Andre

Andre Przywara (2):
sunxi: mmc: Fix T113-s3 MMC clock divider
sunxi: sun50i_h6: clock: fix PLL_PERIPH0 rate calculation

 arch/arm/mach-sunxi/clock_sun50i_h6.c | 15 ++++++++++-----
 drivers/mmc/sunxi_mmc.c               |  7 +++++++
 2 files changed, 17 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1