mci: sdhci: add Atmel SDHCI (sama5d2, sam9x60) support
We already support Ethernet and QSPI on the SAMA5D2, but MMC was so far
missing. Port over the at91bootstrap driver to barebox. Some parts are
based on the U-Boot and Linux implementations.

To support future use in PBL, the driver model and driver implementation
parts are split into separate files with the latter being compilable for PBL
as well.

Registers, which are found in the common Linux sdhci.h have been added
to the barebox sdhci.h. Registers which appear to be Atmel specific have
been added to atmel-sdhci-common.c instead.

The driver still misses some parts, which will follow later:

  - ADMA is unsupported, PIO only for now
  - Only the SD/MMC controller already enabled by the first stage
    bootloader is supported. Further clocking changes appear
    to be necessary to enable another

Both can be retrofitted later on and don't hold us back from booting
from MMC.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 0f7e615 commit 075179763a91b6fea4a4309227d73c75d760c7bd
@Ahmad Fatoum Ahmad Fatoum authored on 15 Apr 2020
Sascha Hauer committed on 27 Apr 2020
Showing 6 changed files
View
drivers/mci/Kconfig
View
drivers/mci/Makefile
View
drivers/mci/atmel-sdhci-common.c 0 → 100644
View
drivers/mci/atmel-sdhci.c 0 → 100644
View
drivers/mci/atmel-sdhci.h 0 → 100644
View
drivers/mci/sdhci.h