From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] mx6sabresd: Remove U-Boot proper mmc initialization
Date: Tue, 21 May 2019 10:37:54 -0300 [thread overview]
Message-ID: <20190521133754.29553-3-festevam@gmail.com> (raw)
In-Reply-To: <20190521133754.29553-1-festevam@gmail.com>
After the conversion to DM there is no need to have mmc initialization
code inside U-Boot proper.
Remove the unneeded code.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- None
board/freescale/mx6sabresd/mx6sabresd.c | 44 -------------------------
1 file changed, 44 deletions(-)
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 385a18e923..cdfc5ff77f 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -287,49 +287,6 @@ int board_mmc_getcd(struct mmc *mmc)
int board_mmc_init(bd_t *bis)
{
-#ifndef CONFIG_SPL_BUILD
- int ret;
- int i;
-
- /*
- * According to the board_mmc_init() the following map is done:
- * (U-Boot device node) (Physical Port)
- * mmc0 SD2
- * mmc1 SD3
- * mmc2 eMMC
- */
- for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
- switch (i) {
- case 0:
- SETUP_IOMUX_PADS(usdhc2_pads);
- gpio_request(USDHC2_CD_GPIO, "USDHC2 CD");
- gpio_direction_input(USDHC2_CD_GPIO);
- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
- break;
- case 1:
- SETUP_IOMUX_PADS(usdhc3_pads);
- gpio_request(USDHC3_CD_GPIO, "USDHC3 CD");
- gpio_direction_input(USDHC3_CD_GPIO);
- usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
- break;
- case 2:
- SETUP_IOMUX_PADS(usdhc4_pads);
- usdhc_cfg[2].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
- break;
- default:
- printf("Warning: you configured more USDHC controllers"
- "(%d) then supported by the board (%d)\n",
- i + 1, CONFIG_SYS_FSL_USDHC_NUM);
- return -EINVAL;
- }
-
- ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
- if (ret)
- return ret;
- }
-
- return 0;
-#else
struct src *psrc = (struct src *)SRC_BASE_ADDR;
unsigned reg = readl(&psrc->sbmr1) >> 11;
/*
@@ -363,7 +320,6 @@ int board_mmc_init(bd_t *bis)
}
return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-#endif
}
#endif
--
2.17.1
next prev parent reply other threads:[~2019-05-21 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 13:37 [U-Boot] [PATCH v2 1/3] mx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size Fabio Estevam
2019-05-21 13:37 ` [U-Boot] [PATCH v2 2/3] mx6sabresd: Select pinctrl driver Fabio Estevam
2019-06-10 9:49 ` sbabic at denx.de
2019-05-21 13:37 ` Fabio Estevam [this message]
2019-06-10 9:40 ` [U-Boot] [PATCH v2 3/3] mx6sabresd: Remove U-Boot proper mmc sbabic at denx.de
2019-05-24 21:31 ` [U-Boot] [PATCH v2 1/3] mx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size Ezequiel Garcia
2019-05-24 21:41 ` Fabio Estevam
2019-05-24 22:36 ` Ezequiel Garcia
2019-06-10 9:39 ` [U-Boot] [PATCH v2 1/3] mx6sabresd: Remove CONFIG_SPL_DM to sbabic at denx.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190521133754.29553-3-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.