unsigned int clock; /* Current clock (MHz) */
};
-int s5p_mmc_init(int dev_index);
+int s5p_mmc_init(int dev_index, int bus_width);
#endif /* __ASSEMBLY__ */
#endif
unsigned int clock; /* Current clock (MHz) */
};
-int s5p_mmc_init(int dev_index);
+int s5p_mmc_init(int dev_index, int bus_width);
#endif /* __ASSEMBLY__ */
#endif
unsigned int clock; /* Current clock (MHz) */
};
-int s5p_mmc_init(int dev_index);
+int s5p_mmc_init(int dev_index, int bus_width);
#endif /* __ASSEMBLY__ */
#endif
gpio_set_drv(&s5pc110_gpio->gpio_g0, i, GPIO_DRV_4X);
}
- return s5p_mmc_init(0);
+ return s5p_mmc_init(0, 4);
}
#endif
int board_mmc_init(bd_t *bis)
{
int i;
+ int buswidth = 4;
if (s5p_no_mmc_support())
return -1;
/* GPG1[3:6] drv 4x */
gpio_set_drv(&gpio->gpio_g1, i, GPIO_DRV_4X);
}
+
+ buswidth = 8 /* 8-bit buswidth */
}
if (mach_is_geminus()) {
gpio_set_pull(&gpio->gpio_j2, 7, GPIO_PULL_NONE);
}
- return s5p_mmc_init(0);
+ return s5p_mmc_init(0, buswidth);
}
#endif
int board_mmc_init(bd_t *bis)
{
int i;
+ int buswidth = 4;
if (s5p_no_mmc_support())
return -1;
/* GPG1[3:6] drv 4x */
gpio_set_drv(&gpio->gpio_g1, i, GPIO_DRV_4X);
}
+
+ buswidth = 8 /* 8-bit buswidth */
}
if (mach_is_geminus()) {
gpio_set_pull(&gpio->gpio_j2, 7, GPIO_PULL_NONE);
}
- return s5p_mmc_init(0);
+ return s5p_mmc_init(0, buswidth);
}
#endif
gpio_set_drv(&gpio2->gpio_k1, i, GPIO_DRV_4X);
}
- return s5p_mmc_init(0);
+ return s5p_mmc_init(0, 8);
}
#endif
return 0;
}
-static int s5p_mmc_initialize(int dev_index)
+static int s5p_mmc_initialize(int dev_index, int bus_width)
{
struct mmc *mmc;
mmc->init = mmc_core_init;
mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
- mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS;
+
+ if (bus_width == 8)
+ mmc->host_caps = MMC_MODE_8BIT;
+ else
+ mmc->host_caps = MMC_MODE_4BIT;
+ mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
mmc->f_min = 400000;
mmc->f_max = 52000000;
return 0;
}
-int s5p_mmc_init(int dev_index)
+int s5p_mmc_init(int dev_index, int bus_width)
{
- return s5p_mmc_initialize(dev_index);
+ return s5p_mmc_initialize(dev_index, bus_width);
}