public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] PLAT: OMAP: Add device configuration to support second HSMMC slot on OMAP 2430 and 3430 boards.
@ 2008-03-20 14:25 Carlos Aguiar
  2008-03-21  0:44 ` Seth Forshee
  0 siblings, 1 reply; 8+ messages in thread
From: Carlos Aguiar @ 2008-03-20 14:25 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap

From: Jarkko Lavinen <jarkko.lavinen@nokia.com>

This patch adds device configuration to provide second HSMMC slot support
on OMAP 2430 and 3430 boards.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
---
 arch/arm/plat-omap/devices.c |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index ec9a999..3ac2b9b 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -155,13 +155,29 @@ static inline void omap_init_kp(void) {}
 	|| defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
 
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
+#define OMAP_MMC_NAME		"hsmmc-omap"
+
 #define	OMAP_MMC1_BASE		0x4809c000
+#define OMAP_MMC1_END		OMAP_MMC1_BASE + 0x1fc
 #define OMAP_MMC1_INT		INT_24XX_MMC_IRQ
+
+#define OMAP_MMC2_BASE		0x480b4000
+#define OMAP_MMC2_END		OMAP_MMC2_BASE + 0x1fc
+#define OMAP_MMC2_INT		INT_24XX_MMC_IRQ
+
 #else
+
+#define OMAP_MMC_NAME		"mmci-omap"
+
 #define	OMAP_MMC1_BASE		0xfffb7800
+#define OMAP_MMC1_END		OMAP_MMC1_BASE + 0x7f
 #define OMAP_MMC1_INT		INT_MMC
-#endif
+
 #define	OMAP_MMC2_BASE		0xfffb7c00	/* omap16xx only */
+#define OMAP_MMC2_END		OMAP_MMC2_BASE + 0x7f
+#define OMAP_MMC2_INT		INT_1610_MMC2
+
+#endif
 
 static struct omap_mmc_platform_data mmc1_data;
 
@@ -170,7 +186,7 @@ static u64 mmc1_dmamask = 0xffffffff;
 static struct resource mmc1_resources[] = {
 	{
 		.start		= OMAP_MMC1_BASE,
-		.end		= OMAP_MMC1_BASE + 0x7f,
+		.end		= OMAP_MMC1_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
@@ -180,7 +196,7 @@ static struct resource mmc1_resources[] = {
 };
 
 static struct platform_device mmc_omap_device1 = {
-	.name		= "mmci-omap",
+	.name		= OMAP_MMC_NAME,
 	.id		= 1,
 	.dev = {
 		.dma_mask	= &mmc1_dmamask,
@@ -190,7 +206,8 @@ static struct platform_device mmc_omap_device1 = {
 	.resource	= mmc1_resources,
 };
 
-#ifdef	CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) \
+	|| defined(CONFIG_ARCH_OMAP34XX)
 
 static struct omap_mmc_platform_data mmc2_data;
 
@@ -200,17 +217,17 @@ static u64 mmc2_dmamask = 0xffffffff;
 static struct resource mmc2_resources[] = {
 	{
 		.start		= OMAP_MMC2_BASE,
-		.end		= OMAP_MMC2_BASE + 0x7f,
+		.end		= OMAP_MMC2_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
-		.start		= INT_1610_MMC2,
+		.start		= OMAP_MMC2_INT,
 		.flags		= IORESOURCE_IRQ,
 	},
 };
 
 static struct platform_device mmc_omap_device2 = {
-	.name		= "mmci-omap",
+	.name		= OMAP_MMC_NAME,
 	.id		= 2,
 	.dev = {
 		.dma_mask	= &mmc2_dmamask,
@@ -235,8 +252,11 @@ static void __init omap_init_mmc(void)
 	mmc = &mmc_conf->mmc[0];
 
 	if (cpu_is_omap2430() || cpu_is_omap34xx()) {
-		if (mmc->enabled)
+		mmc = &mmc_conf->mmc[1];
+		if (mmc->enabled) {
 			(void) platform_device_register(&mmc_omap_device1);
+			(void) platform_device_register(&mmc_omap_device2);
+		}
 		return;
 	}
 
@@ -329,7 +349,8 @@ void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info)
 	case 1:
 		mmc1_data = *info;
 		break;
-#ifdef CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) \
+	       || defined(CONFIG_ARCH_OMAP34XX)
 	case 2:
 		mmc2_data = *info;
 		break;
-- 1.5.3.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/1] PLAT: OMAP: Add device configuration to support second HSMMC slot on OMAP 2430 and 3430 boards.
@ 2008-03-31 12:52 Carlos Aguiar
  0 siblings, 0 replies; 8+ messages in thread
From: Carlos Aguiar @ 2008-03-31 12:52 UTC (permalink / raw)
  To: linux-omap

From: Jarkko Lavinen <jarkko.lavinen@nokia.com>

This patch adds device configuration to provide second HSMMC slot support
on OMAP 2430 and 3430 boards.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>

Change CONFIG_ARCH_OMAP24XX by CONFIG_ARCH_OMAP243X macro when this config
is needed only for 2430 boards.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
---
 arch/arm/plat-omap/devices.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index ec9a999..ddfc88b 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -156,12 +156,24 @@ static inline void omap_init_kp(void) {}
 
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
 #define	OMAP_MMC1_BASE		0x4809c000
-#define OMAP_MMC1_INT		INT_24XX_MMC_IRQ
+#define	OMAP_MMC1_END		OMAP_MMC1_BASE + 0x1fc
+#define	OMAP_MMC1_INT		INT_24XX_MMC_IRQ
+
+#define	OMAP_MMC2_BASE		0x480b4000
+#define	OMAP_MMC2_END		OMAP_MMC2_BASE + 0x1fc
+#define	OMAP_MMC2_INT		INT_24XX_MMC_IRQ
+
 #else
+
 #define	OMAP_MMC1_BASE		0xfffb7800
+#define	OMAP_MMC1_END		OMAP_MMC1_BASE + 0x7f
 #define OMAP_MMC1_INT		INT_MMC
-#endif
+
 #define	OMAP_MMC2_BASE		0xfffb7c00	/* omap16xx only */
+#define	OMAP_MMC2_END		OMAP_MMC2_BASE + 0x7f
+#define	OMAP_MMC2_INT		INT_1610_MMC2
+
+#endif
 
 static struct omap_mmc_platform_data mmc1_data;
 
@@ -170,7 +182,7 @@ static u64 mmc1_dmamask = 0xffffffff;
 static struct resource mmc1_resources[] = {
 	{
 		.start		= OMAP_MMC1_BASE,
-		.end		= OMAP_MMC1_BASE + 0x7f,
+		.end		= OMAP_MMC1_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
@@ -190,7 +202,8 @@ static struct platform_device mmc_omap_device1 = {
 	.resource	= mmc1_resources,
 };
 
-#ifdef	CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+	defined(CONFIG_ARCH_OMAP34XX)
 
 static struct omap_mmc_platform_data mmc2_data;
 
@@ -200,11 +213,11 @@ static u64 mmc2_dmamask = 0xffffffff;
 static struct resource mmc2_resources[] = {
 	{
 		.start		= OMAP_MMC2_BASE,
-		.end		= OMAP_MMC2_BASE + 0x7f,
+		.end		= OMAP_MMC2_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
-		.start		= INT_1610_MMC2,
+		.start		= OMAP_MMC2_INT,
 		.flags		= IORESOURCE_IRQ,
 	},
 };
@@ -237,6 +250,13 @@ static void __init omap_init_mmc(void)
 	if (cpu_is_omap2430() || cpu_is_omap34xx()) {
 		if (mmc->enabled)
 			(void) platform_device_register(&mmc_omap_device1);
+
+#if defined(CONFIG_ARCH_OMAP243X) || defined(CONFIG_ARCH_OMAP34XX)
+		mmc = &mmc_conf->mmc[1];
+		if (mmc->enabled)
+			(void) platform_device_register(&mmc_omap_device2);
+#endif
+
 		return;
 	}
 
@@ -329,7 +349,8 @@ void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info)
 	case 1:
 		mmc1_data = *info;
 		break;
-#ifdef CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+	defined(CONFIG_ARCH_OMAP34XX)
 	case 2:
 		mmc2_data = *info;
 		break;
-- 1.5.3.GIT


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/1] PLAT: OMAP: Add device configuration to support second HSMMC slot on OMAP 2430 and 3430 boards.
@ 2008-03-31 20:06 Carlos Aguiar
  2008-03-31 20:52 ` Francisco Alecrim
  0 siblings, 1 reply; 8+ messages in thread
From: Carlos Aguiar @ 2008-03-31 20:06 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

From: Jarkko Lavinen <jarkko.lavinen@nokia.com>

This patch adds device configuration to provide second HSMMC slot support
on OMAP 2430 and 3430 boards.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>

Change CONFIG_ARCH_OMAP24XX by CONFIG_ARCH_OMAP243X macro when this config
is needed only for 2430 boards.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
---
 arch/arm/plat-omap/devices.c |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index ec9a999..6f07451 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -156,12 +156,24 @@ static inline void omap_init_kp(void) {}
 
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
 #define	OMAP_MMC1_BASE		0x4809c000
-#define OMAP_MMC1_INT		INT_24XX_MMC_IRQ
+#define	OMAP_MMC1_END		OMAP_MMC1_BASE + 0x1fc
+#define	OMAP_MMC1_INT		INT_24XX_MMC_IRQ
+
+#define	OMAP_MMC2_BASE		0x480b4000
+#define	OMAP_MMC2_END		OMAP_MMC2_BASE + 0x1fc
+#define	OMAP_MMC2_INT		INT_24XX_MMC2_IRQ
+
 #else
+
 #define	OMAP_MMC1_BASE		0xfffb7800
+#define	OMAP_MMC1_END		OMAP_MMC1_BASE + 0x7f
 #define OMAP_MMC1_INT		INT_MMC
-#endif
+
 #define	OMAP_MMC2_BASE		0xfffb7c00	/* omap16xx only */
+#define	OMAP_MMC2_END		OMAP_MMC2_BASE + 0x7f
+#define	OMAP_MMC2_INT		INT_1610_MMC2
+
+#endif
 
 static struct omap_mmc_platform_data mmc1_data;
 
@@ -170,7 +182,7 @@ static u64 mmc1_dmamask = 0xffffffff;
 static struct resource mmc1_resources[] = {
 	{
 		.start		= OMAP_MMC1_BASE,
-		.end		= OMAP_MMC1_BASE + 0x7f,
+		.end		= OMAP_MMC1_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
@@ -190,7 +202,8 @@ static struct platform_device mmc_omap_device1 = {
 	.resource	= mmc1_resources,
 };
 
-#ifdef	CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+	defined(CONFIG_ARCH_OMAP34XX)
 
 static struct omap_mmc_platform_data mmc2_data;
 
@@ -200,11 +213,11 @@ static u64 mmc2_dmamask = 0xffffffff;
 static struct resource mmc2_resources[] = {
 	{
 		.start		= OMAP_MMC2_BASE,
-		.end		= OMAP_MMC2_BASE + 0x7f,
+		.end		= OMAP_MMC2_END,
 		.flags		= IORESOURCE_MEM,
 	},
 	{
-		.start		= INT_1610_MMC2,
+		.start		= OMAP_MMC2_INT,
 		.flags		= IORESOURCE_IRQ,
 	},
 };
@@ -237,6 +250,13 @@ static void __init omap_init_mmc(void)
 	if (cpu_is_omap2430() || cpu_is_omap34xx()) {
 		if (mmc->enabled)
 			(void) platform_device_register(&mmc_omap_device1);
+
+#if defined(CONFIG_ARCH_OMAP243X) || defined(CONFIG_ARCH_OMAP34XX)
+		mmc = &mmc_conf->mmc[1];
+		if (mmc->enabled)
+			(void) platform_device_register(&mmc_omap_device2);
+#endif
+
 		return;
 	}
 
@@ -329,7 +349,8 @@ void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info)
 	case 1:
 		mmc1_data = *info;
 		break;
-#ifdef CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+	defined(CONFIG_ARCH_OMAP34XX)
 	case 2:
 		mmc2_data = *info;
 		break;
-- 1.5.3.GIT


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

end of thread, other threads:[~2008-04-02  7:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20 14:25 [PATCH 1/1] PLAT: OMAP: Add device configuration to support second HSMMC slot on OMAP 2430 and 3430 boards Carlos Aguiar
2008-03-21  0:44 ` Seth Forshee
2008-03-24  2:10   ` Seth Forshee
2008-03-28 10:31     ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-03-31 12:52 Carlos Aguiar
2008-03-31 20:06 Carlos Aguiar
2008-03-31 20:52 ` Francisco Alecrim
2008-04-02  7:19   ` Tony Lindgren

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