* [U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0'
@ 2013-01-10 14:32 Fabio Estevam
2013-01-10 14:43 ` Benoît Thébaudeau
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2013-01-10 14:32 UTC (permalink / raw)
To: u-boot
By default, we boot from USDHC3 on mx6qsabresd, so let it be mmc dev 0.
Without this fix kernel cannot be retrieved from mmc with the default
environment.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx6qsabresd/mx6qsabresd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
index 65c4a1a..fbcb6cd 100644
--- a/board/freescale/mx6qsabresd/mx6qsabresd.c
+++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
@@ -134,8 +134,8 @@ static void setup_iomux_uart(void)
#ifdef CONFIG_FSL_ESDHC
struct fsl_esdhc_cfg usdhc_cfg[3] = {
- {USDHC2_BASE_ADDR},
{USDHC3_BASE_ADDR},
+ {USDHC2_BASE_ADDR},
{USDHC4_BASE_ADDR},
};
@@ -162,13 +162,13 @@ int board_mmc_init(bd_t *bis)
for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
switch (i) {
- case 0:
+ case 1:
imx_iomux_v3_setup_multiple_pads(
usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
gpio_direction_input(USDHC2_CD_GPIO);
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
break;
- case 1:
+ case 0:
imx_iomux_v3_setup_multiple_pads(
usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
gpio_direction_input(USDHC3_CD_GPIO);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0'
2013-01-10 14:32 [U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0' Fabio Estevam
@ 2013-01-10 14:43 ` Benoît Thébaudeau
2013-01-10 15:44 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Benoît Thébaudeau @ 2013-01-10 14:43 UTC (permalink / raw)
To: u-boot
Hi Fabio,
On Thursday, January 10, 2013 3:32:25 PM, Fabio Estevam wrote:
> By default, we boot from USDHC3 on mx6qsabresd, so let it be mmc dev
> 0.
>
> Without this fix kernel cannot be retrieved from mmc with the default
> environment.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx6qsabresd/mx6qsabresd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c
> b/board/freescale/mx6qsabresd/mx6qsabresd.c
> index 65c4a1a..fbcb6cd 100644
> --- a/board/freescale/mx6qsabresd/mx6qsabresd.c
> +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
> @@ -134,8 +134,8 @@ static void setup_iomux_uart(void)
>
> #ifdef CONFIG_FSL_ESDHC
> struct fsl_esdhc_cfg usdhc_cfg[3] = {
> - {USDHC2_BASE_ADDR},
> {USDHC3_BASE_ADDR},
> + {USDHC2_BASE_ADDR},
> {USDHC4_BASE_ADDR},
> };
>
> @@ -162,13 +162,13 @@ int board_mmc_init(bd_t *bis)
>
> for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
> switch (i) {
> - case 0:
> + case 1:
> imx_iomux_v3_setup_multiple_pads(
> usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
> gpio_direction_input(USDHC2_CD_GPIO);
> usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
^ should be changed to 1 or i
> break;
> - case 1:
> + case 0:
> imx_iomux_v3_setup_multiple_pads(
> usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
> gpio_direction_input(USDHC3_CD_GPIO);
Ditto (with 0 or i) for the following hidden lines.
Best regards,
Beno?t
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0'
2013-01-10 14:43 ` Benoît Thébaudeau
@ 2013-01-10 15:44 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-01-10 15:44 UTC (permalink / raw)
To: u-boot
Hi Beno?t,
On Thu, Jan 10, 2013 at 12:43 PM, Beno?t Th?baudeau
<benoit.thebaudeau@advansee.com> wrote:
>> switch (i) {
>> - case 0:
>> + case 1:
>> imx_iomux_v3_setup_multiple_pads(
>> usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
>> gpio_direction_input(USDHC2_CD_GPIO);
>> usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> ^ should be changed to 1 or i
Good catch, thanks.
I just found out a proper fix for this and will submit shortly.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-10 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 14:32 [U-Boot] [PATCH] mx6qsabresd: Fix mmc boot by making USDHC3 be 'dev 0' Fabio Estevam
2013-01-10 14:43 ` Benoît Thébaudeau
2013-01-10 15:44 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox