summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2016-05-24 19:28:02 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-31 08:23:45 +0200
commitfd5f9fc3ab78ea0d74d99791661ab87163b29126 (patch)
tree096e7f5be4cb6deaac93167706fde42d998d58a6
parent1b47607e89bb0364737cb5bc57d816138810edb5 (diff)
downloadbarebox-fd5f9fc3ab78ea0d74d99791661ab87163b29126.tar.gz
MCI: imx-esdhc: Allow to use 1-bit bus width in board files
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/freescale-mx53-smd/board.c2
-rw-r--r--arch/arm/boards/karo-tx53/board.c2
-rw-r--r--drivers/mci/imx-esdhc.c9
3 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/boards/freescale-mx53-smd/board.c b/arch/arm/boards/freescale-mx53-smd/board.c
index 354702d..5dbeeb1 100644
--- a/arch/arm/boards/freescale-mx53-smd/board.c
+++ b/arch/arm/boards/freescale-mx53-smd/board.c
@@ -25,6 +25,7 @@
#include <partition.h>
#include <linux/sizes.h>
#include <gpio.h>
+#include <mci.h>
#include <generated/mach-types.h>
@@ -115,6 +116,7 @@ static struct esdhc_platform_data loco_sd1_data = {
.wp_gpio = LOCO_SD1_WP,
.cd_type = ESDHC_CD_GPIO,
.wp_type = ESDHC_WP_GPIO,
+ .caps = MMC_CAP_4_BIT_DATA,
};
static struct esdhc_platform_data loco_sd3_data = {
diff --git a/arch/arm/boards/karo-tx53/board.c b/arch/arm/boards/karo-tx53/board.c
index 99aa9e7..51b534d 100644
--- a/arch/arm/boards/karo-tx53/board.c
+++ b/arch/arm/boards/karo-tx53/board.c
@@ -24,6 +24,7 @@
#include <partition.h>
#include <linux/sizes.h>
#include <gpio.h>
+#include <mci.h>
#include <generated/mach-types.h>
@@ -105,6 +106,7 @@ static struct esdhc_platform_data tx53_sd1_data = {
.cd_gpio = TX53_SD1_CD,
.cd_type = ESDHC_CD_GPIO,
.wp_type = ESDHC_WP_NONE,
+ .caps = MMC_CAP_4_BIT_DATA,
};
struct imx_nand_platform_data nand_info = {
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 2e189fe..66786ff 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -596,13 +596,10 @@ static int fsl_esdhc_probe(struct device_d *dev)
if (caps & ESDHC_HOSTCAPBLT_VS33)
mci->voltages |= MMC_VDD_32_33 | MMC_VDD_33_34;
- if (pdata && pdata->caps)
+ if (pdata) {
mci->host_caps = pdata->caps;
- else
- mci->host_caps = MMC_CAP_4_BIT_DATA;
-
- if (pdata && pdata->devname) {
- mci->devname = pdata->devname;
+ if (pdata->devname)
+ mci->devname = pdata->devname;
} else if (dev->device_node) {
const char *alias = of_alias_get(dev->device_node);
if (alias)