]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/pxa_mmc_gen.c
karo: tx6: don't perform DQS gating calibration
[karo-tx-uboot.git] / drivers / mmc / pxa_mmc_gen.c
index 1f297571e563c7c69bf653f574c890ea916ac69b..19ae81d470c469e31f86ab1f0c66c9e22c256d57 100644 (file)
@@ -6,15 +6,13 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <config.h>
 #include <common.h>
-#include <malloc.h>
-
-#include <mmc.h>
-#include <asm/errno.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/regs-mmc.h>
+#include <asm/errno.h>
 #include <asm/io.h>
+#include <malloc.h>
+#include <mmc.h>
 
 /* PXAMMC Generic default config for various CPUs */
 #if defined(CONFIG_CPU_PXA25X)
@@ -197,7 +195,7 @@ static int pxa_mmc_do_read_xfer(struct mmc *mmc, struct mmc_data *data)
        while (len) {
                /* The controller has data ready */
                if (readl(&regs->i_reg) & MMC_I_REG_RXFIFO_RD_REQ) {
-                       size = min(len, PXAMMC_FIFO_SIZE);
+                       size = min(len, (uint32_t)PXAMMC_FIFO_SIZE);
                        len -= size;
                        size /= 4;
 
@@ -233,14 +231,14 @@ static int pxa_mmc_do_write_xfer(struct mmc *mmc, struct mmc_data *data)
        while (len) {
                /* The controller is ready to receive data */
                if (readl(&regs->i_reg) & MMC_I_REG_TXFIFO_WR_REQ) {
-                       size = min(len, PXAMMC_FIFO_SIZE);
+                       size = min(len, (uint32_t)PXAMMC_FIFO_SIZE);
                        len -= size;
                        size /= 4;
 
                        while (size--)
                                writel(*buf++, &regs->txfifo);
 
-                       if (min(len, PXAMMC_FIFO_SIZE) < 32)
+                       if (min(len, (uint32_t)PXAMMC_FIFO_SIZE) < 32)
                                writel(MMC_PRTBUF_BUF_PART_FULL, &regs->prtbuf);
                }