Skip to contentSkip to conversation

sh: sh4 scif pdata (sh7750/sh7760/sh4-202)

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

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 sh: sh4 scif pdata (sh7750/sh7760/sh4-202)

From: Magnus Damm <[email protected]>

This patch breaks out the sh4 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.

While at it, get rid of the R2D ifdef in the processor code and adjust the defconfigs to use ttySC1.

---

 arch/sh/configs/rts7751r2d1_defconfig    |    2 
 arch/sh/configs/rts7751r2dplus_defconfig |    2 
 arch/sh/kernel/cpu/sh4/setup-sh4-202.c   |   23 +++----
 arch/sh/kernel/cpu/sh4/setup-sh7750.c    |   47 +++++++++------
 arch/sh/kernel/cpu/sh4/setup-sh7760.c    |   89 ++++++++++++++++++++----------
 5 files changed, 100 insertions(+), 63 deletions(-)
arch/sh/configs/rts7751r2d1_defconfig +1 -1
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_OVERWRITE=y
 # CONFIG_CMDLINE_EXTEND is not set
-CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
+CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
 
 #
 # Bus options
arch/sh/configs/rts7751r2dplus_defconfig +1 -1
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_OVERWRITE=y
 # CONFIG_CMDLINE_EXTEND is not set
-CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
+CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
 
 #
 # Bus options
arch/sh/kernel/cpu/sh4/setup-sh4-202.c +10 -13
@@ -15,22 +15,18 @@
 #include <linux/sh_timer.h>
 #include <linux/io.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,
 	},
 };
 
@@ -127,7 +123,7 @@ static struct platform_device tmu2_devic
 };
 
 static struct platform_device *sh4202_devices[] __initdata = {
-	&sci_device,
+	&scif0_device,
 	&tmu0_device,
 	&tmu1_device,
 	&tmu2_device,
@@ -141,6 +137,7 @@ static int __init sh4202_devices_setup(v
 arch_initcall(sh4202_devices_setup);
 
 static struct platform_device *sh4202_early_devices[] __initdata = {
+	&scif0_device,
 	&tmu0_device,
 	&tmu1_device,
 	&tmu2_device,
arch/sh/kernel/cpu/sh4/setup-sh7750.c +27 -20

70 lines not on this page · raw message

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

111 lines not on this page · raw message