mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory
Date: Fri, 10 May 2013 09:39:08 +0400	[thread overview]
Message-ID: <1368164349-24479-1-git-send-email-shc_work@mail.ru> (raw)


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

             reply	other threads:[~2013-05-10  5:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10  5:39 Alexander Shiyan [this message]
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

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=1368164349-24479-1-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox