summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAbbas Raza <Abbas_Raza@mentor.com>2013-03-25 09:13:34 +0000
committerStefano Babic <sbabic@denx.de>2013-04-03 11:26:28 +0200
commitaad4659a2fde4b69e8124d6fe8b57bf28d3c747d (patch)
tree93aa84da33f8f22c00314063e133af6b9675e1e2 /board
parent2feae93ac0cba77cda1a4e0e4af8bd73135f5371 (diff)
downloadu-boot-imx-aad4659a2fde4b69e8124d6fe8b57bf28d3c747d.zip
u-boot-imx-aad4659a2fde4b69e8124d6fe8b57bf28d3c747d.tar.gz
u-boot-imx-aad4659a2fde4b69e8124d6fe8b57bf28d3c747d.tar.bz2
mmc: i.MX6: fsl_esdhc: Define maximum bus width supported by a board
Maximum bus width supported by some i.MX6 boards is not 8bit like others. In case where both host controller and card support 8bit transfers, they agree to communicate on 8bit interface while some boards support only 4bit interface. Due to this reason the mmc 8bit default mode fails on these boards. To rectify this, define maximum bus width supported by these boards (4bit). If max_bus_width is not defined, it is 0 by default and 8bit width support will be enabled in host capabilities otherwise host capabilities are modified accordingly. It is tested with a MMCplus card. Signed-off-by: Abbas Raza <Abbas_Raza@mentor.com> cc: stefano Babic <sbabic@denx.de> cc: Andy Fleming <afleming@gmail.com> Acked-by: Dirk Behme <dirk.behme@de.bosch.com> Acked-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Diffstat (limited to 'board')
-rw-r--r--board/boundary/nitrogen6x/nitrogen6x.c3
-rw-r--r--board/freescale/mx6qsabrelite/mx6qsabrelite.c3
-rw-r--r--board/wandboard/wandboard.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 229c237..e5b7795 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -304,6 +304,9 @@ int board_mmc_init(bd_t *bis)
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
+ usdhc_cfg[0].max_bus_width = 4;
+ usdhc_cfg[1].max_bus_width = 4;
+
for (index = 0; index < CONFIG_SYS_FSL_USDHC_NUM; ++index) {
switch (index) {
case 0:
diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
index 5b69a6d..0e25613 100644
--- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
+++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
@@ -274,6 +274,9 @@ int board_mmc_init(bd_t *bis)
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
+ usdhc_cfg[0].max_bus_width = 4;
+ usdhc_cfg[1].max_bus_width = 4;
+
for (index = 0; index < CONFIG_SYS_FSL_USDHC_NUM; ++index) {
switch (index) {
case 0:
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index d95189f..8d071e1 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -105,6 +105,8 @@ int board_mmc_init(bd_t *bis)
imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+ usdhc_cfg[0].max_bus_width = 4;
+
return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
}