Skip to content

mmc: exynos_dw_mmc: Disable FMP for Exynos850

Sam Protsenko u-boot 1 version Applied

Status from this message: Applied to mmc/next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6mmc: exynos_dw_mmc: Extend dm_dwmci_ops without code duplicationdrivers/mmc/exynos_dw_mmc.c+8 -81 reply
2/6mmc: dw_mmc: Do not export dwmci_send_cmd() and dwmci_set_ios()drivers/mmc/dw_mmc.c include/dwmmc.h+3 -61 reply
3/6mmc: exynos_dw_mmc: Improve coding styledrivers/mmc/exynos_dw_mmc.c+20 -141 reply
4/6mmc: exynos_dw_mmc: Add quirk for disabling FMParch/arm/mach-exynos/include/mach/dwmmc.h drivers/mmc/exynos_dw_mmc.c+26 -01 reply
5/6mmc: exynos_dw_mmc: Add exynos850 compatibledrivers/mmc/exynos_dw_mmc.c+8 -01 reply
6/6mmc: exynos_dw_mmc: Disable FMP for Exynos850 chipdrivers/mmc/exynos_dw_mmc.c+1 -11 reply

Reviews trailers per patch

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

PatchAnand Moon
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-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/6] mmc: exynos_dw_mmc: Disable FMP for Exynos850

When doing USB boot [1,2] on E850-96 board (based on Exynos850 SoC) it was found the eMMC becomes non-functional. The reason why it happens is that the FMP (Flash Memory Protector) is enabled in FMPSECURITY register (eMMC block) during USB boot.

In regular boot from eMMC the FMP is disabled by some early bootloader:

    FMPSECURITY[31:0] = 0xcfe2_e492

But when performing USB boot, this register keeps its reset value:

    FMPSECURITY[31:0] = 0xffe2_e492

which leads to non-functional eMMC, because the next two bits are enabled in this case:

- FMP_ON[29] = 1: FMP encryption is enabled for eMMC
- MMC_SFR_PROT_ON = 1: SFR memory region (peripheral registers) protection is enabled for eMMC block

That makes eMMC inaccessible from U-Boot.

This patch series implements disabling FMP on Exynos850 to make eMMC functional when U-Boot is executed during USB boot. The per-patch breakdown:

- patches 1-3: cleanup
- patches 4-6: adding FMP disabling quirk and enabling it on E850

Patches are supposed to be applied in the same order as they appear in the series, to keep the dependencies straight. The series is expected to go either through Minkyu's (Samsung) tree, or Peng Fan's MMC tree.

[1] https://gitlab.com/LinaroLtd/e850-96/tools/dltool
[2] https://docs.u-boot.org/en/latest/board/samsung/e850-96.html#flashing-overview

Sam Protsenko (6):
mmc: exynos_dw_mmc: Extend dm_dwmci_ops without code duplication
mmc: dw_mmc: Do not export dwmci_send_cmd() and dwmci_set_ios()
mmc: exynos_dw_mmc: Improve coding style
mmc: exynos_dw_mmc: Add quirk for disabling FMP
mmc: exynos_dw_mmc: Add exynos850 compatible
mmc: exynos_dw_mmc: Disable FMP for Exynos850 chip

 arch/arm/mach-exynos/include/mach/dwmmc.h |  6 ++
 drivers/mmc/dw_mmc.c                      |  6 +-
 drivers/mmc/exynos_dw_mmc.c               | 78 ++++++++++++++++-------
 include/dwmmc.h                           |  3 -
 4 files changed, 65 insertions(+), 28 deletions(-)

base-commit: 1071cc85bc4d1416fd93a063ba4abdd2d17ae0db

Signature · 1 line
2.39.5