Skip to contentSkip to conversation

sh-sci: convert sh2a cpus to single port devices

PATCH New Magnus Damm 1 participant 1 message Jan 21, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 10/13 sh-sci: convert sh2a cpus to single port devices

From: Magnus Damm <[email protected]>

Rework sh-sci platform data for sh2a processors such as:
sh7201, sh7203, sh7206 and mxh

---

 arch/sh/kernel/cpu/sh2a/setup-mxg.c    |   22 +---
 arch/sh/kernel/cpu/sh2a/setup-sh7201.c |  168 ++++++++++++++++++++++----------
 arch/sh/kernel/cpu/sh2a/setup-sh7203.c |   85 ++++++++++------
 arch/sh/kernel/cpu/sh2a/setup-sh7206.c |   85 ++++++++++------
 4 files changed, 243 insertions(+), 117 deletions(-)
arch/sh/kernel/cpu/sh2a/setup-mxg.c +9 -13
@@ -132,27 +132,23 @@ static struct intc_mask_reg mask_registe
 static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
 			 mask_registers, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-	{
-		.mapbase	= 0xff804000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 223, 220, 221, 222 },
-	}, {
-		.flags = 0,
-	}
+static struct plat_sci_port scif0_platform_data = {
+	.mapbase	= 0xff804000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 223, 220, 221, 222 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
 	.name		= "sh-sci",
-	.id		= -1,
+	.id		= 0,
 	.dev		= {
-		.platform_data	= sci_platform_data,
+		.platform_data	= &scif0_platform_data,
 	},
 };
 
 static struct platform_device *mxg_devices[] __initdata = {
-	&sci_device,
+	&scif0_device,
 };
 
 static int __init mxg_devices_setup(void)
arch/sh/kernel/cpu/sh2a/setup-sh7201.c +120 -48

187 lines not on this page · raw message

arch/sh/kernel/cpu/sh2a/setup-sh7203.c +57 -28

101 lines not on this page · raw message

arch/sh/kernel/cpu/sh2a/setup-sh7206.c +57 -28

99 lines not on this page · raw message