]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/mx53smd/mx53smd.c
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
[karo-tx-uboot.git] / board / freescale / mx53smd / mx53smd.c
index 21b5d14c02083aaaa9e21aeaf7c9b5f767db0693..7f35dddb8488d59a79ed87b5c43fcc663edc9d8c 100644 (file)
 #include <netdev.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
-#include <mxc_gpio.h>
+#include <asm/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-u32 get_board_rev(void)
-{
-       return get_cpu_rev();
-}
-
 int dram_init(void)
 {
        u32 size1, size2;
@@ -134,14 +129,14 @@ static void setup_iomux_fec(void)
 
 #ifdef CONFIG_FSL_ESDHC
 struct fsl_esdhc_cfg esdhc_cfg[1] = {
-       {MMC_SDHC1_BASE_ADDR, 1},
+       {MMC_SDHC1_BASE_ADDR},
 };
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
 {
-       *cd = mxc_gpio_get(77); /*GPIO3_13*/
-
-       return 0;
+       mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
+       gpio_direction_input(IMX_GPIO_NR(3, 13));
+       return !gpio_get_value(IMX_GPIO_NR(3, 13));
 }
 
 int board_mmc_init(bd_t *bis)
@@ -214,7 +209,6 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       gd->bd->bi_arch_number = MACH_TYPE_MX53_SMD;
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;