X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fembest%2Fmx6boards%2Fmx6boards.c;h=867459909df8fa0fda4ee943e8afb2cdeabeab2b;hb=2218b32d88f9b4b4484cea9a8b034ddab0be298b;hp=530ea4f3c48d6205916977856d5f7f95f1be77f6;hpb=015e215bbf70214d7c3bec2eca691edb6b73b28e;p=u-boot diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index 530ea4f3c4..867459909d 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -18,12 +18,13 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -215,12 +216,12 @@ int board_mmc_getcd(struct mmc *mmc) int board_mmc_init(bd_t *bis) { - s32 status = 0; + int ret; int i; /* * According to the board_mmc_init() the following map is done: - * (U-boot device node) (Physical Port) + * (U-Boot device node) (Physical Port) * ** RiOTboard : * mmc0 SDCard slot (bottom) * mmc1 uSDCard slot (top) @@ -267,13 +268,15 @@ int board_mmc_init(bd_t *bis) printf("Warning: you configured more USDHC controllers" "(%d) then supported by the board (%d)\n", i + 1, CONFIG_SYS_FSL_USDHC_NUM); - return status; + return -EINVAL; } - status |= fsl_esdhc_initialize(bis, &usdhc_cfg[i]); + ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]); + if (ret) + return ret; } - return status; + return 0; } #endif @@ -285,6 +288,11 @@ iomux_v3_cfg_t const ecspi1_pads[] = { MX6_PAD_EIM_EB2__GPIO2_IO30 | MUX_PAD_CTRL(NO_PAD_CTRL), }; +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(2, 30)) : -1; +} + static void setup_spi(void) { imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));