Skip to contentSkip to conversation

dove: support v7 mode

PATCH New Saeed Bishara 3 participants 6 messages May 6, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dove: support v7 mode

The CPU of dove can be configured to boot in v7 mode, this patch will enable building the kernel for that mode.

---
 arch/arm/mm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mm/Kconfig +1 -1
index 5bd7c89..e40a35a 100644
@@ -409,7 +409,7 @@ config CPU_32v6K
 
 # ARMv7
 config CPU_V7
-	bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
+	bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_DOVE
 	select CPU_32v6K if !ARCH_OMAP2
 	select CPU_32v7
 	select CPU_ABRT_EV7
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 Dove: platform device registration for the sdio interfaces

---
 arch/arm/mach-dove/common.c        |   61 ++++++++++++++++++++++++++++++++++++
 arch/arm/mach-dove/common.h        |    2 +
 arch/arm/mach-dove/dove-db-setup.c |    2 +
 3 files changed, 65 insertions(+), 0 deletions(-)
arch/arm/mach-dove/common.c +61 -0
index 5da2cf4..f7a1258 100644
@@ -752,6 +752,67 @@ void __init dove_xor1_init(void)
 	platform_device_register(&dove_xor11_channel);
 }
 
+/*****************************************************************************
+ * SDIO
+ ****************************************************************************/
+static u64 sdio_dmamask = DMA_BIT_MASK(32);
+
+static struct resource dove_sdio0_resources[] = {
+	{
+		.start	= DOVE_SDIO0_PHYS_BASE,
+		.end	= DOVE_SDIO0_PHYS_BASE + 0xff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= IRQ_DOVE_SDIO0,
+		.end	= IRQ_DOVE_SDIO0,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device dove_sdio0 = {
+	.name		= "sdhci-mv",
+	.id		= 0,
+	.dev		= {
+		.dma_mask		= &sdio_dmamask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	},
+	.resource	= dove_sdio0_resources,
+	.num_resources	= ARRAY_SIZE(dove_sdio0_resources),
+};
+
+void __init dove_sdio0_init(void)
+{
+	platform_device_register(&dove_sdio0);
+}
+
+static struct resource dove_sdio1_resources[] = {
+	{
+		.start	= DOVE_SDIO1_PHYS_BASE,
+		.end	= DOVE_SDIO1_PHYS_BASE + 0xff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= IRQ_DOVE_SDIO1,
+		.end	= IRQ_DOVE_SDIO1,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device dove_sdio1 = {
+	.name		= "sdhci-mv",
+	.id		= 1,
+	.dev		= {
+		.dma_mask		= &sdio_dmamask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	},
+	.resource	= dove_sdio1_resources,
+	.num_resources	= ARRAY_SIZE(dove_sdio1_resources),
+};
+
+void __init dove_sdio1_init(void)
+{
+	platform_device_register(&dove_sdio1);
+}
+
 void __init dove_init(void)
 {
 	int tclk;
arch/arm/mach-dove/common.h +2 -0
index b29e893..a51517c 100644
@@ -36,5 +36,7 @@ void dove_uart3_init(void);
 void dove_spi0_init(void);
 void dove_spi1_init(void);
 void dove_i2c_init(void);
+void dove_sdio0_init(void);
+void dove_sdio1_init(void);
 
 #endif
arch/arm/mach-dove/dove-db-setup.c +2 -0
index f2971b7..bef7046 100644
@@ -82,6 +82,8 @@ static void __init dove_db_init(void)
 	dove_ehci0_init();
 	dove_ehci1_init();
 	dove_sata_init(&dove_db_sata_data);
+	dove_sdio0_init();
+	dove_sdio1_init();
 	dove_spi0_init();
 	dove_spi1_init();
 	dove_uart0_init();
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 1/1 Dove: platform device registration for the sdio interfaces

Quoted 97 lines · Saeed Bishara

---

?arch/arm/mach-dove/common.c ? ? ? ?| ? 61 ++++++++++++++++++++++++++++++++++++
?arch/arm/mach-dove/common.h ? ? ? ?| ? ?2 +
?arch/arm/mach-dove/dove-db-setup.c | ? ?2 +

?3 files changed, 65 insertions(+), 0 deletions(-)

arch/arm/mach-dove/common.c +61 -0
index 5da2cf4..f7a1258 100644
@@ -752,6 +752,67 @@ void __init dove_xor1_init(void)
 ? ? ? ?platform_device_register(&dove_xor11_channel);
 ?}
 
+/*****************************************************************************
+ * SDIO
+ ****************************************************************************/
+static u64 sdio_dmamask = DMA_BIT_MASK(32);
+
+static struct resource dove_sdio0_resources[] = {
+ ? ? ? {
+ ? ? ? ? ? ? ? .start ?= DOVE_SDIO0_PHYS_BASE,
+ ? ? ? ? ? ? ? .end ? ?= DOVE_SDIO0_PHYS_BASE + 0xff,
+ ? ? ? ? ? ? ? .flags ?= IORESOURCE_MEM,
+ ? ? ? }, {
+ ? ? ? ? ? ? ? .start ?= IRQ_DOVE_SDIO0,
+ ? ? ? ? ? ? ? .end ? ?= IRQ_DOVE_SDIO0,
+ ? ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ,
+ ? ? ? },
+};
+
+static struct platform_device dove_sdio0 = {
+ ? ? ? .name ? ? ? ? ? = "sdhci-mv",
+ ? ? ? .id ? ? ? ? ? ? = 0,
+ ? ? ? .dev ? ? ? ? ? ?= {
+ ? ? ? ? ? ? ? .dma_mask ? ? ? ? ? ? ? = &sdio_dmamask,
+ ? ? ? ? ? ? ? .coherent_dma_mask ? ? ?= DMA_BIT_MASK(32),
+ ? ? ? },
+ ? ? ? .resource ? ? ? = dove_sdio0_resources,
+ ? ? ? .num_resources ?= ARRAY_SIZE(dove_sdio0_resources),
+};
+
+void __init dove_sdio0_init(void)
+{
+ ? ? ? platform_device_register(&dove_sdio0);
+}
+
+static struct resource dove_sdio1_resources[] = {
+ ? ? ? {
+ ? ? ? ? ? ? ? .start ?= DOVE_SDIO1_PHYS_BASE,
+ ? ? ? ? ? ? ? .end ? ?= DOVE_SDIO1_PHYS_BASE + 0xff,
+ ? ? ? ? ? ? ? .flags ?= IORESOURCE_MEM,
+ ? ? ? }, {
+ ? ? ? ? ? ? ? .start ?= IRQ_DOVE_SDIO1,
+ ? ? ? ? ? ? ? .end ? ?= IRQ_DOVE_SDIO1,
+ ? ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ,
+ ? ? ? },
+};
+
+static struct platform_device dove_sdio1 = {
+ ? ? ? .name ? ? ? ? ? = "sdhci-mv",
+ ? ? ? .id ? ? ? ? ? ? = 1,
+ ? ? ? .dev ? ? ? ? ? ?= {
+ ? ? ? ? ? ? ? .dma_mask ? ? ? ? ? ? ? = &sdio_dmamask,
+ ? ? ? ? ? ? ? .coherent_dma_mask ? ? ?= DMA_BIT_MASK(32),
+ ? ? ? },
+ ? ? ? .resource ? ? ? = dove_sdio1_resources,
+ ? ? ? .num_resources ?= ARRAY_SIZE(dove_sdio1_resources),
+};
+
+void __init dove_sdio1_init(void)
+{
+ ? ? ? platform_device_register(&dove_sdio1);
+}
+
 ?void __init dove_init(void)
 ?{
 ? ? ? ?int tclk;
arch/arm/mach-dove/common.h +2 -0
index b29e893..a51517c 100644
@@ -36,5 +36,7 @@ void dove_uart3_init(void);
 ?void dove_spi0_init(void);
 ?void dove_spi1_init(void);
 ?void dove_i2c_init(void);
+void dove_sdio0_init(void);
+void dove_sdio1_init(void);
 

?#endif

arch/arm/mach-dove/dove-db-setup.c +0 -0
index f2971b7..bef7046 100644

arch/arm/mach-dove/dove-db-setup.c static void __init dove_db_init(void) · line 89

Quoted 8 lines
arch/arm/mach-dove/dove-db-setup.c +2 -0
@@ -82,6 +82,8 @@ static void __init dove_db_init(void)
 ? ? ? ?dove_ehci0_init();
 ? ? ? ?dove_ehci1_init();
 ? ? ? ?dove_sata_init(&dove_db_sata_data);
+ ? ? ? dove_sdio0_init();
+ ? ? ? dove_sdio1_init();
 ? ? ? ?dove_spi0_init();
 ? ? ? ?dove_spi1_init();
 ? ? ? ?dove_uart0_init();

Looks fine.

#3 lore raw

PATCH 1/1 dove: support v7 mode

In reply to Saeed Bishara
Quoted 15 lines · Saeed Bishara

The CPU of dove can be configured to boot in v7 mode, this patch will enable building the kernel for that mode.

---
?arch/arm/mm/Kconfig | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

arch/arm/mm/Kconfig +0 -0
index 5bd7c89..e40a35a 100644
@@ -409,7 +409,7 @@ config CPU_32v6K
 

?# ARMv7
?config CPU_V7

Quoted 2 lines
- ? ? ? bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
+ ? ? ? bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_DOVE

Saeed,

I'd recommend ARCH_DOVE to select CPU_V7 instead.

Quoted 12 lines

? ? ? ?select CPU_32v6K if !ARCH_OMAP2
? ? ? ?select CPU_32v7
? ? ? ?select CPU_ABRT_EV7
--
1.6.0.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

PATCH 1/1 dove: support v7 mode

Quoted 3 lines

I'd recommend ARCH_DOVE to select CPU_V7 instead.

Eric, that will disable the support for v6

saeed

#5 lore raw

PATCH 1/1 dove: support v7 mode

Quoted 4 lines · saeed bishara
Quoted 3 lines

I'd recommend ARCH_DOVE to select CPU_V7 instead.

Eric, that will disable the support for v6

Ah, that's right. Sorry I overlooked.