[PATCH] mci: dw_mmc: set dma mask to work correctly on 64bit platforms
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Jun 11 01:26:05 PDT 2021
On 10.06.21 15:10, Sascha Hauer wrote:
> The variant we support currently can only do 32bit DMA. Adjust dma mask
> accordingly. Also use dma_map_single() rather than dma_sync_single() to
> actually get errors when the mapping fails.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
> drivers/mci/dw_mmc.c | 53 ++++++++++++++++++++++++++------------------
> 1 file changed, 31 insertions(+), 22 deletions(-)
> static int dwmci_set_transfer_mode(struct dwmci_host *host,
> @@ -272,6 +271,7 @@ dwmci_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
> uint64_t start;
> int ret;
> unsigned int num_bytes = 0;
> + dma_addr_t dma = 0;
>
> start = get_time_ns();
> while (1) {
> @@ -287,16 +287,20 @@ dwmci_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
> dwmci_writel(host, DWMCI_RINTSTS, DWMCI_INTMSK_ALL);
>
> if (data) {
> +
stray new line
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list