u-boot/arch/arm
Andre Przywara 9faae5457f mmc: sunxi: Increase MMIO FIFO read performance
To avoid the complexity of DMA operations (with chained descriptors), we
use repeated MMIO reads and writes to the SD_FIFO_REG, which allows us
to drain or fill the MMC data buffer FIFO very easily.

However those MMIO accesses are somewhat costly, so this limits our MMC
performance, to between 17 and 22 MB/s, but down to 9.5 MB/s on the H6
(partly due to the lower AHB1 frequency).

As it turns out we read the FIFO status register after *every* word we
read or write, which effectively doubles the number of MMIO accesses,
thus effectively more than halving our performance.

To avoid this overhead, we can make use of the FIFO level bits, which are
in the very same FIFO status registers.
So for a read request, we now can collect as many words as the FIFO
level originally indicated, and only then need to update the status
register.

We don't know for sure the size of the FIFO (and it seems to differ
across SoCs anyway), so writing is more fragile, which is why we still
use the old method for that. If we find a minimum FIFO size available on
all SoCs, we could use that, in a later optimisation.

This patch increases the eMMC read speed on a Pine64-LTS from about
22MB/s to 44 MB/s. SD card reads don't gain that much, but with 23 MB/s
we now reach the practical limit for 3.3V SD cards.
On the H6 we double our transfer speed, from 9.5 MB/s to 19.7 MB/s.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-07-10 01:22:09 +01:00
..
cpu arm: Remove spear600 boards and the rest of SPEAr support 2021-07-07 22:22:42 -04:00
dts sunxi: h3: Add initial ZeroPi support 2021-07-10 01:22:09 +01:00
include mmc: sunxi: Increase MMIO FIFO read performance 2021-07-10 01:22:09 +01:00
lib arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y 2021-06-28 14:47:10 -04:00
mach-aspeed common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mach-at91 arm: Remove at91rm9200ek boards 2021-07-07 22:22:42 -04:00
mach-bcm283x reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-bcmstb
mach-cortina
mach-davinci reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-exynos ARM: make gd a function call for LTO and set via set_gd() 2021-05-24 14:21:30 -04:00
mach-highbank
mach-imx mx7d: Add Storopack's SMEGW01 board 2021-06-09 13:34:38 +02:00
mach-integrator
mach-ipq40xx dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mach-k3 arm: mach-k3: j721e_init: Force early probe of clk-k3 driver 2021-06-11 16:34:52 +05:30
mach-keystone common: fit: Update board_fit_image_post_process() to pass fit and node_offset 2021-06-11 16:34:52 +05:30
mach-kirkwood Revert "arm: Remove nsa310s board" 2021-07-07 22:55:41 -04:00
mach-lpc32xx arm: lpc32xx: add EA LPC3250 DevKitv2 board support 2021-07-06 14:12:14 -04:00
mach-mediatek board: mt7629: enable compression of u-boot to reduce the size of final image 2021-03-20 16:24:27 -04:00
mach-meson arm: meson: remove static ethernet link setup 2021-04-06 11:10:29 +02:00
mach-mvebu arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function 2021-06-04 11:32:41 +02:00
mach-nexell treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
mach-octeontx reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-octeontx2 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-omap2 ARM: omap3: fix LTO for DM3730 (and possibly other omap3 boards) 2021-05-24 14:21:30 -04:00
mach-orion5x reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-owl reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-qemu qemu: arm: Initialise virtio devices in board_late_init 2020-12-31 14:41:31 +01:00
mach-rmobile Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next 2021-06-28 18:32:07 -04:00
mach-rockchip board: rockchip: Add rk3568 evb support 2021-06-18 14:36:24 +08:00
mach-s5pc1xx
mach-snapdragon arm: snapdragon: Fix typo in clk_bcr_update() 2021-07-06 14:12:15 -04:00
mach-socfpga common: fit: Update board_fit_image_post_process() to pass fit and node_offset 2021-06-11 16:34:52 +05:30
mach-sti
mach-stm32 board: Add rt-thread art-pi board support 2021-04-09 11:53:00 +02:00
mach-stm32mp stm32mp: stm32prog: handle dfu error 2021-06-18 10:09:41 +02:00
mach-sunxi mmc: sunxi: Enable "new timing mode" on all new SoCs 2021-07-10 01:22:09 +01:00
mach-tegra ARM: fix LTO for seaboard 2021-05-24 14:21:30 -04:00
mach-u8500
mach-uniphier reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-versal arm64: versal: Remove gd reference 2021-04-23 08:49:19 +02:00
mach-versatile
mach-zynq reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
mach-zynqmp arm64: zynqmp: Add support for 64bit addresses in its 2021-06-23 09:48:35 +02:00
mach-zynqmp-r5 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
thumb1/include/asm/proc-armv
config.mk ARM: don't use --gc-sections with LTO when using private libgcc 2021-05-24 14:21:30 -04:00
Kconfig arm: Remove spear600 boards and the rest of SPEAr support 2021-07-07 22:22:42 -04:00
Kconfig.debug
Makefile