]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/mx6qarm2/mx6qarm2.c
snowball: Add support for ux500 based snowball board
[u-boot] / board / freescale / mx6qarm2 / mx6qarm2.c
index 98942454a0671846d3d69c58fab0bd5edd32ac9c..340c4c4393b20cf6b6a4305cc46f626caa6c392e 100644 (file)
@@ -24,9 +24,9 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6x_pins.h>
-#include <asm/arch/iomux-v3.h>
 #include <asm/errno.h>
 #include <asm/gpio.h>
+#include <asm/imx-common/iomux-v3.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <miiphy.h>
@@ -120,17 +120,18 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
        {USDHC4_BASE_ADDR, 1},
 };
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
 {
        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+       int ret;
 
        if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
                gpio_direction_input(171); /*GPIO6_11*/
-               *cd = gpio_get_value(171);
+               ret = !gpio_get_value(171);
        } else /* Don't have the CD GPIO pin on board */
-               *cd = 0;
+               ret = 1;
 
-       return 0;
+       return ret;
 }
 
 int board_mmc_init(bd_t *bis)