Skip to contentSkip to conversation

sh-sci: convert sh4 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 12/13 sh-sci: convert sh4 cpus to single port devices

From: Magnus Damm <[email protected]>

Rework sh-sci platform data for sh4 processors such as:
sh775x, sh776x, sh4-202

---

 arch/sh/kernel/cpu/sh4/setup-sh4-202.c |   22 +++-----
 arch/sh/kernel/cpu/sh4/setup-sh7750.c  |   51 ++++++++++++-------
 arch/sh/kernel/cpu/sh4/setup-sh7760.c  |   84 +++++++++++++++++++++-----------
 3 files changed, 97 insertions(+), 60 deletions(-)
arch/sh/kernel/cpu/sh4/setup-sh4-202.c +9 -13
@@ -12,27 +12,23 @@
 #include <linux/serial.h>
 #include <linux/serial_sci.h>
 
-static struct plat_sci_port sci_platform_data[] = {
-	{
-		.mapbase	= 0xffe80000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 40, 41, 43, 42 },
-	}, {
-		.flags = 0,
-	}
+static struct plat_sci_port scif0_platform_data = {
+	.mapbase	= 0xffe80000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 40, 41, 43, 42 },
 };
 
-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 *sh4202_devices[] __initdata = {
-	&sci_device,
+	&scif0_device,
 };
 
 static int __init sh4202_devices_setup(void)
arch/sh/kernel/cpu/sh4/setup-sh7750.c +32 -19

67 lines not on this page · raw message

arch/sh/kernel/cpu/sh4/setup-sh7760.c +56 -28

98 lines not on this page · raw message