public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation
@ 2011-02-24 19:26 Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 1/6] OMAP2430: hwmod data: Add HSMMC Kishore Kadiyala
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Kishore Kadiyala

Adding hwmod data for hsmmc device on OMAP2430/OMAP3/OMAP4.
Adapting the omap_hsmmc driver to hwmod framework.

The patch series is based on omap-for-linus and tested on 
OMAP2430, OMAP3430SDP & OMAP4430SDP.
Also boot tested on OMAP2420SDP.

V4:
---
Omap2420 platform consists of mmc block as in omap1 and not the
hsmmc block as present in omap2430, omap3, omap4 platforms. 
The series takes care of hwmod adaptation of hsmmc drivers and 
thus excluding the omap2420 platforms.

Also includes renaming of device & driver name.

The patch series has dependency on :
 1)https://patchwork.kernel.org/patch/585281/ 
 2)https://patchwork.kernel.org/patch/538301/

V3:
--
http://www.spinics.net/lists/linux-omap/msg46783.html

V2:
---
http://www.spinics.net/lists/linux-omap/msg45443.html

V1:
---
http://www.spinics.net/lists/linux-mmc/msg05689.html


Anand Gadiyar (1):
  OMAP4: hwmod data: enable HSMMC

Kishore Kadiyala (2):
  OMAP: hwmod data: Add dev_attr and use in the host driver
  OMAP: adapt hsmmc to hwmod framework
  OMAP: hsmmc: Rename the device and driver

Paul Walmsley (2):
  OMAP2430: hwmod data: Add HSMMC
  OMAP3: hwmod data: Add HSMMC

 arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
 arch/arm/mach-omap2/board-3430sdp.c          |    6 +-
 arch/arm/mach-omap2/board-4430sdp.c          |    4 +-
 arch/arm/mach-omap2/board-devkit8000.c       |    2 +-
 arch/arm/mach-omap2/board-igep0020.c         |    6 +-
 arch/arm/mach-omap2/board-igep0030.c         |    6 +-
 arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
 arch/arm/mach-omap2/board-omap3pandora.c     |    6 +-
 arch/arm/mach-omap2/board-omap4panda.c       |    4 +-
 arch/arm/mach-omap2/board-rm680.c            |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    8 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c |    2 +-
 arch/arm/mach-omap2/clock2430_data.c         |   12 +-
 arch/arm/mach-omap2/clock3xxx_data.c         |   12 +-
 arch/arm/mach-omap2/clock44xx_data.c         |   20 +-
 arch/arm/mach-omap2/devices.c                |  251 ----------------
 arch/arm/mach-omap2/hsmmc.c                  |  417 +++++++++++++++++---------
 arch/arm/mach-omap2/omap_hwmod_2430_data.c   |  152 ++++++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c   |  215 +++++++++++++
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c   |   16 +-
 arch/arm/mach-omap2/prcm-common.h            |    4 +
 arch/arm/plat-omap/include/plat/mmc.h        |   29 +--
 drivers/mmc/host/omap_hsmmc.c                |    6 +-
 23 files changed, 713 insertions(+), 471 deletions(-)


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

* [PATCH v4 1/6] OMAP2430: hwmod data: Add HSMMC
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 2/6] OMAP3: " Kishore Kadiyala
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Kishore Kadiyala

From: Paul Walmsley <paul@pwsan.com>

Update the omap2430 hwmod data with the HSMMC info.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |  146 ++++++++++++++++++++++++++++
 1 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index de0015d..9c99083 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -54,6 +54,8 @@ static struct omap_hwmod omap2430_dma_system_hwmod;
 static struct omap_hwmod omap2430_mcspi1_hwmod;
 static struct omap_hwmod omap2430_mcspi2_hwmod;
 static struct omap_hwmod omap2430_mcspi3_hwmod;
+static struct omap_hwmod omap2430_mmc1_hwmod;
+static struct omap_hwmod omap2430_mmc2_hwmod;
 
 /* L3 -> L4_CORE interface */
 static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
@@ -250,6 +252,42 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
 	&omap2430_l4_core__usbhsotg,
 };
 
+/* L4 CORE -> MMC1 interface */
+static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
+	{
+		.pa_start	= 0x4809c000,
+		.pa_end		= 0x4809c1ff,
+		.flags		= ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
+	.master		= &omap2430_l4_core_hwmod,
+	.slave		= &omap2430_mmc1_hwmod,
+	.clk		= "mmchs1_ick",
+	.addr		= omap2430_mmc1_addr_space,
+	.addr_cnt	= ARRAY_SIZE(omap2430_mmc1_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* L4 CORE -> MMC2 interface */
+static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
+	{
+		.pa_start	= 0x480b4000,
+		.pa_end		= 0x480b41ff,
+		.flags		= ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
+	.master		= &omap2430_l4_core_hwmod,
+	.slave		= &omap2430_mmc2_hwmod,
+	.addr		= omap2430_mmc2_addr_space,
+	.clk		= "mmchs2_ick",
+	.addr_cnt	= ARRAY_SIZE(omap2430_mmc2_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* Slave interfaces on the L4_CORE interconnect */
 static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
 	&omap2430_l3_main__l4_core,
@@ -258,6 +296,8 @@ static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
 /* Master interfaces on the L4_CORE interconnect */
 static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
 	&omap2430_l4_core__l4_wkup,
+	&omap2430_l4_core__mmc1,
+	&omap2430_l4_core__mmc2,
 };
 
 /* L4 CORE */
@@ -1508,6 +1548,110 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
 
 
 
+/* MMC/SD/SDIO common */
+
+static struct omap_hwmod_class_sysconfig mmc_sysc = {
+	.rev_offs	= 0x1fc,
+	.sysc_offs	= 0x10,
+	.syss_offs	= 0x14,
+	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+	.sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class mmc_class = {
+	.name = "mmc",
+	.sysc = &mmc_sysc,
+};
+
+/* MMC/SD/SDIO1 */
+
+static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
+	{ .irq = 83 },
+};
+
+static struct omap_hwmod_dma_info mmc1_sdma_reqs[] = {
+	{ .name = "tx",	.dma_req = 61 }, /* DMA_MMC1_TX */
+	{ .name = "rx",	.dma_req = 62 }, /* DMA_MMC1_RX */
+};
+
+static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
+	{ .role = "dbck", .clk = "mmchsdb_fck" },
+};
+
+static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = {
+	&omap2430_l4_core__mmc1,
+};
+
+static struct omap_hwmod omap2430_mmc1_hwmod = {
+	.name		= "mmc1",
+	.mpu_irqs	= mmc1_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(mmc1_mpu_irqs),
+	.sdma_reqs	= mmc1_sdma_reqs,
+	.sdma_reqs_cnt	= ARRAY_SIZE(mmc1_sdma_reqs),
+	.opt_clks	= mmc1_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(mmc1_opt_clks),
+	.main_clk	= "mmchs1_fck",
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 2,
+			.module_bit  = OMAP2430_EN_MMCHS1_SHIFT,
+			.idlest_reg_id = 2,
+			.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
+		},
+	},
+	.slaves		= omap2430_mmc1_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap2430_mmc1_slaves),
+	.class		= &mmc_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
+};
+
+/* MMC/SD/SDIO2 */
+
+static struct omap_hwmod_irq_info mmc2_mpu_irqs[] = {
+	{ .irq = 86 },
+};
+
+static struct omap_hwmod_dma_info mmc2_sdma_reqs[] = {
+	{ .name = "tx",	.dma_req = 47 }, /* DMA_MMC2_TX */
+	{ .name = "rx",	.dma_req = 48 }, /* DMA_MMC2_RX */
+};
+
+static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
+	{ .role = "dbck", .clk = "mmchsdb_fck" },
+};
+
+static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = {
+	&omap2430_l4_core__mmc2,
+};
+
+static struct omap_hwmod omap2430_mmc2_hwmod = {
+	.name		= "mmc2",
+	.mpu_irqs	= mmc2_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(mmc2_mpu_irqs),
+	.sdma_reqs	= mmc2_sdma_reqs,
+	.sdma_reqs_cnt	= ARRAY_SIZE(mmc2_sdma_reqs),
+	.opt_clks	= mmc2_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(mmc2_opt_clks),
+	.main_clk	= "mmchs2_fck",
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 2,
+			.module_bit  = OMAP2430_EN_MMCHS2_SHIFT,
+			.idlest_reg_id = 2,
+			.idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
+		},
+	},
+	.slaves		= omap2430_mmc2_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap2430_mmc2_slaves),
+	.class		= &mmc_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
+};
+
 static __initdata struct omap_hwmod *omap2430_hwmods[] = {
 	&omap2430_l3_main_hwmod,
 	&omap2430_l4_core_hwmod,
@@ -1526,6 +1670,8 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = {
 	/* i2c class */
 	&omap2430_i2c1_hwmod,
 	&omap2430_i2c2_hwmod,
+	&omap2430_mmc1_hwmod,
+	&omap2430_mmc2_hwmod,
 
 	/* gpio class */
 	&omap2430_gpio1_hwmod,
-- 
1.7.1


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

* [PATCH v4 2/6] OMAP3: hwmod data: Add HSMMC
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 1/6] OMAP2430: hwmod data: Add HSMMC Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 3/6] OMAP4: hwmod data: enable HSMMC Kishore Kadiyala
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Rajendra Nayak,
	Kishore Kadiyala

From: Paul Walmsley <paul@pwsan.com>

Update the omap3 hwmod data with the HSMMC info.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |  209 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/prcm-common.h          |    4 +
 2 files changed, 213 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index e9d0012..d4e734e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -68,6 +68,9 @@ static struct omap_hwmod omap34xx_mcspi1;
 static struct omap_hwmod omap34xx_mcspi2;
 static struct omap_hwmod omap34xx_mcspi3;
 static struct omap_hwmod omap34xx_mcspi4;
+static struct omap_hwmod omap3xxx_mmc1_hwmod;
+static struct omap_hwmod omap3xxx_mmc2_hwmod;
+static struct omap_hwmod omap3xxx_mmc3_hwmod;
 static struct omap_hwmod am35xx_usbhsotg_hwmod;
 
 static struct omap_hwmod omap3xxx_dma_system_hwmod;
@@ -158,6 +161,63 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* L4 CORE -> MMC1 interface */
+static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
+	{
+		.pa_start	= 0x4809c000,
+		.pa_end		= 0x4809c1ff,
+		.flags		= ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &omap3xxx_mmc1_hwmod,
+	.clk		= "mmchs1_ick",
+	.addr		= omap3xxx_mmc1_addr_space,
+	.addr_cnt	= ARRAY_SIZE(omap3xxx_mmc1_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+	.flags		= OMAP_FIREWALL_L4
+};
+
+/* L4 CORE -> MMC2 interface */
+static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
+	{
+		.pa_start	= 0x480b4000,
+		.pa_end		= 0x480b41ff,
+		.flags		= ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &omap3xxx_mmc2_hwmod,
+	.clk		= "mmchs2_ick",
+	.addr		= omap3xxx_mmc2_addr_space,
+	.addr_cnt	= ARRAY_SIZE(omap3xxx_mmc2_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+	.flags		= OMAP_FIREWALL_L4
+};
+
+/* L4 CORE -> MMC3 interface */
+static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
+	{
+		.pa_start	= 0x480ad000,
+		.pa_end		= 0x480ad1ff,
+		.flags		= ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &omap3xxx_mmc3_hwmod,
+	.clk		= "mmchs3_ick",
+	.addr		= omap3xxx_mmc3_addr_space,
+	.addr_cnt	= ARRAY_SIZE(omap3xxx_mmc3_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+	.flags		= OMAP_FIREWALL_L4
+};
+
 /* L4 CORE -> UART1 interface */
 static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
 	{
@@ -2212,11 +2272,160 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = {
 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
 };
 
+/* MMC/SD/SDIO common */
+
+static struct omap_hwmod_class_sysconfig mmc_sysc = {
+	.rev_offs	= 0x1fc,
+	.sysc_offs	= 0x10,
+	.syss_offs	= 0x14,
+	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
+			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+	.sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class mmc_class = {
+	.name = "mmc",
+	.sysc = &mmc_sysc,
+};
+
+/* MMC/SD/SDIO1 */
+
+static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
+	{ .irq = 83, },
+};
+
+static struct omap_hwmod_dma_info mmc1_sdma_reqs[] = {
+	{ .name = "tx",	.dma_req = 61, },
+	{ .name = "rx",	.dma_req = 62, },
+};
+
+static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
+	{ .role = "dbck", .clk = "omap_32k_fck", },
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
+	&omap3xxx_l4_core__mmc1,
+};
+
+static struct omap_hwmod omap3xxx_mmc1_hwmod = {
+	.name		= "mmc1",
+	.mpu_irqs	= mmc1_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(mmc1_mpu_irqs),
+	.sdma_reqs	= mmc1_sdma_reqs,
+	.sdma_reqs_cnt	= ARRAY_SIZE(mmc1_sdma_reqs),
+	.opt_clks	= mmc1_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(mmc1_opt_clks),
+	.main_clk	= "mmchs1_fck",
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_MMC1_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
+		},
+	},
+	.slaves		= omap3xxx_mmc1_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap3xxx_mmc1_slaves),
+	.class		= &mmc_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+/* MMC/SD/SDIO2 */
+
+static struct omap_hwmod_irq_info mmc2_mpu_irqs[] = {
+	{ .irq = INT_24XX_MMC2_IRQ, },
+};
+
+static struct omap_hwmod_dma_info mmc2_sdma_reqs[] = {
+	{ .name = "tx",	.dma_req = 47, },
+	{ .name = "rx",	.dma_req = 48, },
+};
+
+static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
+	{ .role = "dbck", .clk = "omap_32k_fck", },
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
+	&omap3xxx_l4_core__mmc2,
+};
+
+static struct omap_hwmod omap3xxx_mmc2_hwmod = {
+	.name		= "mmc2",
+	.mpu_irqs	= mmc2_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(mmc2_mpu_irqs),
+	.sdma_reqs	= mmc2_sdma_reqs,
+	.sdma_reqs_cnt	= ARRAY_SIZE(mmc2_sdma_reqs),
+	.opt_clks	= mmc2_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(mmc2_opt_clks),
+	.main_clk	= "mmchs2_fck",
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_MMC2_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
+		},
+	},
+	.slaves		= omap3xxx_mmc2_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap3xxx_mmc2_slaves),
+	.class		= &mmc_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
+/* MMC/SD/SDIO3 */
+
+static struct omap_hwmod_irq_info mmc3_mpu_irqs[] = {
+	{ .irq = 94, },
+};
+
+static struct omap_hwmod_dma_info mmc3_sdma_reqs[] = {
+	{ .name = "tx",	.dma_req = 77, },
+	{ .name = "rx",	.dma_req = 78, },
+};
+
+static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
+	{ .role = "dbck", .clk = "omap_32k_fck", },
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
+	&omap3xxx_l4_core__mmc3,
+};
+
+static struct omap_hwmod omap3xxx_mmc3_hwmod = {
+	.name		= "mmc3",
+	.mpu_irqs	= mmc3_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(mmc3_mpu_irqs),
+	.sdma_reqs	= mmc3_sdma_reqs,
+	.sdma_reqs_cnt	= ARRAY_SIZE(mmc3_sdma_reqs),
+	.opt_clks	= mmc3_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(mmc3_opt_clks),
+	.main_clk	= "mmchs3_fck",
+	.prcm		= {
+		.omap2 = {
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_MMC3_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
+		},
+	},
+	.slaves		= omap3xxx_mmc3_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap3xxx_mmc3_slaves),
+	.class		= &mmc_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
+};
+
 static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
 	&omap3xxx_l3_main_hwmod,
 	&omap3xxx_l4_core_hwmod,
 	&omap3xxx_l4_per_hwmod,
 	&omap3xxx_l4_wkup_hwmod,
+	&omap3xxx_mmc1_hwmod,
+	&omap3xxx_mmc2_hwmod,
+	&omap3xxx_mmc3_hwmod,
 	&omap3xxx_mpu_hwmod,
 	&omap3xxx_iva_hwmod,
 	&omap3xxx_wd_timer2_hwmod,
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 87486f5..098e659 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -191,6 +191,8 @@
 #define OMAP3430_AUTOIDLE_MASK				(1 << 0)
 
 /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
+#define OMAP3430_EN_MMC3_MASK				(1 << 30)
+#define OMAP3430_EN_MMC3_SHIFT				30
 #define OMAP3430_EN_MMC2_MASK				(1 << 25)
 #define OMAP3430_EN_MMC2_SHIFT				25
 #define OMAP3430_EN_MMC1_MASK				(1 << 24)
@@ -231,6 +233,8 @@
 #define OMAP3430_EN_HSOTGUSB_SHIFT			4
 
 /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */
+#define OMAP3430_ST_MMC3_SHIFT				30
+#define OMAP3430_ST_MMC3_MASK				(1 << 30)
 #define OMAP3430_ST_MMC2_SHIFT				25
 #define OMAP3430_ST_MMC2_MASK				(1 << 25)
 #define OMAP3430_ST_MMC1_SHIFT				24
-- 
1.7.1


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

* [PATCH v4 3/6] OMAP4: hwmod data: enable HSMMC
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 1/6] OMAP2430: hwmod data: Add HSMMC Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 2/6] OMAP3: " Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-24 19:26 ` [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver Kishore Kadiyala
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Anand Gadiyar,
	Kishore Kadiyala

From: Anand Gadiyar <gadiyar@ti.com>

Enabling hsmmc hwmod for OMAP4

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Acked-by: Benoit Cousson<b-cousson@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 79a8601..dd39e75 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -5077,11 +5077,11 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
 	&omap44xx_mcspi4_hwmod,
 
 	/* mmc class */
-/*	&omap44xx_mmc1_hwmod, */
-/*	&omap44xx_mmc2_hwmod, */
-/*	&omap44xx_mmc3_hwmod, */
-/*	&omap44xx_mmc4_hwmod, */
-/*	&omap44xx_mmc5_hwmod, */
+	&omap44xx_mmc1_hwmod,
+	&omap44xx_mmc2_hwmod,
+	&omap44xx_mmc3_hwmod,
+	&omap44xx_mmc4_hwmod,
+	&omap44xx_mmc5_hwmod,
 
 	/* mpu class */
 	&omap44xx_mpu_hwmod,
-- 
1.7.1


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

* [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
                   ` (2 preceding siblings ...)
  2011-02-24 19:26 ` [PATCH v4 3/6] OMAP4: hwmod data: enable HSMMC Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-25 13:15   ` Cousson, Benoit
  2011-02-24 19:26 ` [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework Kishore Kadiyala
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Kishore Kadiyala

Add a device attribute to hwmod data of omap2430, omap3, omap4.
Currently the device attribute holds information regarding dual volt MMC card
support by the controller which will be later passed to the host driver via
platform data.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |    6 ++++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    6 ++++++
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    6 ++++++
 arch/arm/plat-omap/include/plat/mmc.h      |    9 +++++++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 9c99083..cbb7c9d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -19,6 +19,7 @@
 #include <plat/i2c.h>
 #include <plat/gpio.h>
 #include <plat/mcspi.h>
+#include <plat/mmc.h>
 #include <plat/l3_2xxx.h>
 
 #include "omap_hwmod_common_data.h"
@@ -1568,6 +1569,10 @@ static struct omap_hwmod_class mmc_class = {
 
 /* MMC/SD/SDIO1 */
 
+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
 static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
 	{ .irq = 83 },
 };
@@ -1603,6 +1608,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
 			.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
 		},
 	},
+	.dev_attr	= &mmc1_dev_attr,
 	.slaves		= omap2430_mmc1_slaves,
 	.slaves_cnt	= ARRAY_SIZE(omap2430_mmc1_slaves),
 	.class		= &mmc_class,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index d4e734e..7fa2dfb 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -22,6 +22,7 @@
 #include <plat/l4_3xxx.h>
 #include <plat/i2c.h>
 #include <plat/gpio.h>
+#include <plat/mmc.h>
 #include <plat/smartreflex.h>
 #include <plat/mcspi.h>
 
@@ -2292,6 +2293,10 @@ static struct omap_hwmod_class mmc_class = {
 
 /* MMC/SD/SDIO1 */
 
+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
 static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
 	{ .irq = 83, },
 };
@@ -2327,6 +2332,7 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = {
 			.idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
 		},
 	},
+	.dev_attr	= &mmc1_dev_attr,
 	.slaves		= omap3xxx_mmc1_slaves,
 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_mmc1_slaves),
 	.class		= &mmc_class,
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index dd39e75..28031e3 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -25,6 +25,7 @@
 #include <plat/gpio.h>
 #include <plat/dma.h>
 #include <plat/mcspi.h>
+#include <plat/mmc.h>
 
 #include "omap_hwmod_common_data.h"
 
@@ -3383,6 +3384,10 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
 };
 
 /* mmc1 */
+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
 static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
 	{ .irq = 83 + OMAP44XX_IRQ_GIC_START },
 };
@@ -3433,6 +3438,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
 			.clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
 		},
 	},
+	.dev_attr	= &mmc1_dev_attr,
 	.slaves		= omap44xx_mmc1_slaves,
 	.slaves_cnt	= ARRAY_SIZE(omap44xx_mmc1_slaves),
 	.masters	= omap44xx_mmc1_masters,
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index e5de5d4..a7afab0 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -43,6 +43,12 @@
 
 #define OMAP_MMC_MAX_SLOTS	2
 
+#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT	BIT(1)
+
+struct omap_mmc_dev_attr {
+	u8 flags;
+};
+
 struct omap_mmc_platform_data {
 	/* back-link to device */
 	struct device *dev;
@@ -71,6 +77,9 @@ struct omap_mmc_platform_data {
 
 	u64 dma_mask;
 
+	/* Integrating attributes from the omap_hwmod layer */
+	u8 controller_flags;
+
 	/* Register offset deviation */
 	u16 reg_offset;
 
-- 
1.7.1


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

* [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
                   ` (3 preceding siblings ...)
  2011-02-24 19:26 ` [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-24 23:32   ` Tony Lindgren
  2011-02-25 12:50   ` Krishnamoorthy, Balaji T
  2011-02-24 19:26 ` [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver Kishore Kadiyala
  2011-02-25 12:54 ` [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Cousson, Benoit
  6 siblings, 2 replies; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Kishore Kadiyala

Changes involves:
1) Remove controller reset in devices.c which is taken care of
   by hwmod framework.
2) Omap2420 platform consists of mmc block as in omap1 and not the
   hsmmc block as present in omap2430, omap3, omap4 platforms.
   Removing all base address macro defines except keeping one for OMAP2420.
3) Using omap-device layer to register device and utilizing data from
   hwmod data file for base address, dma channel number, Irq_number,
   device attribute.
4) Update the driver to use dev_attr to find whether controller
   supports dual volt cards

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/devices.c         |  251 --------------------
 arch/arm/mach-omap2/hsmmc.c           |  417 +++++++++++++++++++++------------
 arch/arm/plat-omap/include/plat/mmc.h |   20 +--
 drivers/mmc/host/omap_hsmmc.c         |    4 +-
 4 files changed, 274 insertions(+), 418 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 100bb42..31632ac 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -544,112 +544,6 @@ static inline void omap_init_aes(void) { }
 
 /*-------------------------------------------------------------------------*/
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
-
-#define MMCHS_SYSCONFIG			0x0010
-#define MMCHS_SYSCONFIG_SWRESET		(1 << 1)
-#define MMCHS_SYSSTATUS			0x0014
-#define MMCHS_SYSSTATUS_RESETDONE	(1 << 0)
-
-static struct platform_device dummy_pdev = {
-	.dev = {
-		.bus = &platform_bus_type,
-	},
-};
-
-/**
- * omap_hsmmc_reset() - Full reset of each HS-MMC controller
- *
- * Ensure that each MMC controller is fully reset.  Controllers
- * left in an unknown state (by bootloader) may prevent retention
- * or OFF-mode.  This is especially important in cases where the
- * MMC driver is not enabled, _or_ built as a module.
- *
- * In order for reset to work, interface, functional and debounce
- * clocks must be enabled.  The debounce clock comes from func_32k_clk
- * and is not under SW control, so we only enable i- and f-clocks.
- **/
-static void __init omap_hsmmc_reset(void)
-{
-	u32 i, nr_controllers;
-	struct clk *iclk, *fclk;
-
-	if (cpu_is_omap242x())
-		return;
-
-	nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
-		(cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC);
-
-	for (i = 0; i < nr_controllers; i++) {
-		u32 v, base = 0;
-		struct device *dev = &dummy_pdev.dev;
-
-		switch (i) {
-		case 0:
-			base = OMAP2_MMC1_BASE;
-			break;
-		case 1:
-			base = OMAP2_MMC2_BASE;
-			break;
-		case 2:
-			base = OMAP3_MMC3_BASE;
-			break;
-		case 3:
-			if (!cpu_is_omap44xx())
-				return;
-			base = OMAP4_MMC4_BASE;
-			break;
-		case 4:
-			if (!cpu_is_omap44xx())
-				return;
-			base = OMAP4_MMC5_BASE;
-			break;
-		}
-
-		if (cpu_is_omap44xx())
-			base += OMAP4_MMC_REG_OFFSET;
-
-		dummy_pdev.id = i;
-		dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
-		iclk = clk_get(dev, "ick");
-		if (IS_ERR(iclk))
-			goto err1;
-		if (clk_enable(iclk))
-			goto err2;
-
-		fclk = clk_get(dev, "fck");
-		if (IS_ERR(fclk))
-			goto err3;
-		if (clk_enable(fclk))
-			goto err4;
-
-		omap_writel(MMCHS_SYSCONFIG_SWRESET, base + MMCHS_SYSCONFIG);
-		v = omap_readl(base + MMCHS_SYSSTATUS);
-		while (!(omap_readl(base + MMCHS_SYSSTATUS) &
-			 MMCHS_SYSSTATUS_RESETDONE))
-			cpu_relax();
-
-		clk_disable(fclk);
-		clk_put(fclk);
-		clk_disable(iclk);
-		clk_put(iclk);
-	}
-	return;
-
-err4:
-	clk_put(fclk);
-err3:
-	clk_disable(iclk);
-err2:
-	clk_put(iclk);
-err1:
-	printk(KERN_WARNING "%s: Unable to enable clocks for MMC%d, "
-			    "cannot reset.\n",  __func__, i);
-}
-#else
-static inline void omap_hsmmc_reset(void) {}
-#endif
-
 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
 
 static inline void omap242x_mmc_mux(struct omap_mmc_platform_data
@@ -706,150 +600,6 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
 
 #endif
 
-#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
-
-static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
-			int controller_nr)
-{
-	if ((mmc_controller->slots[0].switch_pin > 0) && \
-		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
-		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
-					OMAP_PIN_INPUT_PULLUP);
-	if ((mmc_controller->slots[0].gpio_wp > 0) && \
-		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
-		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
-					OMAP_PIN_INPUT_PULLUP);
-	if (cpu_is_omap34xx()) {
-		if (controller_nr == 0) {
-			omap_mux_init_signal("sdmmc1_clk",
-				OMAP_PIN_INPUT_PULLUP);
-			omap_mux_init_signal("sdmmc1_cmd",
-				OMAP_PIN_INPUT_PULLUP);
-			omap_mux_init_signal("sdmmc1_dat0",
-				OMAP_PIN_INPUT_PULLUP);
-			if (mmc_controller->slots[0].caps &
-				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
-				omap_mux_init_signal("sdmmc1_dat1",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc1_dat2",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc1_dat3",
-					OMAP_PIN_INPUT_PULLUP);
-			}
-			if (mmc_controller->slots[0].caps &
-						MMC_CAP_8_BIT_DATA) {
-				omap_mux_init_signal("sdmmc1_dat4",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc1_dat5",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc1_dat6",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc1_dat7",
-					OMAP_PIN_INPUT_PULLUP);
-			}
-		}
-		if (controller_nr == 1) {
-			/* MMC2 */
-			omap_mux_init_signal("sdmmc2_clk",
-				OMAP_PIN_INPUT_PULLUP);
-			omap_mux_init_signal("sdmmc2_cmd",
-				OMAP_PIN_INPUT_PULLUP);
-			omap_mux_init_signal("sdmmc2_dat0",
-				OMAP_PIN_INPUT_PULLUP);
-
-			/*
-			 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
-			 * in the board-*.c files
-			 */
-			if (mmc_controller->slots[0].caps &
-				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
-				omap_mux_init_signal("sdmmc2_dat1",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc2_dat2",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc2_dat3",
-					OMAP_PIN_INPUT_PULLUP);
-			}
-			if (mmc_controller->slots[0].caps &
-							MMC_CAP_8_BIT_DATA) {
-				omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
-					OMAP_PIN_INPUT_PULLUP);
-				omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
-					OMAP_PIN_INPUT_PULLUP);
-			}
-		}
-
-		/*
-		 * For MMC3 the pins need to be muxed in the board-*.c files
-		 */
-	}
-}
-
-void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
-			int nr_controllers)
-{
-	int i;
-	char *name;
-
-	for (i = 0; i < nr_controllers; i++) {
-		unsigned long base, size;
-		unsigned int irq = 0;
-
-		if (!mmc_data[i])
-			continue;
-
-		omap2_mmc_mux(mmc_data[i], i);
-
-		switch (i) {
-		case 0:
-			base = OMAP2_MMC1_BASE;
-			irq = INT_24XX_MMC_IRQ;
-			break;
-		case 1:
-			base = OMAP2_MMC2_BASE;
-			irq = INT_24XX_MMC2_IRQ;
-			break;
-		case 2:
-			if (!cpu_is_omap44xx() && !cpu_is_omap34xx())
-				return;
-			base = OMAP3_MMC3_BASE;
-			irq = INT_34XX_MMC3_IRQ;
-			break;
-		case 3:
-			if (!cpu_is_omap44xx())
-				return;
-			base = OMAP4_MMC4_BASE;
-			irq = OMAP44XX_IRQ_MMC4;
-			break;
-		case 4:
-			if (!cpu_is_omap44xx())
-				return;
-			base = OMAP4_MMC5_BASE;
-			irq = OMAP44XX_IRQ_MMC5;
-			break;
-		default:
-			continue;
-		}
-
-		if (cpu_is_omap44xx()) {
-			if (i < 3)
-				irq += OMAP44XX_IRQ_GIC_START;
-			size = OMAP4_HSMMC_SIZE;
-			name = "mmci-omap-hs";
-		} else {
-			size = OMAP3_HSMMC_SIZE;
-			name = "mmci-omap-hs";
-		}
-		omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
-	};
-}
-
-#endif
-
 /*-------------------------------------------------------------------------*/
 
 #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
@@ -919,7 +669,6 @@ static int __init omap2_init_devices(void)
 	 * please keep these calls, and their implementations above,
 	 * in alphabetical order so they're easier to sort through.
 	 */
-	omap_hsmmc_reset();
 	omap_init_audio();
 	omap_init_camera();
 	omap_init_mbox();
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 5496bc7..c370c75 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -16,7 +16,11 @@
 #include <mach/hardware.h>
 #include <plat/mmc.h>
 #include <plat/omap-pm.h>
+#include <plat/mux.h>
+#include <plat/omap_hwmod.h>
+#include <plat/omap_device.h>
 
+#include "mux.h"
 #include "hsmmc.h"
 #include "control.h"
 
@@ -28,10 +32,6 @@ static u16 control_mmc1;
 
 #define HSMMC_NAME_LEN	9
 
-static struct hsmmc_controller {
-	char				name[HSMMC_NAME_LEN + 1];
-} hsmmc[OMAP34XX_NR_MMC];
-
 #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
 
 static int hsmmc_get_context_loss(struct device *dev)
@@ -204,179 +204,304 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
 	return 0;
 }
 
-static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
-
-void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
+static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
+			int controller_nr)
 {
-	struct omap2_hsmmc_info *c;
-	int nr_hsmmc = ARRAY_SIZE(hsmmc_data);
-	int i;
-	u32 reg;
-
-	if (!cpu_is_omap44xx()) {
-		if (cpu_is_omap2430()) {
-			control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
-			control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
-		} else {
-			control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
-			control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
-		}
-	} else {
-		control_pbias_offset =
-			OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE;
-		control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1;
-		reg = omap4_ctrl_pad_readl(control_mmc1);
-		reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK |
-			OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK);
-		reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK |
-			OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK);
-		reg |= (OMAP4_USBC1_DR0_SPEEDCTRL_MASK|
-			OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK |
-			OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK);
-		omap4_ctrl_pad_writel(reg, control_mmc1);
-	}
-
-	for (c = controllers; c->mmc; c++) {
-		struct hsmmc_controller *hc = hsmmc + c->mmc - 1;
-		struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];
-
-		if (!c->mmc || c->mmc > nr_hsmmc) {
-			pr_debug("MMC%d: no such controller\n", c->mmc);
-			continue;
+	if ((mmc_controller->slots[0].switch_pin > 0) && \
+		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
+		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
+					OMAP_PIN_INPUT_PULLUP);
+	if ((mmc_controller->slots[0].gpio_wp > 0) && \
+		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
+		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
+					OMAP_PIN_INPUT_PULLUP);
+	if (cpu_is_omap34xx()) {
+		if (controller_nr == 0) {
+			omap_mux_init_signal("sdmmc1_clk",
+				OMAP_PIN_INPUT_PULLUP);
+			omap_mux_init_signal("sdmmc1_cmd",
+				OMAP_PIN_INPUT_PULLUP);
+			omap_mux_init_signal("sdmmc1_dat0",
+				OMAP_PIN_INPUT_PULLUP);
+			if (mmc_controller->slots[0].caps &
+				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
+				omap_mux_init_signal("sdmmc1_dat1",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc1_dat2",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc1_dat3",
+					OMAP_PIN_INPUT_PULLUP);
+			}
+			if (mmc_controller->slots[0].caps &
+						MMC_CAP_8_BIT_DATA) {
+				omap_mux_init_signal("sdmmc1_dat4",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc1_dat5",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc1_dat6",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc1_dat7",
+					OMAP_PIN_INPUT_PULLUP);
+			}
 		}
-		if (mmc) {
-			pr_debug("MMC%d: already configured\n", c->mmc);
-			continue;
+		if (controller_nr == 1) {
+			/* MMC2 */
+			omap_mux_init_signal("sdmmc2_clk",
+				OMAP_PIN_INPUT_PULLUP);
+			omap_mux_init_signal("sdmmc2_cmd",
+				OMAP_PIN_INPUT_PULLUP);
+			omap_mux_init_signal("sdmmc2_dat0",
+				OMAP_PIN_INPUT_PULLUP);
+
+			/*
+			 * For 8 wire configurations, Lines DAT4, 5, 6 and 7
+			 * need to be muxed in the board-*.c files
+			 */
+			if (mmc_controller->slots[0].caps &
+				(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) {
+				omap_mux_init_signal("sdmmc2_dat1",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc2_dat2",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc2_dat3",
+					OMAP_PIN_INPUT_PULLUP);
+			}
+			if (mmc_controller->slots[0].caps &
+							MMC_CAP_8_BIT_DATA) {
+				omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
+					OMAP_PIN_INPUT_PULLUP);
+				omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
+					OMAP_PIN_INPUT_PULLUP);
+			}
 		}
 
-		mmc = kzalloc(sizeof(struct omap_mmc_platform_data),
-			      GFP_KERNEL);
-		if (!mmc) {
-			pr_err("Cannot allocate memory for mmc device!\n");
-			goto done;
-		}
+		/*
+		 * For MMC3 the pins need to be muxed in the board-*.c files
+		 */
+	}
+}
 
-		if (c->name)
-			strncpy(hc->name, c->name, HSMMC_NAME_LEN);
-		else
-			snprintf(hc->name, ARRAY_SIZE(hc->name),
-				"mmc%islot%i", c->mmc, 1);
-		mmc->slots[0].name = hc->name;
-		mmc->nr_slots = 1;
-		mmc->slots[0].caps = c->caps;
-		mmc->slots[0].internal_clock = !c->ext_clock;
-		mmc->dma_mask = 0xffffffff;
-		if (cpu_is_omap44xx())
-			mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
-		else
-			mmc->reg_offset = 0;
+static struct omap_mmc_platform_data *mmc __initdata;
 
-		mmc->get_context_loss_count = hsmmc_get_context_loss;
+static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c)
+{
+		char *hc_name;
 
-		mmc->slots[0].switch_pin = c->gpio_cd;
-		mmc->slots[0].gpio_wp = c->gpio_wp;
+	if (!c->mmc) {
+		pr_debug("MMC%d: no such controller\n", c->mmc);
+		return -ENXIO;
+	}
 
-		mmc->slots[0].remux = c->remux;
-		mmc->slots[0].init_card = c->init_card;
+	hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL);
+	if (!hc_name) {
+		pr_err("Cannot allocate memory for controller slot name\n");
+		kfree(hc_name);
+		return -ENOMEM;
+	}
 
-		if (c->cover_only)
-			mmc->slots[0].cover = 1;
+	if (c->name)
+		strncpy(hc_name, c->name, HSMMC_NAME_LEN);
+	else
+		snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
+								c->mmc, 1);
+	mmc->slots[0].name = hc_name;
+	mmc->nr_slots = 1;
+	mmc->slots[0].caps = c->caps;
+	mmc->slots[0].internal_clock = !c->ext_clock;
+	mmc->dma_mask = 0xffffffff;
+	if (cpu_is_omap44xx())
+		mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
+	else
+	mmc->reg_offset = 0;
 
-		if (c->nonremovable)
-			mmc->slots[0].nonremovable = 1;
+	mmc->get_context_loss_count = hsmmc_get_context_loss;
 
-		if (c->power_saving)
-			mmc->slots[0].power_saving = 1;
+	mmc->slots[0].switch_pin = c->gpio_cd;
+	mmc->slots[0].gpio_wp = c->gpio_wp;
 
-		if (c->no_off)
-			mmc->slots[0].no_off = 1;
+	mmc->slots[0].remux = c->remux;
+	mmc->slots[0].init_card = c->init_card;
 
-		if (c->vcc_aux_disable_is_sleep)
-			mmc->slots[0].vcc_aux_disable_is_sleep = 1;
+	if (c->cover_only)
+		mmc->slots[0].cover = 1;
 
-		/* NOTE:  MMC slots should have a Vcc regulator set up.
-		 * This may be from a TWL4030-family chip, another
-		 * controllable regulator, or a fixed supply.
-		 *
-		 * temporary HACK: ocr_mask instead of fixed supply
-		 */
-		mmc->slots[0].ocr_mask = c->ocr_mask;
+	if (c->nonremovable)
+		mmc->slots[0].nonremovable = 1;
 
-		if (cpu_is_omap3517() || cpu_is_omap3505())
-			mmc->slots[0].set_power = nop_mmc_set_power;
-		else
-			mmc->slots[0].features |= HSMMC_HAS_PBIAS;
+	if (c->power_saving)
+		mmc->slots[0].power_saving = 1;
 
-		if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
-			mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
+	if (c->no_off)
+		mmc->slots[0].no_off = 1;
 
-		switch (c->mmc) {
-		case 1:
-			if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
-				/* on-chip level shifting via PBIAS0/PBIAS1 */
-				if (cpu_is_omap44xx()) {
-					mmc->slots[0].before_set_reg =
+	if (c->vcc_aux_disable_is_sleep)
+		mmc->slots[0].vcc_aux_disable_is_sleep = 1;
+
+	/* NOTE:  MMC slots should have a Vcc regulator set up.
+	 * This may be from a TWL4030-family chip, another
+	 * controllable regulator, or a fixed supply.
+	 *
+	 * temporary HACK: ocr_mask instead of fixed supply
+	 */
+	mmc->slots[0].ocr_mask = c->ocr_mask;
+
+	if (cpu_is_omap3517() || cpu_is_omap3505())
+		mmc->slots[0].set_power = nop_mmc_set_power;
+	else
+		mmc->slots[0].features |= HSMMC_HAS_PBIAS;
+
+	if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
+		mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
+
+	switch (c->mmc) {
+	case 1:
+		if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
+			/* on-chip level shifting via PBIAS0/PBIAS1 */
+			if (cpu_is_omap44xx()) {
+				mmc->slots[0].before_set_reg =
 						omap4_hsmmc1_before_set_reg;
-					mmc->slots[0].after_set_reg =
+				mmc->slots[0].after_set_reg =
 						omap4_hsmmc1_after_set_reg;
-				} else {
-					mmc->slots[0].before_set_reg =
+			} else {
+				mmc->slots[0].before_set_reg =
 						omap_hsmmc1_before_set_reg;
-					mmc->slots[0].after_set_reg =
+				mmc->slots[0].after_set_reg =
 						omap_hsmmc1_after_set_reg;
-				}
 			}
+		}
 
-			/* Omap3630 HSMMC1 supports only 4-bit */
-			if (cpu_is_omap3630() &&
-					(c->caps & MMC_CAP_8_BIT_DATA)) {
-				c->caps &= ~MMC_CAP_8_BIT_DATA;
-				c->caps |= MMC_CAP_4_BIT_DATA;
-				mmc->slots[0].caps = c->caps;
-			}
-			break;
-		case 2:
-			if (c->ext_clock)
-				c->transceiver = 1;
-			if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) {
-				c->caps &= ~MMC_CAP_8_BIT_DATA;
-				c->caps |= MMC_CAP_4_BIT_DATA;
-			}
-			/* FALLTHROUGH */
-		case 3:
-			if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
-				/* off-chip level shifting, or none */
-				mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
-				mmc->slots[0].after_set_reg = NULL;
-			}
-			break;
-		case 4:
-		case 5:
-			mmc->slots[0].before_set_reg = NULL;
+		/* Omap3630 HSMMC1 supports only 4-bit */
+		if (cpu_is_omap3630() &&
+				(c->caps & MMC_CAP_8_BIT_DATA)) {
+			c->caps &= ~MMC_CAP_8_BIT_DATA;
+			c->caps |= MMC_CAP_4_BIT_DATA;
+			mmc->slots[0].caps = c->caps;
+		}
+		break;
+	case 2:
+		if (c->ext_clock)
+			c->transceiver = 1;
+		if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) {
+			c->caps &= ~MMC_CAP_8_BIT_DATA;
+			c->caps |= MMC_CAP_4_BIT_DATA;
+		}
+		/* FALLTHROUGH */
+	case 3:
+		if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
+			/* off-chip level shifting, or none */
+			mmc->slots[0].before_set_reg = hsmmc23_before_set_reg;
 			mmc->slots[0].after_set_reg = NULL;
-			break;
-		default:
-			pr_err("MMC%d configuration not supported!\n", c->mmc);
-			kfree(mmc);
-			continue;
 		}
-		hsmmc_data[c->mmc - 1] = mmc;
+		break;
+	case 4:
+	case 5:
+		mmc->slots[0].before_set_reg = NULL;
+		mmc->slots[0].after_set_reg = NULL;
+		break;
+	default:
+		pr_err("MMC%d configuration not supported!\n", c->mmc);
+		return -ENODEV;
 	}
+	return 0;
+}
 
-	omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC);
+static struct omap_device_pm_latency omap_hsmmc_latency[] = {
+	[0] = {
+		.deactivate_func = omap_device_idle_hwmods,
+		.activate_func	 = omap_device_enable_hwmods,
+		.flags		 = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
+	},
+	/*
+	 * XXX There should also be an entry here to power off/on the
+	 * MMC regulators/PBIAS cells, etc.
+	 */
+};
 
-	/* pass the device nodes back to board setup code */
-	for (c = controllers; c->mmc; c++) {
-		struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1];
+static int omap_mmc_init(struct omap_hwmod *oh, void *hsmmcinfo)
+{
+	struct omap_device *od;
+	struct omap_device_pm_latency *ohl;
+	char *name;
+	int ohl_cnt = 0;
+	struct omap_mmc_dev_attr *mmc_dev_attr = oh->dev_attr;
+	struct omap2_hsmmc_info *c = (struct omap2_hsmmc_info *) hsmmcinfo;
+	int idx;
+	static int mmc_num;
+
+	c += mmc_num;
+	if (!c->mmc) {
+		pr_err("omap_hsmmc_info is not updated in board file\n");
+		return 0;
+	}
+	mmc = kzalloc(sizeof(struct omap_mmc_platform_data),
+							GFP_KERNEL);
+	if (!mmc) {
+		pr_err("Cannot allocate memory for mmc device!\n");
+		kfree(mmc);
+		return -ENOMEM;
+	}
 
-		if (!c->mmc || c->mmc > nr_hsmmc)
-			continue;
-		c->dev = mmc->dev;
+	if (omap_hsmmc_pdata_init(c) < 0) {
+		pr_err("%s fails!\n", __func__);
+		return -ENXIO;
 	}
 
-done:
-	for (i = 0; i < nr_hsmmc; i++)
-		kfree(hsmmc_data[i]);
+	idx = c->mmc - 1 ;
+	name = "mmci-omap-hs";
+	ohl = omap_hsmmc_latency;
+	ohl_cnt = ARRAY_SIZE(omap_hsmmc_latency);
+	omap_hsmmc_mux(mmc, idx);
+
+	if (mmc_dev_attr != NULL)
+		mmc->controller_flags = mmc_dev_attr->flags;
+
+	od = omap_device_build(name, idx, oh, mmc,
+		sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false);
+	if (IS_ERR(od)) {
+		WARN(1, "Cant build omap_device for %s:%s.\n",
+					name, oh->name);
+		return PTR_ERR(od);
+	}
+	/*
+	 * return device handle to board setup code
+	 * required to populate for regulator framework structure
+	 */
+	c->dev = &od->pdev.dev;
+	kfree(mmc);
+	mmc_num++;
+	return 0;
 }
 
+void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
+{
+	u32 reg;
+
+	if (!cpu_is_omap44xx()) {
+		if (cpu_is_omap2430()) {
+			control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
+			control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
+		} else {
+			control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
+			control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
+		}
+	} else {
+		control_pbias_offset =
+			OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE;
+		control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1;
+		reg = omap4_ctrl_pad_readl(control_mmc1);
+		reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK |
+			OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK);
+		reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK |
+			OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK);
+		reg |= (OMAP4_USBC1_DR0_SPEEDCTRL_MASK|
+			OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK |
+			OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK);
+		omap4_ctrl_pad_writel(reg, control_mmc1);
+	}
+	omap_hwmod_for_each_by_class("mmc", omap_mmc_init, controllers);
+}
 #endif
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index a7afab0..f38fef9 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -24,22 +24,10 @@
 #define OMAP1_MMC2_BASE		0xfffb7c00	/* omap16xx only */
 
 #define OMAP24XX_NR_MMC		2
-#define OMAP34XX_NR_MMC		3
-#define OMAP44XX_NR_MMC		5
 #define OMAP2420_MMC_SIZE	OMAP1_MMC_SIZE
-#define OMAP3_HSMMC_SIZE	0x200
-#define OMAP4_HSMMC_SIZE	0x1000
 #define OMAP2_MMC1_BASE		0x4809c000
-#define OMAP2_MMC2_BASE		0x480b4000
-#define OMAP3_MMC3_BASE		0x480ad000
-#define OMAP4_MMC4_BASE		0x480d1000
-#define OMAP4_MMC5_BASE		0x480d5000
+
 #define OMAP4_MMC_REG_OFFSET	0x100
-#define HSMMC5			(1 << 4)
-#define HSMMC4			(1 << 3)
-#define HSMMC3			(1 << 2)
-#define HSMMC2			(1 << 1)
-#define HSMMC1			(1 << 0)
 
 #define OMAP_MMC_MAX_SLOTS	2
 
@@ -169,8 +157,6 @@ extern void omap_mmc_notify_cover_event(struct device *dev, int slot,
 void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 				int nr_controllers);
 void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data);
-void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
-				int nr_controllers);
 int omap_mmc_add(const char *name, int id, unsigned long base,
 				unsigned long size, unsigned int irq,
 				struct omap_mmc_platform_data *data);
@@ -182,10 +168,6 @@ static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
 {
 }
-static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
-				int nr_controllers)
-{
-}
 static inline int omap_mmc_add(const char *name, int id, unsigned long base,
 				unsigned long size, unsigned int irq,
 				struct omap_mmc_platform_data *data)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 8c42573..d0bd2b4 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1571,7 +1571,7 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 		break;
 	}
 
-	if (host->id == OMAP_MMC1_DEVID) {
+	if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
 		/* Only MMC1 can interface at 3V without some flavor
 		 * of external transceiver; but they all handle 1.8V.
 		 */
@@ -1663,7 +1663,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host)
 	u32 hctl, capa, value;
 
 	/* Only MMC1 supports 3.0V */
-	if (host->id == OMAP_MMC1_DEVID) {
+	if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
 		hctl = SDVS30;
 		capa = VS30 | VS18;
 	} else {
-- 
1.7.1


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

* [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
                   ` (4 preceding siblings ...)
  2011-02-24 19:26 ` [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework Kishore Kadiyala
@ 2011-02-24 19:26 ` Kishore Kadiyala
  2011-02-25 13:20   ` Cousson, Benoit
  2011-02-25 12:54 ` [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Cousson, Benoit
  6 siblings, 1 reply; 16+ messages in thread
From: Kishore Kadiyala @ 2011-02-24 19:26 UTC (permalink / raw)
  To: linux-mmc, linux-omap
  Cc: tony, cjb, madhu.cr, khilman, paul, b-cousson, Kishore Kadiyala

Modifying the device & driver name from "mmci-omap-hs" to
"omap_hsmmc".

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Chris Ball <cjb@laptop.org
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
 arch/arm/mach-omap2/board-3430sdp.c          |    6 +++---
 arch/arm/mach-omap2/board-4430sdp.c          |    4 ++--
 arch/arm/mach-omap2/board-devkit8000.c       |    2 +-
 arch/arm/mach-omap2/board-igep0020.c         |    6 +++---
 arch/arm/mach-omap2/board-igep0030.c         |    6 +++---
 arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
 arch/arm/mach-omap2/board-omap3pandora.c     |    6 +++---
 arch/arm/mach-omap2/board-omap4panda.c       |    4 ++--
 arch/arm/mach-omap2/board-rm680.c            |    2 +-
 arch/arm/mach-omap2/board-rx51-peripherals.c |    8 ++++----
 arch/arm/mach-omap2/board-zoom-peripherals.c |    2 +-
 arch/arm/mach-omap2/clock2430_data.c         |   12 ++++++------
 arch/arm/mach-omap2/clock3xxx_data.c         |   12 ++++++------
 arch/arm/mach-omap2/clock44xx_data.c         |   20 ++++++++++----------
 arch/arm/mach-omap2/hsmmc.c                  |    2 +-
 drivers/mmc/host/omap_hsmmc.c                |    2 +-
 17 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index cc42d47..ab0880b 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -149,7 +149,7 @@ static void __init omap_2430sdp_init_early(void)
 }
 
 static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 8950ecc..40b0174 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -410,15 +410,15 @@ static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
 };
 
 static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
 };
 
 static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
-	REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.0"),
+	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
 static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 /*
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1a943be..cca2fbc 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -367,13 +367,13 @@ static struct omap2_hsmmc_info mmc[] = {
 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
 	{
 		.supply = "vmmc",
-		.dev_name = "mmci-omap-hs.1",
+		.dev_name = "omap_hsmmc.1",
 	},
 };
 static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
 	{
 		.supply = "vmmc",
-		.dev_name = "mmci-omap-hs.0",
+		.dev_name = "omap_hsmmc.0",
 	},
 };
 
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 54abdd0..c9170f4 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -140,7 +140,7 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
 }
 
 static struct regulator_consumer_supply devkit8000_vmmc1_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 
 /* ads7846 on SPI */
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 54e6318..1877c28 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -250,7 +250,7 @@ static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
 static struct regulator_consumer_supply igep2_vmmc1_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
@@ -268,7 +268,7 @@ static struct regulator_init_data igep2_vmmc1 = {
 };
 
 static struct regulator_consumer_supply igep2_vio_supply =
-	REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_init_data igep2_vio = {
 	.constraints = {
@@ -286,7 +286,7 @@ static struct regulator_init_data igep2_vio = {
 };
 
 static struct regulator_consumer_supply igep2_vmmc2_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_init_data igep2_vmmc2 = {
 	.constraints		= {
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index d75028e..4273d06 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -142,7 +142,7 @@ static void __init igep3_flash_init(void) {}
 #endif
 
 static struct regulator_consumer_supply igep3_vmmc1_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep3_vmmc1 = {
@@ -160,7 +160,7 @@ static struct regulator_init_data igep3_vmmc1 = {
 };
 
 static struct regulator_consumer_supply igep3_vio_supply =
-	REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_init_data igep3_vio = {
 	.constraints = {
@@ -178,7 +178,7 @@ static struct regulator_init_data igep3_vio = {
 };
 
 static struct regulator_consumer_supply igep3_vmmc2_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_init_data igep3_vmmc2 = {
 	.constraints	= {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 5364147..cccc817 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -605,7 +605,7 @@ static struct regulator_init_data omap3evm_vio = {
 
 static struct regulator_consumer_supply omap3evm_vmmc2_supply = {
 	.supply			= "vmmc",
-	.dev_name		= "mmci-omap-hs.1",
+	.dev_name		= "omap_hsmmc.1",
 };
 
 /* VMMC2 for driving the WL12xx module */
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 17ef547..ed13869 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -333,13 +333,13 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
 };
 
 static struct regulator_consumer_supply pandora_vmmc1_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 static struct regulator_consumer_supply pandora_vmmc2_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply pandora_vmmc3_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
 
 static struct regulator_consumer_supply pandora_vdda_dac_supply =
 	REGULATOR_SUPPLY("vdda_dac", "omapdss");
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 3dd241b..12bf09a 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -180,13 +180,13 @@ static struct omap2_hsmmc_info mmc[] = {
 static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
 	{
 		.supply = "vmmc",
-		.dev_name = "mmci-omap-hs.0",
+		.dev_name = "omap_hsmmc.0",
 	},
 };
 
 static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
 	.supply = "vmmc",
-	.dev_name = "mmci-omap-hs.4",
+	.dev_name = "omap_hsmmc.4",
 };
 
 static struct regulator_init_data panda_vmmc5 = {
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index bdebcb7..2af8b05 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -33,7 +33,7 @@
 #include "sdram-nokia.h"
 
 static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 /* Fixed regulator for internal eMMC */
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index e75e240..b74357f 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -331,13 +331,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
 };
 
 static struct regulator_consumer_supply rx51_vmmc1_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 static struct regulator_consumer_supply rx51_vaux3_supply =
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply rx51_vsim_supply =
-	REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
 	/* tlv320aic3x analog supplies */
@@ -348,7 +348,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
 	/* tpa6130a2 */
 	REGULATOR_SUPPLY("Vdd", "2-0060"),
 	/* Keep vmmc as last item. It is not iterated for newer boards */
-	REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
+	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 static struct regulator_consumer_supply rx51_vio_supplies[] = {
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index e0e040f..7a098a4 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -118,7 +118,7 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
 
 static struct regulator_consumer_supply zoom_vmmc3_supply = {
 	.supply		= "vmmc",
-	.dev_name	= "mmci-omap-hs.2",
+	.dev_name	= "omap_hsmmc.2",
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index c047dcd..5c647ce 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -1984,15 +1984,15 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"pka_ick",	&pka_ick,	CK_243X),
 	CLK(NULL,	"usb_fck",	&usb_fck,	CK_243X),
 	CLK("musb-omap2430",	"ick",	&usbhs_ick,	CK_243X),
-	CLK("mmci-omap-hs.0", "ick",	&mmchs1_ick,	CK_243X),
-	CLK("mmci-omap-hs.0", "fck",	&mmchs1_fck,	CK_243X),
-	CLK("mmci-omap-hs.1", "ick",	&mmchs2_ick,	CK_243X),
-	CLK("mmci-omap-hs.1", "fck",	&mmchs2_fck,	CK_243X),
+	CLK("omap_hsmmc.0", "ick",	&mmchs1_ick,	CK_243X),
+	CLK("omap_hsmmc.0", "fck",	&mmchs1_fck,	CK_243X),
+	CLK("omap_hsmmc.1", "ick",	&mmchs2_ick,	CK_243X),
+	CLK("omap_hsmmc.1", "fck",	&mmchs2_fck,	CK_243X),
 	CLK(NULL,	"gpio5_ick",	&gpio5_ick,	CK_243X),
 	CLK(NULL,	"gpio5_fck",	&gpio5_fck,	CK_243X),
 	CLK(NULL,	"mdm_intc_ick",	&mdm_intc_ick,	CK_243X),
-	CLK("mmci-omap-hs.0", "mmchsdb_fck",	&mmchsdb1_fck,	CK_243X),
-	CLK("mmci-omap-hs.1", "mmchsdb_fck", 	&mmchsdb2_fck,	CK_243X),
+	CLK("omap_hsmmc.0", "mmchsdb_fck",	&mmchsdb1_fck,	CK_243X),
+	CLK("omap_hsmmc.1", "mmchsdb_fck",	&mmchsdb2_fck,	CK_243X),
 };
 
 /*
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index f14d986..052ac32 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3290,10 +3290,10 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("omap-mcbsp.1",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK("omap-mcbsp.5",	"prcm_fck",	&core_96m_fck,	CK_3XXX),
 	CLK(NULL,	"core_96m_fck",	&core_96m_fck,	CK_3XXX),
-	CLK("mmci-omap-hs.2",	"fck",	&mmchs3_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
-	CLK("mmci-omap-hs.1",	"fck",	&mmchs2_fck,	CK_3XXX),
+	CLK("omap_hsmmc.2",	"fck",	&mmchs3_fck,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
+	CLK("omap_hsmmc.1",	"fck",	&mmchs2_fck,	CK_3XXX),
 	CLK(NULL,	"mspro_fck",	&mspro_fck,	CK_34XX | CK_36XX),
-	CLK("mmci-omap-hs.0",	"fck",	&mmchs1_fck,	CK_3XXX),
+	CLK("omap_hsmmc.0",	"fck",	&mmchs1_fck,	CK_3XXX),
 	CLK("omap_i2c.3", "fck",	&i2c3_fck,	CK_3XXX),
 	CLK("omap_i2c.2", "fck",	&i2c2_fck,	CK_3XXX),
 	CLK("omap_i2c.1", "fck",	&i2c1_fck,	CK_3XXX),
@@ -3323,13 +3323,13 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"core_l4_ick",	&core_l4_ick,	CK_3XXX),
 	CLK(NULL,	"usbtll_ick",	&usbtll_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK("ehci-omap.0",	"usbtll_ick",	&usbtll_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
-	CLK("mmci-omap-hs.2",	"ick",	&mmchs3_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
+	CLK("omap_hsmmc.2",	"ick",	&mmchs3_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"icr_ick",	&icr_ick,	CK_34XX | CK_36XX),
 	CLK("omap-aes",	"ick",	&aes2_ick,	CK_34XX | CK_36XX),
 	CLK("omap-sham",	"ick",	&sha12_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"des2_ick",	&des2_ick,	CK_34XX | CK_36XX),
-	CLK("mmci-omap-hs.1",	"ick",	&mmchs2_ick,	CK_3XXX),
-	CLK("mmci-omap-hs.0",	"ick",	&mmchs1_ick,	CK_3XXX),
+	CLK("omap_hsmmc.1",	"ick",	&mmchs2_ick,	CK_3XXX),
+	CLK("omap_hsmmc.0",	"ick",	&mmchs1_ick,	CK_3XXX),
 	CLK(NULL,	"mspro_ick",	&mspro_ick,	CK_34XX | CK_36XX),
 	CLK("omap_hdq.0", "ick",	&hdq_ick,	CK_3XXX),
 	CLK("omap2_mcspi.4", "ick",	&mcspi4_ick,	CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index de9ec8d..fdbc042 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3158,11 +3158,11 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK("omap2_mcspi.2",	"fck",				&mcspi2_fck,	CK_443X),
 	CLK("omap2_mcspi.3",	"fck",				&mcspi3_fck,	CK_443X),
 	CLK("omap2_mcspi.4",	"fck",				&mcspi4_fck,	CK_443X),
-	CLK("mmci-omap-hs.0",	"fck",				&mmc1_fck,	CK_443X),
-	CLK("mmci-omap-hs.1",	"fck",				&mmc2_fck,	CK_443X),
-	CLK("mmci-omap-hs.2",	"fck",				&mmc3_fck,	CK_443X),
-	CLK("mmci-omap-hs.3",	"fck",				&mmc4_fck,	CK_443X),
-	CLK("mmci-omap-hs.4",	"fck",				&mmc5_fck,	CK_443X),
+	CLK("omap_hsmmc.0",	"fck",				&mmc1_fck,	CK_443X),
+	CLK("omap_hsmmc.1",	"fck",				&mmc2_fck,	CK_443X),
+	CLK("omap_hsmmc.2",	"fck",				&mmc3_fck,	CK_443X),
+	CLK("omap_hsmmc.3",	"fck",				&mmc4_fck,	CK_443X),
+	CLK("omap_hsmmc.4",	"fck",				&mmc5_fck,	CK_443X),
 	CLK(NULL,	"ocp2scp_usb_phy_phy_48m",	&ocp2scp_usb_phy_phy_48m,	CK_443X),
 	CLK(NULL,	"ocp2scp_usb_phy_ick",		&ocp2scp_usb_phy_ick,	CK_443X),
 	CLK(NULL,	"ocp_wp_noc_ick",		&ocp_wp_noc_ick,	CK_443X),
@@ -3245,11 +3245,11 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK("omap_i2c.2",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap_i2c.3",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap_i2c.4",	"ick",				&dummy_ck,	CK_443X),
-	CLK("mmci-omap-hs.0",	"ick",				&dummy_ck,	CK_443X),
-	CLK("mmci-omap-hs.1",	"ick",				&dummy_ck,	CK_443X),
-	CLK("mmci-omap-hs.2",	"ick",				&dummy_ck,	CK_443X),
-	CLK("mmci-omap-hs.3",	"ick",				&dummy_ck,	CK_443X),
-	CLK("mmci-omap-hs.4",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_hsmmc.0",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_hsmmc.1",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_hsmmc.2",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_hsmmc.3",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_hsmmc.4",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap-mcbsp.1",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap-mcbsp.2",	"ick",				&dummy_ck,	CK_443X),
 	CLK("omap-mcbsp.3",	"ick",				&dummy_ck,	CK_443X),
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index c370c75..9b31724 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -451,7 +451,7 @@ static int omap_mmc_init(struct omap_hwmod *oh, void *hsmmcinfo)
 	}
 
 	idx = c->mmc - 1 ;
-	name = "mmci-omap-hs";
+	name = "omap_hsmmc";
 	ohl = omap_hsmmc_latency;
 	ohl_cnt = ARRAY_SIZE(omap_hsmmc_latency);
 	omap_hsmmc_mux(mmc, idx);
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index d0bd2b4..191332b 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -118,7 +118,7 @@
 
 #define MMC_TIMEOUT_MS		20
 #define OMAP_MMC_MASTER_CLOCK	96000000
-#define DRIVER_NAME		"mmci-omap-hs"
+#define DRIVER_NAME		"omap_hsmmc"
 
 /* Timeouts for entering power saving states on inactivity, msec */
 #define OMAP_MMC_DISABLED_TIMEOUT	100
-- 
1.7.1


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

* Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
  2011-02-24 19:26 ` [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework Kishore Kadiyala
@ 2011-02-24 23:32   ` Tony Lindgren
  2011-02-25 17:03     ` Kadiyala, Kishore
  2011-02-25 12:50   ` Krishnamoorthy, Balaji T
  1 sibling, 1 reply; 16+ messages in thread
From: Tony Lindgren @ 2011-02-24 23:32 UTC (permalink / raw)
  To: Kishore Kadiyala
  Cc: linux-mmc, linux-omap, cjb, madhu.cr, khilman, paul, b-cousson

* Kishore Kadiyala <kishore.kadiyala@ti.com> [110224 11:17]:
> Changes involves:
> 1) Remove controller reset in devices.c which is taken care of
>    by hwmod framework.
> 2) Omap2420 platform consists of mmc block as in omap1 and not the
>    hsmmc block as present in omap2430, omap3, omap4 platforms.
>    Removing all base address macro defines except keeping one for OMAP2420.
> 3) Using omap-device layer to register device and utilizing data from
>    hwmod data file for base address, dma channel number, Irq_number,
>    device attribute.
> 4) Update the driver to use dev_attr to find whether controller
>    supports dual volt cards

This patch is too hard to read. Can you please split it into 
more readable patches?

Thanks,

Tony

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

* Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
  2011-02-24 19:26 ` [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework Kishore Kadiyala
  2011-02-24 23:32   ` Tony Lindgren
@ 2011-02-25 12:50   ` Krishnamoorthy, Balaji T
  2011-02-25 13:28     ` Kadiyala, Kishore
  1 sibling, 1 reply; 16+ messages in thread
From: Krishnamoorthy, Balaji T @ 2011-02-25 12:50 UTC (permalink / raw)
  To: Kishore Kadiyala
  Cc: linux-mmc, linux-omap, tony, cjb, madhu.cr, khilman, paul,
	b-cousson

<snip>

> -               if (cpu_is_omap44xx())
> -                       mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
> -               else
> -                       mmc->reg_offset = 0;
> +static struct omap_mmc_platform_data *mmc __initdata;

can you pass this *mmc as another argument to omap_hsmmc_pdata_init
so that this static initdata can be removed ?

>
> -               mmc->get_context_loss_count = hsmmc_get_context_loss;
> +static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c)
> +{
> +               char *hc_name;
>
> -               mmc->slots[0].switch_pin = c->gpio_cd;
> -               mmc->slots[0].gpio_wp = c->gpio_wp;
> +       if (!c->mmc) {
> +               pr_debug("MMC%d: no such controller\n", c->mmc);
> +               return -ENXIO;
> +       }
>
> -               mmc->slots[0].remux = c->remux;
> -               mmc->slots[0].init_card = c->init_card;
> +       hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL);
> +       if (!hc_name) {
> +               pr_err("Cannot allocate memory for controller slot name\n");
> +               kfree(hc_name);
> +               return -ENOMEM;
> +       }
>
> -               if (c->cover_only)
> -                       mmc->slots[0].cover = 1;
> +       if (c->name)
> +               strncpy(hc_name, c->name, HSMMC_NAME_LEN);
> +       else
> +               snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
> +                                                               c->mmc, 1);
> +       mmc->slots[0].name = hc_name;
> +       mmc->nr_slots = 1;

<snip>

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

* Re: [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation
  2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
                   ` (5 preceding siblings ...)
  2011-02-24 19:26 ` [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver Kishore Kadiyala
@ 2011-02-25 12:54 ` Cousson, Benoit
  2011-02-25 13:06   ` Kadiyala, Kishore
  6 siblings, 1 reply; 16+ messages in thread
From: Cousson, Benoit @ 2011-02-25 12:54 UTC (permalink / raw)
  To: Kadiyala, Kishore
  Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	tony@atomide.com, cjb@laptop.org,
	Chikkature Rajashekar, Madhusudhan, khilman@deeprootsystems.com,
	paul@pwsan.com

Hi Kishore,

On 2/24/2011 8:26 PM, Kadiyala, Kishore wrote:
> Adding hwmod data for hsmmc device on OMAP2430/OMAP3/OMAP4.
> Adapting the omap_hsmmc driver to hwmod framework.
>
> The patch series is based on omap-for-linus and tested on
> OMAP2430, OMAP3430SDP&  OMAP4430SDP.
> Also boot tested on OMAP2420SDP.
>
> V4:
> ---
> Omap2420 platform consists of mmc block as in omap1 and not the
> hsmmc block as present in omap2430, omap3, omap4 platforms.
> The series takes care of hwmod adaptation of hsmmc drivers and
> thus excluding the omap2420 platforms.
>
> Also includes renaming of device&  driver name.
>
> The patch series has dependency on :
>   1)https://patchwork.kernel.org/patch/585281/
>   2)https://patchwork.kernel.org/patch/538301/

This is still not omap-for-linus (at 7cab871)...
I cannot apply the series on it:-(

Benoit

>
> V3:
> --
> http://www.spinics.net/lists/linux-omap/msg46783.html
>
> V2:
> ---
> http://www.spinics.net/lists/linux-omap/msg45443.html
>
> V1:
> ---
> http://www.spinics.net/lists/linux-mmc/msg05689.html
>
>
> Anand Gadiyar (1):
>    OMAP4: hwmod data: enable HSMMC
>
> Kishore Kadiyala (2):
>    OMAP: hwmod data: Add dev_attr and use in the host driver
>    OMAP: adapt hsmmc to hwmod framework
>    OMAP: hsmmc: Rename the device and driver
>
> Paul Walmsley (2):
>    OMAP2430: hwmod data: Add HSMMC
>    OMAP3: hwmod data: Add HSMMC
>
>   arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
>   arch/arm/mach-omap2/board-3430sdp.c          |    6 +-
>   arch/arm/mach-omap2/board-4430sdp.c          |    4 +-
>   arch/arm/mach-omap2/board-devkit8000.c       |    2 +-
>   arch/arm/mach-omap2/board-igep0020.c         |    6 +-
>   arch/arm/mach-omap2/board-igep0030.c         |    6 +-
>   arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
>   arch/arm/mach-omap2/board-omap3pandora.c     |    6 +-
>   arch/arm/mach-omap2/board-omap4panda.c       |    4 +-
>   arch/arm/mach-omap2/board-rm680.c            |    2 +-
>   arch/arm/mach-omap2/board-rx51-peripherals.c |    8 +-
>   arch/arm/mach-omap2/board-zoom-peripherals.c |    2 +-
>   arch/arm/mach-omap2/clock2430_data.c         |   12 +-
>   arch/arm/mach-omap2/clock3xxx_data.c         |   12 +-
>   arch/arm/mach-omap2/clock44xx_data.c         |   20 +-
>   arch/arm/mach-omap2/devices.c                |  251 ----------------
>   arch/arm/mach-omap2/hsmmc.c                  |  417 +++++++++++++++++---------
>   arch/arm/mach-omap2/omap_hwmod_2430_data.c   |  152 ++++++++++
>   arch/arm/mach-omap2/omap_hwmod_3xxx_data.c   |  215 +++++++++++++
>   arch/arm/mach-omap2/omap_hwmod_44xx_data.c   |   16 +-
>   arch/arm/mach-omap2/prcm-common.h            |    4 +
>   arch/arm/plat-omap/include/plat/mmc.h        |   29 +--
>   drivers/mmc/host/omap_hsmmc.c                |    6 +-
>   23 files changed, 713 insertions(+), 471 deletions(-)
>


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

* Re: [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation
  2011-02-25 12:54 ` [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Cousson, Benoit
@ 2011-02-25 13:06   ` Kadiyala, Kishore
  2011-02-25 13:12     ` Cousson, Benoit
  0 siblings, 1 reply; 16+ messages in thread
From: Kadiyala, Kishore @ 2011-02-25 13:06 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	tony@atomide.com, cjb@laptop.org,
	Chikkature Rajashekar, Madhusudhan, khilman@deeprootsystems.com,
	paul@pwsan.com

Hi Benoit,

On Fri, Feb 25, 2011 at 6:24 PM, Cousson, Benoit <b-cousson@ti.com> wrote:
> Hi Kishore,
>
> On 2/24/2011 8:26 PM, Kadiyala, Kishore wrote:
>>
>> Adding hwmod data for hsmmc device on OMAP2430/OMAP3/OMAP4.
>> Adapting the omap_hsmmc driver to hwmod framework.
>>
>> The patch series is based on omap-for-linus and tested on
>> OMAP2430, OMAP3430SDP&  OMAP4430SDP.
>> Also boot tested on OMAP2420SDP.
>>
>> V4:
>> ---
>> Omap2420 platform consists of mmc block as in omap1 and not the
>> hsmmc block as present in omap2430, omap3, omap4 platforms.
>> The series takes care of hwmod adaptation of hsmmc drivers and
>> thus excluding the omap2420 platforms.
>>
>> Also includes renaming of device&  driver name.
>>
>> The patch series has dependency on :
>>  1)https://patchwork.kernel.org/patch/585281/
>>  2)https://patchwork.kernel.org/patch/538301/
>
> This is still not omap-for-linus (at 7cab871)...
> I cannot apply the series on it:-(

The patch series has dependency on
link (1)  mentioned above [Opening link is throwing error] ,
below is the new link
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg45190.html

Could you please check once.

<snip>

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

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

* Re: [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation
  2011-02-25 13:06   ` Kadiyala, Kishore
@ 2011-02-25 13:12     ` Cousson, Benoit
  0 siblings, 0 replies; 16+ messages in thread
From: Cousson, Benoit @ 2011-02-25 13:12 UTC (permalink / raw)
  To: Kadiyala, Kishore
  Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	tony@atomide.com, cjb@laptop.org,
	Chikkature Rajashekar, Madhusudhan, khilman@deeprootsystems.com,
	paul@pwsan.com

On 2/25/2011 2:06 PM, Kadiyala, Kishore wrote:
> Hi Benoit,
>
> On Fri, Feb 25, 2011 at 6:24 PM, Cousson, Benoit<b-cousson@ti.com>  wrote:
>> Hi Kishore,
>>
>> On 2/24/2011 8:26 PM, Kadiyala, Kishore wrote:
>>>
>>> Adding hwmod data for hsmmc device on OMAP2430/OMAP3/OMAP4.
>>> Adapting the omap_hsmmc driver to hwmod framework.
>>>
>>> The patch series is based on omap-for-linus and tested on
>>> OMAP2430, OMAP3430SDP&    OMAP4430SDP.
>>> Also boot tested on OMAP2420SDP.
>>>
>>> V4:
>>> ---
>>> Omap2420 platform consists of mmc block as in omap1 and not the
>>> hsmmc block as present in omap2430, omap3, omap4 platforms.
>>> The series takes care of hwmod adaptation of hsmmc drivers and
>>> thus excluding the omap2420 platforms.
>>>
>>> Also includes renaming of device&    driver name.
>>>
>>> The patch series has dependency on :
>>>   1)https://patchwork.kernel.org/patch/585281/

That link is broken... that's why it's tricky to get the dependency...

>>>   2)https://patchwork.kernel.org/patch/538301/
>>
>> This is still not omap-for-linus (at 7cab871)...
>> I cannot apply the series on it:-(
>
> The patch series has dependency on
> link (1)  mentioned above [Opening link is throwing error] ,
> below is the new link
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg45190.html
>
> Could you please check once.

OK so in fact none of these patches are yet in omap-for-linus.
It should be OK for me, because I can apply the hwmod data patch at least.

I'll send you my comment on the data in 1 minute...

Thanks,
Benoit


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

* Re: [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver
  2011-02-24 19:26 ` [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver Kishore Kadiyala
@ 2011-02-25 13:15   ` Cousson, Benoit
  0 siblings, 0 replies; 16+ messages in thread
From: Cousson, Benoit @ 2011-02-25 13:15 UTC (permalink / raw)
  To: Kadiyala, Kishore
  Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	tony@atomide.com, cjb@laptop.org,
	Chikkature Rajashekar, Madhusudhan, khilman@deeprootsystems.com,
	paul@pwsan.com

Hi Kishore,

On 2/24/2011 8:26 PM, Kadiyala, Kishore wrote:
> Add a device attribute to hwmod data of omap2430, omap3, omap4.
> Currently the device attribute holds information regarding dual volt MMC card
> support by the controller which will be later passed to the host driver via
> platform data.
>
> Signed-off-by: Kevin Hilman<khilman@deeprootsystems.com>
> Signed-off-by: Kishore Kadiyala<kishore.kadiyala@ti.com>
> Cc: Benoit Cousson<b-cousson@ti.com>

Acked-by: Benoit Cousson <b-cousson@ti.com>

I slightly moved the OMAP4 dev_attr as discussed in my previous comment 
to the right place.

The updated patch is below.

Thanks,
Benoit

---
commit 07385426ddbe1d1154a051474eef628a33f58f73
Author: kishore kadiyala <kishore.kadiyala@ti.com>
Date:   Thu Feb 24 19:26:52 2011 +0000

     OMAP: hwmod data: Add dev_attr and use in the host driver

     Add a device attribute to hwmod data of omap2430, omap3, omap4.
     Currently the device attribute holds information regarding dual 
volt MMC card
     support by the controller which will be later passed to the host 
driver via
     platform data.

     Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
     Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
     Acked-by: Benoit Cousson <b-cousson@ti.com>
     Cc: Paul Walmsley <paul@pwsan.com>

diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 9c99083..cbb7c9d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -19,6 +19,7 @@
  #include <plat/i2c.h>
  #include <plat/gpio.h>
  #include <plat/mcspi.h>
+#include <plat/mmc.h>
  #include <plat/l3_2xxx.h>

  #include "omap_hwmod_common_data.h"
@@ -1568,6 +1569,10 @@ static struct omap_hwmod_class mmc_class = {

  /* MMC/SD/SDIO1 */

+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
  static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
  	{ .irq = 83 },
  };
@@ -1603,6 +1608,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
  			.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  		},
  	},
+	.dev_attr	= &mmc1_dev_attr,
  	.slaves		= omap2430_mmc1_slaves,
  	.slaves_cnt	= ARRAY_SIZE(omap2430_mmc1_slaves),
  	.class		= &mmc_class,
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index d4e734e..7fa2dfb 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -22,6 +22,7 @@
  #include <plat/l4_3xxx.h>
  #include <plat/i2c.h>
  #include <plat/gpio.h>
+#include <plat/mmc.h>
  #include <plat/smartreflex.h>
  #include <plat/mcspi.h>

@@ -2292,6 +2293,10 @@ static struct omap_hwmod_class mmc_class = {

  /* MMC/SD/SDIO1 */

+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
  static struct omap_hwmod_irq_info mmc1_mpu_irqs[] = {
  	{ .irq = 83, },
  };
@@ -2327,6 +2332,7 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = {
  			.idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
  		},
  	},
+	.dev_attr	= &mmc1_dev_attr,
  	.slaves		= omap3xxx_mmc1_slaves,
  	.slaves_cnt	= ARRAY_SIZE(omap3xxx_mmc1_slaves),
  	.class		= &mmc_class,
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index dd39e75..e981c5b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -25,6 +25,7 @@
  #include <plat/gpio.h>
  #include <plat/dma.h>
  #include <plat/mcspi.h>
+#include <plat/mmc.h>

  #include "omap_hwmod_common_data.h"

@@ -3420,6 +3421,11 @@ static struct omap_hwmod_ocp_if 
*omap44xx_mmc1_slaves[] = {
  	&omap44xx_l4_per__mmc1,
  };

+/* mmc1 dev_attr */
+static struct omap_mmc_dev_attr mmc1_dev_attr = {
+	.flags	= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
+};
+
  static struct omap_hwmod omap44xx_mmc1_hwmod = {
  	.name		= "mmc1",
  	.class		= &omap44xx_mmc_hwmod_class,
@@ -3433,6 +3439,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
  			.clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
  		},
  	},
+	.dev_attr	= &mmc1_dev_attr,
  	.slaves		= omap44xx_mmc1_slaves,
  	.slaves_cnt	= ARRAY_SIZE(omap44xx_mmc1_slaves),
  	.masters	= omap44xx_mmc1_masters,
diff --git a/arch/arm/plat-omap/include/plat/mmc.h 
b/arch/arm/plat-omap/include/plat/mmc.h
index f57f36a..b30e0a4 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -43,6 +43,12 @@

  #define OMAP_MMC_MAX_SLOTS	2

+#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT	BIT(1)
+
+struct omap_mmc_dev_attr {
+	u8 flags;
+};
+
  struct omap_mmc_platform_data {
  	/* back-link to device */
  	struct device *dev;
@@ -71,6 +77,9 @@ struct omap_mmc_platform_data {

  	u64 dma_mask;

+	/* Integrating attributes from the omap_hwmod layer */
+	u8 controller_flags;
+
  	/* Register offset deviation */
  	u16 reg_offset;



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

* Re: [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver
  2011-02-24 19:26 ` [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver Kishore Kadiyala
@ 2011-02-25 13:20   ` Cousson, Benoit
  0 siblings, 0 replies; 16+ messages in thread
From: Cousson, Benoit @ 2011-02-25 13:20 UTC (permalink / raw)
  To: Kadiyala, Kishore
  Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	tony@atomide.com, cjb@laptop.org,
	Chikkature Rajashekar, Madhusudhan, khilman@deeprootsystems.com,
	paul@pwsan.com

On 2/24/2011 8:26 PM, Kadiyala, Kishore wrote:
> Modifying the device&  driver name from "mmci-omap-hs" to
> "omap_hsmmc".

Cool, thanks for that cleanup.

> Signed-off-by: Kishore Kadiyala<kishore.kadiyala@ti.com>
> Cc: Kevin Hilman<khilman@deeprootsystems.com>
> Cc: Benoit Cousson<b-cousson@ti.com>

FWIW, Acked-by: Benoit Cousson<b-cousson@ti.com>

Regards,
Benoit

> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Chris Ball<cjb@laptop.org
> Cc: Tony Lindgren<tony@atomide.com>
> ---
>   arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
>   arch/arm/mach-omap2/board-3430sdp.c          |    6 +++---
>   arch/arm/mach-omap2/board-4430sdp.c          |    4 ++--
>   arch/arm/mach-omap2/board-devkit8000.c       |    2 +-
>   arch/arm/mach-omap2/board-igep0020.c         |    6 +++---
>   arch/arm/mach-omap2/board-igep0030.c         |    6 +++---
>   arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
>   arch/arm/mach-omap2/board-omap3pandora.c     |    6 +++---
>   arch/arm/mach-omap2/board-omap4panda.c       |    4 ++--
>   arch/arm/mach-omap2/board-rm680.c            |    2 +-
>   arch/arm/mach-omap2/board-rx51-peripherals.c |    8 ++++----
>   arch/arm/mach-omap2/board-zoom-peripherals.c |    2 +-
>   arch/arm/mach-omap2/clock2430_data.c         |   12 ++++++------
>   arch/arm/mach-omap2/clock3xxx_data.c         |   12 ++++++------
>   arch/arm/mach-omap2/clock44xx_data.c         |   20 ++++++++++----------
>   arch/arm/mach-omap2/hsmmc.c                  |    2 +-
>   drivers/mmc/host/omap_hsmmc.c                |    2 +-
>   17 files changed, 49 insertions(+), 49 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
> index cc42d47..ab0880b 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -149,7 +149,7 @@ static void __init omap_2430sdp_init_early(void)
>   }
>
>   static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
>   };
>
>   /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
> index 8950ecc..40b0174 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -410,15 +410,15 @@ static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
>   };
>
>   static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"),
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
>   };
>
>   static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
> -       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.0"),
> +       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
>   };
>
>   static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
>   };
>
>   /*
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index 1a943be..cca2fbc 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -367,13 +367,13 @@ static struct omap2_hsmmc_info mmc[] = {
>   static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
>          {
>                  .supply = "vmmc",
> -               .dev_name = "mmci-omap-hs.1",
> +               .dev_name = "omap_hsmmc.1",
>          },
>   };
>   static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
>          {
>                  .supply = "vmmc",
> -               .dev_name = "mmci-omap-hs.0",
> +               .dev_name = "omap_hsmmc.0",
>          },
>   };
>
> diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
> index 54abdd0..c9170f4 100644
> --- a/arch/arm/mach-omap2/board-devkit8000.c
> +++ b/arch/arm/mach-omap2/board-devkit8000.c
> @@ -140,7 +140,7 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
>   }
>
>   static struct regulator_consumer_supply devkit8000_vmmc1_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
>
>
>   /* ads7846 on SPI */
> diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
> index 54e6318..1877c28 100644
> --- a/arch/arm/mach-omap2/board-igep0020.c
> +++ b/arch/arm/mach-omap2/board-igep0020.c
> @@ -250,7 +250,7 @@ static inline void __init igep2_init_smsc911x(void) { }
>   #endif
>
>   static struct regulator_consumer_supply igep2_vmmc1_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
>
>   /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
>   static struct regulator_init_data igep2_vmmc1 = {
> @@ -268,7 +268,7 @@ static struct regulator_init_data igep2_vmmc1 = {
>   };
>
>   static struct regulator_consumer_supply igep2_vio_supply =
> -       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
>
>   static struct regulator_init_data igep2_vio = {
>          .constraints = {
> @@ -286,7 +286,7 @@ static struct regulator_init_data igep2_vio = {
>   };
>
>   static struct regulator_consumer_supply igep2_vmmc2_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
>
>   static struct regulator_init_data igep2_vmmc2 = {
>          .constraints            = {
> diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
> index d75028e..4273d06 100644
> --- a/arch/arm/mach-omap2/board-igep0030.c
> +++ b/arch/arm/mach-omap2/board-igep0030.c
> @@ -142,7 +142,7 @@ static void __init igep3_flash_init(void) {}
>   #endif
>
>   static struct regulator_consumer_supply igep3_vmmc1_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
>
>   /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
>   static struct regulator_init_data igep3_vmmc1 = {
> @@ -160,7 +160,7 @@ static struct regulator_init_data igep3_vmmc1 = {
>   };
>
>   static struct regulator_consumer_supply igep3_vio_supply =
> -       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
>
>   static struct regulator_init_data igep3_vio = {
>          .constraints = {
> @@ -178,7 +178,7 @@ static struct regulator_init_data igep3_vio = {
>   };
>
>   static struct regulator_consumer_supply igep3_vmmc2_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
>
>   static struct regulator_init_data igep3_vmmc2 = {
>          .constraints    = {
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 5364147..cccc817 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -605,7 +605,7 @@ static struct regulator_init_data omap3evm_vio = {
>
>   static struct regulator_consumer_supply omap3evm_vmmc2_supply = {
>          .supply                 = "vmmc",
> -       .dev_name               = "mmci-omap-hs.1",
> +       .dev_name               = "omap_hsmmc.1",
>   };
>
>   /* VMMC2 for driving the WL12xx module */
> diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
> index 17ef547..ed13869 100644
> --- a/arch/arm/mach-omap2/board-omap3pandora.c
> +++ b/arch/arm/mach-omap2/board-omap3pandora.c
> @@ -333,13 +333,13 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
>   };
>
>   static struct regulator_consumer_supply pandora_vmmc1_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
>
>   static struct regulator_consumer_supply pandora_vmmc2_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
>
>   static struct regulator_consumer_supply pandora_vmmc3_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
>
>   static struct regulator_consumer_supply pandora_vdda_dac_supply =
>          REGULATOR_SUPPLY("vdda_dac", "omapdss");
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index 3dd241b..12bf09a 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -180,13 +180,13 @@ static struct omap2_hsmmc_info mmc[] = {
>   static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
>          {
>                  .supply = "vmmc",
> -               .dev_name = "mmci-omap-hs.0",
> +               .dev_name = "omap_hsmmc.0",
>          },
>   };
>
>   static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
>          .supply = "vmmc",
> -       .dev_name = "mmci-omap-hs.4",
> +       .dev_name = "omap_hsmmc.4",
>   };
>
>   static struct regulator_init_data panda_vmmc5 = {
> diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
> index bdebcb7..2af8b05 100644
> --- a/arch/arm/mach-omap2/board-rm680.c
> +++ b/arch/arm/mach-omap2/board-rm680.c
> @@ -33,7 +33,7 @@
>   #include "sdram-nokia.h"
>
>   static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
>   };
>
>   /* Fixed regulator for internal eMMC */
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
> index e75e240..b74357f 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -331,13 +331,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
>   };
>
>   static struct regulator_consumer_supply rx51_vmmc1_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
>
>   static struct regulator_consumer_supply rx51_vaux3_supply =
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
>
>   static struct regulator_consumer_supply rx51_vsim_supply =
> -       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
> +       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
>
>   static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
>          /* tlv320aic3x analog supplies */
> @@ -348,7 +348,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
>          /* tpa6130a2 */
>          REGULATOR_SUPPLY("Vdd", "2-0060"),
>          /* Keep vmmc as last item. It is not iterated for newer boards */
> -       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
> +       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
>   };
>
>   static struct regulator_consumer_supply rx51_vio_supplies[] = {
> diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
> index e0e040f..7a098a4 100644
> --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
> +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
> @@ -118,7 +118,7 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
>
>   static struct regulator_consumer_supply zoom_vmmc3_supply = {
>          .supply         = "vmmc",
> -       .dev_name       = "mmci-omap-hs.2",
> +       .dev_name       = "omap_hsmmc.2",
>   };
>
>   /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
> diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
> index c047dcd..5c647ce 100644
> --- a/arch/arm/mach-omap2/clock2430_data.c
> +++ b/arch/arm/mach-omap2/clock2430_data.c
> @@ -1984,15 +1984,15 @@ static struct omap_clk omap2430_clks[] = {
>          CLK(NULL,       "pka_ick",&pka_ick,       CK_243X),
>          CLK(NULL,       "usb_fck",&usb_fck,       CK_243X),
>          CLK("musb-omap2430",    "ick",&usbhs_ick,     CK_243X),
> -       CLK("mmci-omap-hs.0", "ick",&mmchs1_ick,    CK_243X),
> -       CLK("mmci-omap-hs.0", "fck",&mmchs1_fck,    CK_243X),
> -       CLK("mmci-omap-hs.1", "ick",&mmchs2_ick,    CK_243X),
> -       CLK("mmci-omap-hs.1", "fck",&mmchs2_fck,    CK_243X),
> +       CLK("omap_hsmmc.0", "ick",&mmchs1_ick,    CK_243X),
> +       CLK("omap_hsmmc.0", "fck",&mmchs1_fck,    CK_243X),
> +       CLK("omap_hsmmc.1", "ick",&mmchs2_ick,    CK_243X),
> +       CLK("omap_hsmmc.1", "fck",&mmchs2_fck,    CK_243X),
>          CLK(NULL,       "gpio5_ick",&gpio5_ick,     CK_243X),
>          CLK(NULL,       "gpio5_fck",&gpio5_fck,     CK_243X),
>          CLK(NULL,       "mdm_intc_ick",&mdm_intc_ick,  CK_243X),
> -       CLK("mmci-omap-hs.0", "mmchsdb_fck",&mmchsdb1_fck,  CK_243X),
> -       CLK("mmci-omap-hs.1", "mmchsdb_fck",&mmchsdb2_fck,  CK_243X),
> +       CLK("omap_hsmmc.0", "mmchsdb_fck",&mmchsdb1_fck,  CK_243X),
> +       CLK("omap_hsmmc.1", "mmchsdb_fck",&mmchsdb2_fck,  CK_243X),
>   };
>
>   /*
> diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
> index f14d986..052ac32 100644
> --- a/arch/arm/mach-omap2/clock3xxx_data.c
> +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> @@ -3290,10 +3290,10 @@ static struct omap_clk omap3xxx_clks[] = {
>          CLK("omap-mcbsp.1",     "prcm_fck",&core_96m_fck,  CK_3XXX),
>          CLK("omap-mcbsp.5",     "prcm_fck",&core_96m_fck,  CK_3XXX),
>          CLK(NULL,       "core_96m_fck",&core_96m_fck,  CK_3XXX),
> -       CLK("mmci-omap-hs.2",   "fck",&mmchs3_fck,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
> -       CLK("mmci-omap-hs.1",   "fck",&mmchs2_fck,    CK_3XXX),
> +       CLK("omap_hsmmc.2",     "fck",&mmchs3_fck,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
> +       CLK("omap_hsmmc.1",     "fck",&mmchs2_fck,    CK_3XXX),
>          CLK(NULL,       "mspro_fck",&mspro_fck,     CK_34XX | CK_36XX),
> -       CLK("mmci-omap-hs.0",   "fck",&mmchs1_fck,    CK_3XXX),
> +       CLK("omap_hsmmc.0",     "fck",&mmchs1_fck,    CK_3XXX),
>          CLK("omap_i2c.3", "fck",&i2c3_fck,      CK_3XXX),
>          CLK("omap_i2c.2", "fck",&i2c2_fck,      CK_3XXX),
>          CLK("omap_i2c.1", "fck",&i2c1_fck,      CK_3XXX),
> @@ -3323,13 +3323,13 @@ static struct omap_clk omap3xxx_clks[] = {
>          CLK(NULL,       "core_l4_ick",&core_l4_ick,   CK_3XXX),
>          CLK(NULL,       "usbtll_ick",&usbtll_ick,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
>          CLK("ehci-omap.0",      "usbtll_ick",&usbtll_ick,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
> -       CLK("mmci-omap-hs.2",   "ick",&mmchs3_ick,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
> +       CLK("omap_hsmmc.2",     "ick",&mmchs3_ick,    CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
>          CLK(NULL,       "icr_ick",&icr_ick,       CK_34XX | CK_36XX),
>          CLK("omap-aes", "ick",&aes2_ick,      CK_34XX | CK_36XX),
>          CLK("omap-sham",        "ick",&sha12_ick,     CK_34XX | CK_36XX),
>          CLK(NULL,       "des2_ick",&des2_ick,      CK_34XX | CK_36XX),
> -       CLK("mmci-omap-hs.1",   "ick",&mmchs2_ick,    CK_3XXX),
> -       CLK("mmci-omap-hs.0",   "ick",&mmchs1_ick,    CK_3XXX),
> +       CLK("omap_hsmmc.1",     "ick",&mmchs2_ick,    CK_3XXX),
> +       CLK("omap_hsmmc.0",     "ick",&mmchs1_ick,    CK_3XXX),
>          CLK(NULL,       "mspro_ick",&mspro_ick,     CK_34XX | CK_36XX),
>          CLK("omap_hdq.0", "ick",&hdq_ick,       CK_3XXX),
>          CLK("omap2_mcspi.4", "ick",&mcspi4_ick,    CK_3XXX),
> diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
> index de9ec8d..fdbc042 100644
> --- a/arch/arm/mach-omap2/clock44xx_data.c
> +++ b/arch/arm/mach-omap2/clock44xx_data.c
> @@ -3158,11 +3158,11 @@ static struct omap_clk omap44xx_clks[] = {
>          CLK("omap2_mcspi.2",    "fck",&mcspi2_fck,    CK_443X),
>          CLK("omap2_mcspi.3",    "fck",&mcspi3_fck,    CK_443X),
>          CLK("omap2_mcspi.4",    "fck",&mcspi4_fck,    CK_443X),
> -       CLK("mmci-omap-hs.0",   "fck",&mmc1_fck,      CK_443X),
> -       CLK("mmci-omap-hs.1",   "fck",&mmc2_fck,      CK_443X),
> -       CLK("mmci-omap-hs.2",   "fck",&mmc3_fck,      CK_443X),
> -       CLK("mmci-omap-hs.3",   "fck",&mmc4_fck,      CK_443X),
> -       CLK("mmci-omap-hs.4",   "fck",&mmc5_fck,      CK_443X),
> +       CLK("omap_hsmmc.0",     "fck",&mmc1_fck,      CK_443X),
> +       CLK("omap_hsmmc.1",     "fck",&mmc2_fck,      CK_443X),
> +       CLK("omap_hsmmc.2",     "fck",&mmc3_fck,      CK_443X),
> +       CLK("omap_hsmmc.3",     "fck",&mmc4_fck,      CK_443X),
> +       CLK("omap_hsmmc.4",     "fck",&mmc5_fck,      CK_443X),
>          CLK(NULL,       "ocp2scp_usb_phy_phy_48m",&ocp2scp_usb_phy_phy_48m,       CK_443X),
>          CLK(NULL,       "ocp2scp_usb_phy_ick",&ocp2scp_usb_phy_ick,   CK_443X),
>          CLK(NULL,       "ocp_wp_noc_ick",&ocp_wp_noc_ick,        CK_443X),
> @@ -3245,11 +3245,11 @@ static struct omap_clk omap44xx_clks[] = {
>          CLK("omap_i2c.2",       "ick",&dummy_ck,      CK_443X),
>          CLK("omap_i2c.3",       "ick",&dummy_ck,      CK_443X),
>          CLK("omap_i2c.4",       "ick",&dummy_ck,      CK_443X),
> -       CLK("mmci-omap-hs.0",   "ick",&dummy_ck,      CK_443X),
> -       CLK("mmci-omap-hs.1",   "ick",&dummy_ck,      CK_443X),
> -       CLK("mmci-omap-hs.2",   "ick",&dummy_ck,      CK_443X),
> -       CLK("mmci-omap-hs.3",   "ick",&dummy_ck,      CK_443X),
> -       CLK("mmci-omap-hs.4",   "ick",&dummy_ck,      CK_443X),
> +       CLK("omap_hsmmc.0",     "ick",&dummy_ck,      CK_443X),
> +       CLK("omap_hsmmc.1",     "ick",&dummy_ck,      CK_443X),
> +       CLK("omap_hsmmc.2",     "ick",&dummy_ck,      CK_443X),
> +       CLK("omap_hsmmc.3",     "ick",&dummy_ck,      CK_443X),
> +       CLK("omap_hsmmc.4",     "ick",&dummy_ck,      CK_443X),
>          CLK("omap-mcbsp.1",     "ick",&dummy_ck,      CK_443X),
>          CLK("omap-mcbsp.2",     "ick",&dummy_ck,      CK_443X),
>          CLK("omap-mcbsp.3",     "ick",&dummy_ck,      CK_443X),
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index c370c75..9b31724 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -451,7 +451,7 @@ static int omap_mmc_init(struct omap_hwmod *oh, void *hsmmcinfo)
>          }
>
>          idx = c->mmc - 1 ;
> -       name = "mmci-omap-hs";
> +       name = "omap_hsmmc";
>          ohl = omap_hsmmc_latency;
>          ohl_cnt = ARRAY_SIZE(omap_hsmmc_latency);
>          omap_hsmmc_mux(mmc, idx);
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index d0bd2b4..191332b 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -118,7 +118,7 @@
>
>   #define MMC_TIMEOUT_MS         20
>   #define OMAP_MMC_MASTER_CLOCK  96000000
> -#define DRIVER_NAME            "mmci-omap-hs"
> +#define DRIVER_NAME            "omap_hsmmc"
>
>   /* Timeouts for entering power saving states on inactivity, msec */
>   #define OMAP_MMC_DISABLED_TIMEOUT      100
> --
> 1.7.1
>


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

* Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
  2011-02-25 12:50   ` Krishnamoorthy, Balaji T
@ 2011-02-25 13:28     ` Kadiyala, Kishore
  0 siblings, 0 replies; 16+ messages in thread
From: Kadiyala, Kishore @ 2011-02-25 13:28 UTC (permalink / raw)
  To: Krishnamoorthy, Balaji T
  Cc: linux-mmc, linux-omap, tony, cjb, madhu.cr, khilman, paul,
	b-cousson

On Fri, Feb 25, 2011 at 6:20 PM, Krishnamoorthy, Balaji T
<balajitk@ti.com> wrote:
> <snip>
>
>> -               if (cpu_is_omap44xx())
>> -                       mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
>> -               else
>> -                       mmc->reg_offset = 0;
>> +static struct omap_mmc_platform_data *mmc __initdata;
>
> can you pass this *mmc as another argument to omap_hsmmc_pdata_init
> so that this static initdata can be removed ?

Agree, will go with as said

>
>>
>> -               mmc->get_context_loss_count = hsmmc_get_context_loss;
>> +static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c)
>> +{
>> +               char *hc_name;
>>
>> -               mmc->slots[0].switch_pin = c->gpio_cd;
>> -               mmc->slots[0].gpio_wp = c->gpio_wp;
>> +       if (!c->mmc) {
>> +               pr_debug("MMC%d: no such controller\n", c->mmc);
>> +               return -ENXIO;
>> +       }
>>
>> -               mmc->slots[0].remux = c->remux;
>> -               mmc->slots[0].init_card = c->init_card;
>> +       hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL);
>> +       if (!hc_name) {
>> +               pr_err("Cannot allocate memory for controller slot name\n");
>> +               kfree(hc_name);
>> +               return -ENOMEM;
>> +       }
>>
>> -               if (c->cover_only)
>> -                       mmc->slots[0].cover = 1;
>> +       if (c->name)
>> +               strncpy(hc_name, c->name, HSMMC_NAME_LEN);
>> +       else
>> +               snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i",
>> +                                                               c->mmc, 1);
>> +       mmc->slots[0].name = hc_name;
>> +       mmc->nr_slots = 1;
>
> <snip>
>

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

* Re: [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework
  2011-02-24 23:32   ` Tony Lindgren
@ 2011-02-25 17:03     ` Kadiyala, Kishore
  0 siblings, 0 replies; 16+ messages in thread
From: Kadiyala, Kishore @ 2011-02-25 17:03 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-mmc, linux-omap, cjb, madhu.cr, khilman, paul, b-cousson

On Fri, Feb 25, 2011 at 5:02 AM, Tony Lindgren <tony@atomide.com> wrote:
> * Kishore Kadiyala <kishore.kadiyala@ti.com> [110224 11:17]:
>> Changes involves:
>> 1) Remove controller reset in devices.c which is taken care of
>>    by hwmod framework.
>> 2) Omap2420 platform consists of mmc block as in omap1 and not the
>>    hsmmc block as present in omap2430, omap3, omap4 platforms.
>>    Removing all base address macro defines except keeping one for OMAP2420.
>> 3) Using omap-device layer to register device and utilizing data from
>>    hwmod data file for base address, dma channel number, Irq_number,
>>    device attribute.
>> 4) Update the driver to use dev_attr to find whether controller
>>    supports dual volt cards
>
> This patch is too hard to read. Can you please split it into
> more readable patches?

Posted an updated version.

Regards,
Kishore

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

end of thread, other threads:[~2011-02-25 17:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 19:26 [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Kishore Kadiyala
2011-02-24 19:26 ` [PATCH v4 1/6] OMAP2430: hwmod data: Add HSMMC Kishore Kadiyala
2011-02-24 19:26 ` [PATCH v4 2/6] OMAP3: " Kishore Kadiyala
2011-02-24 19:26 ` [PATCH v4 3/6] OMAP4: hwmod data: enable HSMMC Kishore Kadiyala
2011-02-24 19:26 ` [PATCH v4 4/6] OMAP: hwmod data: Add dev_attr and use in the host driver Kishore Kadiyala
2011-02-25 13:15   ` Cousson, Benoit
2011-02-24 19:26 ` [PATCH v4 5/6] OMAP: adapt hsmmc to hwmod framework Kishore Kadiyala
2011-02-24 23:32   ` Tony Lindgren
2011-02-25 17:03     ` Kadiyala, Kishore
2011-02-25 12:50   ` Krishnamoorthy, Balaji T
2011-02-25 13:28     ` Kadiyala, Kishore
2011-02-24 19:26 ` [PATCH v4 6/6] OMAP: hsmmc: Rename the device and driver Kishore Kadiyala
2011-02-25 13:20   ` Cousson, Benoit
2011-02-25 12:54 ` [PATCH v4 0/6] OMAP: HSMMC: hwmod adaptation Cousson, Benoit
2011-02-25 13:06   ` Kadiyala, Kishore
2011-02-25 13:12     ` Cousson, Benoit

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