|
From: Paul M. <le...@us...> - 2006-08-01 02:13:12
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/sh4 In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24470/arch/sh/kernel/cpu/sh4 Modified Files: setup-sh7780.c Log Message: Rewrite sh-sci for the driver model. All CPU subtypes are required to register a platform device with their port list defined (see the 7780 setup code as an example). Index: setup-sh7780.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/cpu/sh4/setup-sh7780.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- setup-sh7780.c 11 Jul 2006 07:57:40 -0000 1.1 +++ setup-sh7780.c 1 Aug 2006 02:13:08 -0000 1.2 @@ -9,6 +9,8 @@ */ #include <linux/platform_device.h> #include <linux/init.h> +#include <linux/serial.h> +#include <asm/sci.h> static struct resource rtc_resources[] = { [0] = { @@ -40,8 +42,33 @@ .resource = rtc_resources, }; +static struct plat_sci_port sci_platform_data[] = { + { + .mapbase = 0xffe00000, + .flags = UPF_BOOT_AUTOCONF, + .type = PORT_SCIF, + .irqs = { 40, 41, 43, 42 }, + }, { + .mapbase = 0xffe10000, + .flags = UPF_BOOT_AUTOCONF, + .type = PORT_SCIF, + .irqs = { 76, 77, 79, 78 }, + }, { + .flags = 0, + } +}; + +static struct platform_device sci_device = { + .name = "sh-sci", + .id = -1, + .dev = { + .platform_data = sci_platform_data, + }, +}; + static struct platform_device *sh7780_devices[] __initdata = { &rtc_device, + &sci_device, }; static int __init sh7780_devices_setup(void) |