[U-Boot] [PATCH v2] EXYNOS: SPL: Add a custom spi copy function
Simon Glass
sjg at chromium.org
Sat May 11 17:25:44 CEST 2013
Hi Rajeshwari,
On Sat, May 11, 2013 at 9:17 AM, Simon Glass <sjg at chromium.org> wrote:
> From: Rajeshwari Shinde <rajeshwari.s at samsung.com>
>
> This CL implements a custom spi_copy funtion to copy u-boot from SF to
> RAM. This is faster then iROM spi_copy funtion as this runs spi at 50Mhz
> and also in WORD mode of operation.
>
> Changed a printf in pimux.c to debug just to avoid the the compilation
> error in SPL.
> Removed the enum for boot mode from spl_boot.c as it was already define in spl.h
>
> Signed-off-by: Alim Akhtar <alim.akhtar at samsung.com>
> Signed-off-by: Tom Wai-Hong Tam <waihong at chromium.org>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
> Rebased on top of MMC series:
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> Changes in v2:
> - Rebase on top of MMC series
> - Fix new checkpatch warnings
>
Acked-by: Simon Glass <sjg at chromium.org>
For all your SPI patches (listed below):
Tested-by: Simon Glass <sjg at chromium.org>
I have applied the MMC series and all of your SPI patches, and tested
on snow. Everything works correctly I think.
Original SPI speed is very slow:
SMDK5250 # time sf read 40000000 0 400000
time: 1 minutes, 9.906 seconds, 69906 ticks
With your SPI patches and my 50MHz device tree patch I get:
SMDK5250 # time sf read 40000000 0 400000
time: 1.427 seconds, 1427 ticks
which is a dramatic improvement. If I turn on the caches (remove
CONFIG_SYS_DCACHE_OFF from include/configs/exynos5-dt.h) then it goes
at full sped:
SMDK5250 # time sf read 40000000 0 400000
time: 0.699 seconds, 699 ticks
Note that we are working on some further SPI code improvements locally
and may send patches for that, but it will be after the merge window.
For references, here are the patches in my tree when I tested (listed
in the reverse order they were applied).
660d9fd (HEAD, ws/snow, snow) exynos: dts: Use 50MHz SPI flash speed on snow
0295f39 EXYNOS: SPL: Add a custom spi copy function
e712583 EXYNOS: SPI: Support word transfers
aac5c2d EXYNOS: SPI: Minimise access to SPI FIFO level
99f2680 EXYNOS: SPI: Support a delay after deactivate
cbe66cb EXYNOS: Export timer_get_us() to get microsecond timer
893d152 EXYNOS: SPI: Support SPI_PREAMBLE mode
f4cce8b SPI: Add support for preamble bytes
f91072a exynos: Enable mmc for snow
aa1b39f COMMON: MMC: Command to support EMMC booting and to resize
EMMC boot partition
a6358a3 SMDK5250: Enable EMMC booting
e37cc9f MMC: APIs to support resize of EMMC boot partition
919c7f6 SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT
2277040 EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results.
206af80 EXYNOS5: DWMMC: Added FDT support for DWMMC
0e8e41c DWMMC: Initialise dwmci and resolve EMMC read write issues
087075c EXYNOS5: FDT: Add DWMMC device node data
0f2db62 FDT: Add compatible string for DWMMC
6e4e37c EXYNOS5: I2C: Add FDT and non-FDT support for I2C
> arch/arm/cpu/armv7/exynos/pinmux.c | 2 +-
> arch/arm/include/asm/arch-exynos/spi.h | 2 +
> arch/arm/include/asm/arch-exynos/spl.h | 1 +
> board/samsung/smdk5250/spl_boot.c | 132 +++++++++++++++++++++++++++++----
> include/configs/exynos5250-dt.h | 3 +
> spl/Makefile | 4 +
> 6 files changed, 129 insertions(+), 15 deletions(-)
>
Regards,
Simon
More information about the U-Boot
mailing list