On Mon, Nov 14, 2011 at 5:25 PM, Stefano Babic <sba...@denx.de> wrote: > On 11/12/2011 11:36 AM, Jason Liu wrote: >> Add the initial support for Freescale i.MX6Q Armadillo2 board >> Support: MMC boot from slot 0/1, debug UART(UART4), usdhc. >> >> Signed-off-by: Jason Liu <jason....@linaro.org> > > Hi Jason, > > is mx6qarm2 the official Freescale name ?
Yes, this is the official name. > >> +#ifdef CONFIG_FSL_ESDHC >> +struct fsl_esdhc_cfg usdhc_cfg[2] = { >> + {USDHC3_BASE_ADDR, 1}, >> + {USDHC4_BASE_ADDR, 1}, >> +}; >> + >> +int board_mmc_getcd(u8 *cd, struct mmc *mmc) >> +{ >> + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; >> + >> + if (cfg->esdhc_base == USDHC3_BASE_ADDR) >> + *cd = gpio_get_value(107); /*GPIO6_11*/ >> + else /* Don't have the CD GPIO pin on board */ >> + *cd = 0; > > Is it the logic inverted ? If you return always zero, there is no Card > in the slot for the MMC framework and there is no attempt to read it. It > is working on USDHC4 ? The framework flow is as the following. The logic is ok. /* Check if there is a callback for detecting the card */ if (board_mmc_getcd(&card_absent, mmc)) { timeout = 1000; while (!(esdhc_read32(®s->prsstat) & PRSSTAT_CINS) && --timeout) udelay(1000); if (timeout <= 0) ret = NO_CARD_ERR; } else { if (card_absent) ret = NO_CARD_ERR; } > >> +int board_early_init_f(void) >> +{ >> + imx_iomux_v3_init((void *)IOMUXC_BASE_ADDR); >> + setup_iomux_uart(); >> + >> + return 0; >> +} >> + >> +int board_init(void) >> +{ >> + /* board id for linux */ >> + gd->bd->bi_arch_number = MACH_TYPE_MX61_ARD; > > You should only set CONFIG_MACH_TYPE mx6qarm2.h and drop this line. The > set is done in common code. As the comments before for Fabio, I will drop the MACH_TYPE setting since i.mx6q linux kernel will go device tree and there is no-need for machine type now. > >> + /* address of boot parameters */ >> + gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; >> + >> + /* >> + * Need re-initialization again since base is in BSS >> + * After relocation, base will be clear to zero. >> + */ >> + imx_iomux_v3_init((void *)IOMUXC_BASE_ADDR); > > However, this is a trick. As general rule, we must not use BSS before > relocation. Is there no other way to do this ? There is no other way for it since we need uart early before the relocation. If you have other way, I really appreciate it. > >> + >> +#undef CONFIG_CMD_IMLS >> +#undef CONFIG_CMD_NET >> +#undef CONFIG_CMD_NFS >> + >> +#define CONFIG_BOOTDELAY 3 >> + >> +#define CONFIG_PRIME "FEC0" > > Ethernet is not yet working, right ? How many Ethernet has this board ? yes,I will remove the last line. Only the 1Gbit ENET support on this board. Jason Liu > > Best regards, > Stefano Babic > > -- > ===================================================================== > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de > ===================================================================== > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot