-/*
- * SDHC
- */
-#ifdef CONFIG_FSL_ESDHC
-static struct fsl_esdhc_cfg usdhc_cfg[] = {
- { USDHC3_BASE_ADDR, 0, 4 }, /* Micro SD */
- { USDHC2_BASE_ADDR, 0, 4 }, /* Big SD */
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
- struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
-
- /* There is no CD for a microSD card, assume always present. */
- if (cfg->esdhc_base == USDHC3_BASE_ADDR)
- return 1;
- else
- return !gpio_get_value(NOVENA_SD_CD);
-}
-
-int board_mmc_getwp(struct mmc *mmc)
-{
- struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
-
- /* There is no WP for a microSD card, assume always read-write. */
- if (cfg->esdhc_base == USDHC3_BASE_ADDR)
- return 0;
- else
- return gpio_get_value(NOVENA_SD_WP);
-}
-
-
-int board_mmc_init(bd_t *bis)
-{
- s32 status = 0;
- int index;
-
- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
- usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-
- /* Big SD write-protect and card-detect */
- gpio_direction_input(NOVENA_SD_WP);
- gpio_direction_input(NOVENA_SD_CD);
-
- for (index = 0; index < ARRAY_SIZE(usdhc_cfg); index++) {
- status = fsl_esdhc_initialize(bis, &usdhc_cfg[index]);
- if (status)
- return status;
- }
-
- return status;
-}
-#endif
-