summaryrefslogtreecommitdiffstats
path: root/drivers/mci/imx-esdhc.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-12-02 07:19:54 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-04 08:37:12 +0100
commit4a7d7b16e21a69a0a590b2356e8d8db2ae3452f6 (patch)
tree425f079de216a6ca57d4cdda52902434285b9ba1 /drivers/mci/imx-esdhc.h
parent8780906b36046b6aab9cfffdca3323b8a3916b25 (diff)
downloadbarebox-4a7d7b16e21a69a0a590b2356e8d8db2ae3452f6.tar.gz
barebox-4a7d7b16e21a69a0a590b2356e8d8db2ae3452f6.tar.xz
mci: imx-esdhc: Share code for esdhc_send_cmd()
Versions of esdhc_send_cmd() in imx-esdhc.c and imx-esdhc-pbl.c implement almost the same algorithm. To avoid code repetition, move that code to imx-esdhc-common.c and adjust all of the users accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/imx-esdhc.h')
-rw-r--r--drivers/mci/imx-esdhc.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/mci/imx-esdhc.h b/drivers/mci/imx-esdhc.h
index ac12087898..4bf890edf9 100644
--- a/drivers/mci/imx-esdhc.h
+++ b/drivers/mci/imx-esdhc.h
@@ -129,13 +129,6 @@ struct fsl_esdhc_host {
struct sdhci sdhci;
};
-struct fsl_esdhc_dma_transfer {
- dma_addr_t dma;
- unsigned int size;
- enum dma_data_direction dir;
-};
-
-
static inline int esdhc_is_usdhc(struct fsl_esdhc_host *data)
{
return !!(data->socdata->flags & ESDHC_FLAG_USDHC);
@@ -173,12 +166,10 @@ esdhc_setbits32(struct fsl_esdhc_host *host, unsigned int reg,
}
void esdhc_populate_sdhci(struct fsl_esdhc_host *host);
-int esdhc_setup_data(struct fsl_esdhc_host *host, struct mci_data *data,
- struct fsl_esdhc_dma_transfer *tr);
-int esdhc_do_data(struct fsl_esdhc_host *host, struct mci_data *data,
- struct fsl_esdhc_dma_transfer *tr);
int esdhc_poll(struct fsl_esdhc_host *host, unsigned int off,
unsigned int mask, unsigned int val,
uint64_t timeout);
+int __esdhc_send_cmd(struct fsl_esdhc_host *host, struct mci_cmd *cmd,
+ struct mci_data *data);
#endif /* __FSL_ESDHC_H__ */