[U-Boot] [PATCH 6/6] i.mx: i.mx6q: Add the initial support for i.mx6q ARM2 board

Fabio Estevam festevam at gmail.com
Sat Nov 12 21:13:52 CET 2011


On Sat, Nov 12, 2011 at 8:36 AM, Jason Liu <jason.hui at linaro.org> wrote:
> +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*/

GPIO6_11 number is 5*32 + 11 = 171 , not 107.

Also, in order to use gpio_get_value you need to configure the pin as
GPIO first.

...
> +#define CONFIG_SYS_SDRAM_BASE          (PHYS_SDRAM)
> +#define CONFIG_SYS_INIT_RAM_ADDR       (IRAM_BASE_ADDR)
> +#define CONFIG_SYS_INIT_RAM_SIZE       (IRAM_SIZE)

Unneeded parentheses.

Regards,

Fabio Estevam


More information about the U-Boot mailing list