Skip to contentSkip to conversation

sh: sh3 scif pdata (sh7705/sh770x/sh7710/sh7720)

PATCH New Magnus Damm 1 participant 1 message Dec 14, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 3/7 sh: sh3 scif pdata (sh7705/sh770x/sh7710/sh7720)

From: Magnus Damm <[email protected]>

This patch breaks out the sh3 scif serial port platform data from a shared platform device to one platform device per port. Also, add serial ports to the list of early platform devices.

---

 arch/sh/kernel/cpu/sh3/setup-sh7705.c |   45 +++++++++++-------
 arch/sh/kernel/cpu/sh3/setup-sh770x.c |   80 ++++++++++++++++++++++-----------
 arch/sh/kernel/cpu/sh3/setup-sh7710.c |   44 ++++++++++--------
 arch/sh/kernel/cpu/sh3/setup-sh7720.c |   44 ++++++++++--------
 4 files changed, 134 insertions(+), 79 deletions(-)
arch/sh/kernel/cpu/sh3/setup-sh7705.c +27 -18
@@ -67,27 +67,33 @@ static struct intc_prio_reg prio_registe
 static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
 			 NULL, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-	{
-		.mapbase	= 0xa4410000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 56, 56, 56 },
-	}, {
-		.mapbase	= 0xa4400000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 52, 52, 52 },
-	}, {
-		.flags = 0,
-	}
+static struct plat_sci_port scif0_platform_data = {
+	.mapbase	= 0xa4410000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 56, 56, 56 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
 	.name		= "sh-sci",
-	.id		= -1,
+	.id		= 0,
+	.dev		= {
+		.platform_data	= &scif0_platform_data,
+	},
+};
+
+static struct plat_sci_port scif1_platform_data = {
+	.mapbase	= 0xa4400000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 52, 52, 52 },
+};
+
+static struct platform_device scif1_device = {
+	.name		= "sh-sci",
+	.id		= 1,
 	.dev		= {
-		.platform_data	= sci_platform_data,
+		.platform_data	= &scif1_platform_data,
 	},
 };
 
@@ -210,10 +216,11 @@ static struct platform_device tmu2_devic
 };
 
 static struct platform_device *sh7705_devices[] __initdata = {
+	&scif0_device,
+	&scif1_device,
 	&tmu0_device,
 	&tmu1_device,
 	&tmu2_device,
-	&sci_device,
 	&rtc_device,
 };
 
@@ -225,6 +232,8 @@ static int __init sh7705_devices_setup(v
 arch_initcall(sh7705_devices_setup);
 
 static struct platform_device *sh7705_early_devices[] __initdata = {
+	&scif0_device,
+	&scif1_device,
 	&tmu0_device,
 	&tmu1_device,
 	&tmu2_device,
arch/sh/kernel/cpu/sh3/setup-sh770x.c +55 -25

115 lines not on this page · raw message

arch/sh/kernel/cpu/sh3/setup-sh7710.c +26 -18

70 lines not on this page · raw message

arch/sh/kernel/cpu/sh3/setup-sh7720.c +26 -18

73 lines not on this page · raw message