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 <michael@walle.cc>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user