mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory
@ 2013-05-10  5:39 Alexander Shiyan
  2013-05-10  5:39 ` [PATCH 2/2] MCI: Sort Makefile entries Alexander Shiyan
  2013-05-12 10:38 ` [PATCH 1/2] ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2013-05-10  5:39 UTC (permalink / raw)
  To: barebox


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-omap/omap4_twl6030_mmc.c | 18 ++++++++++++++++--
 drivers/mci/Makefile                   |  1 -
 drivers/mci/twl6030.c                  | 29 -----------------------------
 include/mci/twl6030.h                  | 10 ----------
 4 files changed, 16 insertions(+), 42 deletions(-)
 delete mode 100644 drivers/mci/twl6030.c
 delete mode 100644 include/mci/twl6030.h

diff --git a/arch/arm/mach-omap/omap4_twl6030_mmc.c b/arch/arm/mach-omap/omap4_twl6030_mmc.c
index 7d71eb8..3d34a44 100644
--- a/arch/arm/mach-omap/omap4_twl6030_mmc.c
+++ b/arch/arm/mach-omap/omap4_twl6030_mmc.c
@@ -16,7 +16,7 @@
 #include <common.h>
 #include <io.h>
 
-#include <mci/twl6030.h>
+#include <mfd/twl6030.h>
 
 /* MMC voltage */
 #define OMAP4_CONTROL_PBIASLITE			0x4A100600
@@ -24,6 +24,16 @@
 #define OMAP4_MMC1_PBIASLITE_PWRDNZ		(1<<22)
 #define OMAP4_MMC1_PWRDNZ				(1<<26)
 
+static void twl6030_mci_write(u8 address, u8 data)
+{
+	int ret;
+	struct twl6030 *twl6030 = twl6030_get();
+
+	ret = twl6030_reg_write(twl6030, address, data);
+	if (ret != 0)
+		printf("TWL6030 Write[0x%x] Error %d\n", address, ret);
+}
+
 void set_up_mmc_voltage_omap4(void)
 {
 	u32 value;
@@ -32,7 +42,11 @@ void set_up_mmc_voltage_omap4(void)
 	value &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ | OMAP4_MMC1_PWRDNZ);
 	writel(value, OMAP4_CONTROL_PBIASLITE);
 
-	twl6030_mci_power_init();
+	twl6030_mci_write(TWL6030_PMCS_VMMC_CFG_VOLTAGE,
+			  TWL6030_VMMC_VSEL_0 | TWL6030_VMMC_VSEL_2 |
+			  TWL6030_VMMC_VSEL_4);
+	twl6030_mci_write(TWL6030_PMCS_VMMC_CFG_STATE,
+			  TWL6030_VMMC_STATE0 | TWL6030_VMMC_GRP_APP);
 
 	value = readl(OMAP4_CONTROL_PBIASLITE);
 	value |= (OMAP4_MMC1_PBIASLITE_VMODE | OMAP4_MMC1_PBIASLITE_PWRDNZ |
diff --git a/drivers/mci/Makefile b/drivers/mci/Makefile
index d46d5f5..0fc31af 100644
--- a/drivers/mci/Makefile
+++ b/drivers/mci/Makefile
@@ -4,7 +4,6 @@ obj-$(CONFIG_MCI_S3C) += s3c.o
 obj-$(CONFIG_MCI_IMX) += imx.o
 obj-$(CONFIG_MCI_IMX_ESDHC) += imx-esdhc.o
 obj-$(CONFIG_MCI_OMAP_HSMMC) += omap_hsmmc.o
-obj-$(CONFIG_MFD_TWL6030) += twl6030.o
 obj-$(CONFIG_MCI_PXA) += pxamci.o
 obj-$(CONFIG_MCI_ATMEL) += atmel_mci.o
 obj-$(CONFIG_MCI_SPI) += mci_spi.o
diff --git a/drivers/mci/twl6030.c b/drivers/mci/twl6030.c
deleted file mode 100644
index 4a875bd..0000000
--- a/drivers/mci/twl6030.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * MCI pmic power.
- */
-
-#include <mfd/twl6030.h>
-#include <mci/twl6030.h>
-#include <asm/io.h>
-
-static int twl6030_mci_write(u8 address, u8 data)
-{
-	int ret;
-	struct twl6030 *twl6030 = twl6030_get();
-
-	ret = twl6030_reg_write(twl6030, address, data);
-	if (ret != 0)
-		printf("TWL6030:MCI:Write[0x%x] Error %d\n", address, ret);
-
-	return ret;
-}
-
-void twl6030_mci_power_init(void)
-{
-	twl6030_mci_write(TWL6030_PMCS_VMMC_CFG_VOLTAGE,
-			TWL6030_VMMC_VSEL_0 | TWL6030_VMMC_VSEL_2 |
-			TWL6030_VMMC_VSEL_4);
-	twl6030_mci_write(TWL6030_PMCS_VMMC_CFG_STATE,
-			TWL6030_VMMC_STATE0 | TWL6030_VMMC_GRP_APP);
-}
-
diff --git a/include/mci/twl6030.h b/include/mci/twl6030.h
deleted file mode 100644
index 0ca828c..0000000
--- a/include/mci/twl6030.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * TWL6030 header file.
- */
-
-#ifndef __MCI_TWL6030_H__
-#define __MCI_TWL6030_H__
-
-void twl6030_mci_power_init(void);
-
-#endif
-- 
1.8.1.5


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-12 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10  5:39 [PATCH 1/2] ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory Alexander Shiyan
2013-05-10  5:39 ` [PATCH 2/2] MCI: Sort Makefile entries Alexander Shiyan
2013-05-12 10:38 ` [PATCH 1/2] ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox