From 4d6a773b1cfcb7e62d12dd31e588b5d00179b470 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Wed, 23 Sep 2020 12:42:51 +0200 Subject: mmc: sdhci: move the ADMA2 table handling into own module There are other (non-SDHCI) controllers which supports ADMA2 descriptor tables, namely the Freescale eSDHC. Instead of copying the code, move it into an own module. Signed-off-by: Michael Walle --- include/sdhci.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sdhci.h b/include/sdhci.h index 94fc3ed56ac..f69d5f81fb1 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -271,7 +271,6 @@ struct sdhci_ops { int (*deferred_probe)(struct sdhci_host *host); }; -#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA) #define ADMA_MAX_LEN 65532 #ifdef CONFIG_DMA_ADDR_T_64BIT #define ADMA_DESC_LEN 16 @@ -302,7 +301,7 @@ struct sdhci_adma_desc { u32 addr_hi; #endif } __packed; -#endif + struct sdhci_host { const char *name; void *ioaddr; @@ -334,7 +333,6 @@ struct sdhci_host { dma_addr_t adma_addr; #if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA) struct sdhci_adma_desc *adma_desc_table; - uint desc_slot; #endif }; @@ -496,4 +494,8 @@ extern const struct dm_mmc_ops sdhci_ops; #else #endif +struct sdhci_adma_desc *sdhci_adma_init(void); +void sdhci_prepare_adma_table(struct sdhci_adma_desc *table, + struct mmc_data *data, dma_addr_t addr); + #endif /* __SDHCI_HW_H */ -- cgit v1.2.3