Re: [PATCH 1/8] omap_hsmmc: move gpio and regulator control from board file

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

 



ext Tony Lindgren wrote:
* Adrian Hunter <adrian.hunter@xxxxxxxxx> [100113 03:38]:
From c2ed3074a73fc13d088c53193af546c01d1061b1 Mon Sep 17 00:00:00 2001
From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Date: Mon, 4 Jan 2010 13:44:36 +0200
Subject: [PATCH] omap_hsmmc: move gpio and regulator control from board file

This patch moves the setup code for GPIO's and Voltage
Regulators from the board file mmc-twl4030.c to the
driver omap_hsmmc.c.

Moving GPIO code to the driver makes the board initialisation
code independent of when GPIO's are defined.  That makes the
board initialisation now entirely independent of its original
twl4030 roots.

Moving Voltage Regulator code to the driver allows for further
development of regulator support in the core MMC code.  It also
permits the MMC core to be compiled as a module, because the
board code no longer calls MMC core functions.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---
 arch/arm/configs/rx51_defconfig       |    4 +-
 arch/arm/mach-omap2/control.c         |    2 +
 arch/arm/mach-omap2/mmc-twl4030.c     |  419 +--------------------------------
 arch/arm/mach-omap2/mmc-twl4030.h     |    4 +-
 arch/arm/plat-omap/include/plat/mmc.h |    2 +-
 drivers/mmc/host/omap_hsmmc.c         |  417 +++++++++++++++++++++++++++++++-
 6 files changed, 419 insertions(+), 429 deletions(-)

<snip>
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index cdd1f35..f3e31dc 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -162,6 +162,7 @@ u32 omap_ctrl_readl(u16 offset)
 {
 	return __raw_readl(OMAP_CTRL_REGADDR(offset));
 }
+EXPORT_SYMBOL(omap_ctrl_readl);
void omap_ctrl_writeb(u8 val, u16 offset)
 {
@@ -177,6 +178,7 @@ void omap_ctrl_writel(u32 val, u16 offset)
 {
 	__raw_writel(val, OMAP_CTRL_REGADDR(offset));
 }
+EXPORT_SYMBOL(omap_ctrl_writel);
#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
 /*

NAK, we don't want to export omap_ctrl_read/write. That will
lead into a horrible mess again of all the drivers tinkering
with the omap hardware registers directly.

OK


All code like that needs to stay under mach-omap2. This same
mmc controller could in theory be used on other hardware too,
not just omaps. The ctrl registers are omap specific, not
mmc controller specific.

Regards,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux