Skip to content
Snippets Groups Projects
Commit 516a863e authored by Otavio Salvador's avatar Otavio Salvador Committed by Stefano Babic
Browse files

cgtqmx6eval: Improve the error handling


Perfoming an OR operation on the error is not a good approach.

Return the error immediately for each ESDHC instance instead.

Signed-off-by: default avatarOtavio Salvador <otavio@ossystems.com.br>
parent 6b3496f7
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,7 @@ int board_mmc_getcd(struct mmc *mmc) ...@@ -98,6 +98,7 @@ int board_mmc_getcd(struct mmc *mmc)
int board_mmc_init(bd_t *bis) int board_mmc_init(bd_t *bis)
{ {
s32 status = 0; s32 status = 0;
int i;
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK); usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
...@@ -107,10 +108,13 @@ int board_mmc_init(bd_t *bis) ...@@ -107,10 +108,13 @@ int board_mmc_init(bd_t *bis)
imx_iomux_v3_setup_multiple_pads( imx_iomux_v3_setup_multiple_pads(
usdhc4_pads, ARRAY_SIZE(usdhc4_pads)); usdhc4_pads, ARRAY_SIZE(usdhc4_pads));
status = fsl_esdhc_initialize(bis, &usdhc_cfg[0]) | for (i = 0; i < ARRAY_SIZE(usdhc_cfg); i++) {
fsl_esdhc_initialize(bis, &usdhc_cfg[1]); status = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
if (status)
return status;
}
return status; return 0;
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment