]> git.baikalelectronics.ru Git - uboot.git/commit
sunxi: mmc: ignore card detect in SPL
authorAndre Przywara <andre.przywara@arm.com>
Wed, 13 Jul 2022 16:21:43 +0000 (17:21 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Sat, 21 Jan 2023 01:32:23 +0000 (01:32 +0000)
commitdad3c2061c91e8f4509b3eca3bc117c76e32d120
tree22700cee7b041a63efab03e38d590f7a18b3276b
parent72f480d966ff55a11cad0297202d5b3214714f21
sunxi: mmc: ignore card detect in SPL

The sunxi MMC code does not use the DM in the SPL, as we don't have a
device tree available that early, also no space for it.
This also means we cannot access the card-detect GPIO information from
there, so we have Kconfig symbols called CONFIG_MMCx_CD_PIN, which each
board has to define. This is a burden, also requires extra GPIO code in
the SPL.
As the SPL is the natural successor of the BootROM (from which we are
loaded), we can actually ignore the CD pin completely, as this is what
the BootROM does as well: CD GPIOs are board specific, but the BootROM
is not, so accesses the MMC devices anyway.
Also, as we must have been loaded from an MMC device when reaching this
code, there must have been a card in the slot.

Remove the card detect code from the non-DM implementation of the sunxi
MMC driver, to get rid of this unneeded code.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
drivers/mmc/sunxi_mmc.c