]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/mx6qarm2/mx6qarm2.c
Merge branch 'master' of git://git.denx.de/u-boot-usb
[karo-tx-uboot.git] / board / freescale / mx6qarm2 / mx6qarm2.c
index e0634078407892c300a6346c03e47cadcda9e3da..3a5b26dde747a318e648816d4b6b183541700e5b 100644 (file)
@@ -32,7 +32,12 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-       gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+#if defined(CONFIG_MX6DL) && !defined(CONFIG_MX6DL_LPDDR2) && \
+       defined(CONFIG_DDR_32BIT)
+       gd->ram_size = ((phys_size_t)CONFIG_DDR_MB * 1024 * 1024) / 2;
+#else
+       gd->ram_size = (phys_size_t)CONFIG_DDR_MB * 1024 * 1024;
+#endif
 
        return 0;
 }
@@ -120,7 +125,7 @@ int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
-       s32 status = 0;
+       int ret;
        u32 index = 0;
 
        usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
@@ -140,13 +145,15 @@ int board_mmc_init(bd_t *bis)
                        printf("Warning: you configured more USDHC controllers"
                                "(%d) then supported by the board (%d)\n",
                                index + 1, CONFIG_SYS_FSL_USDHC_NUM);
-                       return status;
+                       return -EINVAL;
                }
 
-               status |= fsl_esdhc_initialize(bis, &usdhc_cfg[index]);
+               ret = fsl_esdhc_initialize(bis, &usdhc_cfg[index]);
+               if (ret)
+                       return ret;
        }
 
-       return status;
+       return 0;
 }
 #endif
 
@@ -186,13 +193,10 @@ int fecmxc_mii_postcall(int phy)
 int board_eth_init(bd_t *bis)
 {
        struct eth_device *dev;
-       int ret;
+       int ret = cpu_eth_init(bis);
 
-       ret = cpu_eth_init(bis);
-       if (ret) {
-               printf("FEC MXC: %s:failed\n", __func__);
+       if (ret)
                return ret;
-       }
 
        dev = eth_get_dev_by_name("FEC");
        if (!dev) {
@@ -227,7 +231,11 @@ int board_init(void)
 
 int checkboard(void)
 {
+#ifdef CONFIG_MX6DL
+       puts("Board: MX6DL-Armadillo2\n");
+#else
        puts("Board: MX6Q-Armadillo2\n");
+#endif
 
        return 0;
 }