Skip to contentSkip to conversation

sh-sci: sh4a single port devices and clock support

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

lore
Share & tools
lore
#0 lore raw

PATCH 13/13 sh-sci: sh4a single port devices and clock support

From: Magnus Damm <[email protected]>

Rework sh-sci platform data for sh4a processors such as:
sh7343, sh7366, sh7722, sh7723, sh7763, sh7780, sh7785, shx3

Also add clock framework data for SuperH Mobile processors.

---

 arch/sh/kernel/cpu/sh4a/setup-sh7343.c |   89 ++++++++++++++-------
 arch/sh/kernel/cpu/sh4a/setup-sh7366.c |   23 ++---
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |   66 ++++++++++-----
 arch/sh/kernel/cpu/sh4a/setup-sh7723.c |  133 ++++++++++++++++++++++----------
 arch/sh/kernel/cpu/sh4a/setup-sh7763.c |   64 +++++++++------
 arch/sh/kernel/cpu/sh4a/setup-sh7780.c |   43 ++++++----
 arch/sh/kernel/cpu/sh4a/setup-sh7785.c |  128 ++++++++++++++++++++----------
 arch/sh/kernel/cpu/sh4a/setup-shx3.c   |   85 +++++++++++++-------
 8 files changed, 418 insertions(+), 213 deletions(-)
arch/sh/kernel/cpu/sh4a/setup-sh7343.c +61 -28
@@ -140,44 +140,77 @@ static struct platform_device jpu_device
 	.num_resources	= ARRAY_SIZE(jpu_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-	{
-		.mapbase	= 0xffe00000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 80, 80, 80, 80 },
-	}, {
-		.mapbase	= 0xffe10000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 81, 81, 81, 81 },
-	}, {
-		.mapbase	= 0xffe20000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 82, 82, 82, 82 },
-	}, {
-		.mapbase	= 0xffe30000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 83, 83, 83, 83 },
-	}, {
-		.flags = 0,
-	}
+static struct plat_sci_port scif0_platform_data = {
+	.mapbase	= 0xffe00000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 80, 80, 80, 80 },
+	.clk		= "scif0",
 };
 
-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 plat_sci_port scif1_platform_data = {
+	.mapbase	= 0xffe10000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 81, 81, 81, 81 },
+	.clk		= "scif1",
+};
+
+static struct platform_device scif1_device = {
+	.name		= "sh-sci",
+	.id		= 1,
+	.dev		= {
+		.platform_data	= &scif1_platform_data,
+	},
+};
+
+static struct plat_sci_port scif2_platform_data = {
+	.mapbase	= 0xffe20000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 82, 82, 82, 82 },
+	.clk		= "scif2",
+};
+
+static struct platform_device scif2_device = {
+	.name		= "sh-sci",
+	.id		= 2,
+	.dev		= {
+		.platform_data	= &scif2_platform_data,
+	},
+};
+
+static struct plat_sci_port scif3_platform_data = {
+	.mapbase	= 0xffe30000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 83, 83, 83, 83 },
+	.clk		= "scif3",
+};
+
+static struct platform_device scif3_device = {
+	.name		= "sh-sci",
+	.id		= 3,
+	.dev		= {
+		.platform_data	= &scif3_platform_data,
 	},
 };
 
 static struct platform_device *sh7343_devices[] __initdata = {
 	&iic0_device,
 	&iic1_device,
-	&sci_device,
+	&scif0_device,
+	&scif1_device,
+	&scif2_device,
+	&scif3_device,
 	&vpu_device,
 	&veu_device,
 	&jpu_device,
arch/sh/kernel/cpu/sh4a/setup-sh7366.c +10 -13
@@ -147,28 +147,25 @@ static struct platform_device veu1_devic
 	.num_resources	= ARRAY_SIZE(veu1_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-	{
-		.mapbase	= 0xffe00000,
-		.flags		= UPF_BOOT_AUTOCONF,
-		.type		= PORT_SCIF,
-		.irqs		= { 80, 80, 80, 80 },
-	}, {
-		.flags = 0,
-	}
+static struct plat_sci_port scif0_platform_data = {
+	.mapbase	= 0xffe00000,
+	.flags		= UPF_BOOT_AUTOCONF,
+	.type		= PORT_SCIF,
+	.irqs		= { 80, 80, 80, 80 },
+	.clk		= "scif0",
 };
 
-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 *sh7366_devices[] __initdata = {
 	&iic_device,
-	&sci_device,
+	&scif0_device,
 	&usb_host_device,
 	&vpu_device,
 	&veu0_device,
arch/sh/kernel/cpu/sh4a/setup-sh7722.c +42 -24

84 lines not on this page · raw message

arch/sh/kernel/cpu/sh4a/setup-sh7723.c +95 -38

149 lines not on this page · raw message

arch/sh/kernel/cpu/sh4a/setup-sh7763.c +41 -23

80 lines not on this page · raw message

arch/sh/kernel/cpu/sh4a/setup-sh7780.c +25 -18

58 lines not on this page · raw message

arch/sh/kernel/cpu/sh4a/setup-sh7785.c +87 -41

144 lines not on this page · raw message

arch/sh/kernel/cpu/sh4a/setup-shx3.c +57 -28

99 lines not on this page · raw message