[PATCH 08/12] mci: sdhci: arasan: Use sdhci_set_bus_width()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use common code rather than duplicating it in the driver.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mci/arasan-sdhci.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
index acc2827f1d..7bd98c0a96 100644
--- a/drivers/mci/arasan-sdhci.c
+++ b/drivers/mci/arasan-sdhci.c
@@ -199,17 +199,9 @@ static void arasan_sdhci_set_ios(struct mci_host *mci, struct mci_ios *ios)
 				    val | SDHCI_SDCLOCK_EN);
 	}
 
-	val = sdhci_read8(&host->sdhci, SDHCI_HOST_CONTROL) &
-			~(SDHCI_CTRL_8BITBUS | SDHCI_CTRL_8BITBUS);
-
-	switch (ios->bus_width) {
-	case MMC_BUS_WIDTH_8:
-		val |= SDHCI_CTRL_8BITBUS;
-		break;
-	case MMC_BUS_WIDTH_4:
-		val |= SDHCI_CTRL_8BITBUS;
-		break;
-	}
+	sdhci_set_bus_width(&host->sdhci, ios->bus_width);
+
+	val = sdhci_read8(&host->sdhci, SDHCI_HOST_CONTROL);
 
 	if (ios->clock > 26000000)
 		val |= SDHCI_CTRL_HISPD;
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux