dm: core: Update lists_bind_fdt() to use ofnode
[oweals/u-boot.git] / drivers / mmc / s3c_sdi.c
index 02d1138a5fd1a92537c2dcbe6ae7d62d9687be98..faf7b83a14ce5c66cf1cf382b5a0cfef4c896db8 100644 (file)
@@ -133,7 +133,7 @@ s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 
        if (!timeout) {
                puts("S3C SDI: Command timed out!\n");
-               ret = TIMEOUT;
+               ret = -ETIMEDOUT;
                goto error;
        }
 
@@ -196,7 +196,7 @@ s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 
        if (!timeout) {
                puts("S3C SDI: Command timed out!\n");
-               ret = TIMEOUT;
+               ret = -ETIMEDOUT;
                goto error;
        }
 
@@ -207,7 +207,7 @@ error:
        return ret;
 }
 
-static void s3cmmc_set_ios(struct mmc *mmc)
+static int s3cmmc_set_ios(struct mmc *mmc)
 {
        struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
        uint32_t divider = 0;
@@ -215,7 +215,7 @@ static void s3cmmc_set_ios(struct mmc *mmc)
        wide_bus = (mmc->bus_width == 4);
 
        if (!mmc->clock)
-               return;
+               return 0;
 
        divider = DIV_ROUND_UP(get_PCLK(), mmc->clock);
        if (divider)
@@ -223,6 +223,8 @@ static void s3cmmc_set_ios(struct mmc *mmc)
 
        writel(divider, &sdi_regs->sdipre);
        mdelay(125);
+
+       return 0;
 }
 
 static int s3cmmc_init(struct mmc *mmc)