diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 04:30:35 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 04:30:35 -0400 |
| commit | 7dec62e96b38e6c62490ea5dc6939dd8d680a8b8 (patch) | |
| tree | 57d3173abbafb5093cb639362358f788d57de2f1 | |
| parent | 237b98f61d02499ee248ae33cad616d950c15f49 (diff) | |
sh: Add setup code for various CPU subtypes.
This adds some simple setup code for most of the CPU subtypes,
primarily simple platform device registration.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/Makefile | 8 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7300.c | 43 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7705.c | 48 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7708.c | 43 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7709.c | 53 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/Makefile | 6 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 43 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh73180.c | 43 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7750.c | 48 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7760.c | 53 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7770.c | 53 |
11 files changed, 441 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index b54dbb9a0c86..1b292ae16f07 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
| @@ -4,6 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | obj-y := ex.o probe.o | 5 | obj-y := ex.o probe.o |
| 6 | 6 | ||
| 7 | # CPU subtype setup | ||
| 8 | obj-$(CONFIG_CPU_SUBTYPE_SH7705) += setup-sh7705.o | ||
| 9 | obj-$(CONFIG_CPU_SUBTYPE_SH7707) += setup-sh7709.o | ||
| 10 | obj-$(CONFIG_CPU_SUBTYPE_SH7708) += setup-sh7708.o | ||
| 11 | obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh7709.o | ||
| 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7300) += setup-sh7300.o | ||
| 13 | |||
| 14 | # Primary on-chip clocks (common) | ||
| 7 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o | 15 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o |
| 8 | clock-$(CONFIG_CPU_SUBTYPE_SH7300) := clock-sh7300.o | 16 | clock-$(CONFIG_CPU_SUBTYPE_SH7300) := clock-sh7300.o |
| 9 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o | 17 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7300.c b/arch/sh/kernel/cpu/sh3/setup-sh7300.c new file mode 100644 index 000000000000..ab4d204bfba5 --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/setup-sh7300.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * SH7300 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xa4430000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCI, | ||
| 20 | .irqs = { 80, 80, 80, 80 }, | ||
| 21 | }, { | ||
| 22 | .flags = 0, | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 | static struct platform_device sci_device = { | ||
| 27 | .name = "sh-sci", | ||
| 28 | .id = -1, | ||
| 29 | .dev = { | ||
| 30 | .platform_data = sci_platform_data, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct platform_device *sh7300_devices[] __initdata = { | ||
| 35 | &sci_device, | ||
| 36 | }; | ||
| 37 | |||
| 38 | static int __init sh7300_devices_setup(void) | ||
| 39 | { | ||
| 40 | return platform_add_devices(sh7300_devices, | ||
| 41 | ARRAY_SIZE(sh7300_devices)); | ||
| 42 | } | ||
| 43 | __initcall(sh7300_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c new file mode 100644 index 000000000000..a8e41c5241fa --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * SH7705 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xa4400000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCIF, | ||
| 20 | .irqs = { 52, 53, 55, 54 }, | ||
| 21 | }, { | ||
| 22 | .mapbase = 0xa4410000, | ||
| 23 | .flags = UPF_BOOT_AUTOCONF, | ||
| 24 | .type = PORT_SCIF, | ||
| 25 | .irqs = { 56, 57, 59, 58 }, | ||
| 26 | }, { | ||
| 27 | .flags = 0, | ||
| 28 | } | ||
| 29 | }; | ||
| 30 | |||
| 31 | static struct platform_device sci_device = { | ||
| 32 | .name = "sh-sci", | ||
| 33 | .id = -1, | ||
| 34 | .dev = { | ||
| 35 | .platform_data = sci_platform_data, | ||
| 36 | }, | ||
| 37 | }; | ||
| 38 | |||
| 39 | static struct platform_device *sh7705_devices[] __initdata = { | ||
| 40 | &sci_device, | ||
| 41 | }; | ||
| 42 | |||
| 43 | static int __init sh7705_devices_setup(void) | ||
| 44 | { | ||
| 45 | return platform_add_devices(sh7705_devices, | ||
| 46 | ARRAY_SIZE(sh7705_devices)); | ||
| 47 | } | ||
| 48 | __initcall(sh7705_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7708.c b/arch/sh/kernel/cpu/sh3/setup-sh7708.c new file mode 100644 index 000000000000..f933723911ca --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/setup-sh7708.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * SH7708 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xfffffe80, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCI, | ||
| 20 | .irqs = { 23, 24, 25, 0 }, | ||
| 21 | }, { | ||
| 22 | .flags = 0, | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 | static struct platform_device sci_device = { | ||
| 27 | .name = "sh-sci", | ||
| 28 | .id = -1, | ||
| 29 | .dev = { | ||
| 30 | .platform_data = sci_platform_data, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct platform_device *sh7708_devices[] __initdata = { | ||
| 35 | &sci_device, | ||
| 36 | }; | ||
| 37 | |||
| 38 | static int __init sh7708_devices_setup(void) | ||
| 39 | { | ||
| 40 | return platform_add_devices(sh7708_devices, | ||
| 41 | ARRAY_SIZE(sh7708_devices)); | ||
| 42 | } | ||
| 43 | __initcall(sh7708_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7709.c b/arch/sh/kernel/cpu/sh3/setup-sh7709.c new file mode 100644 index 000000000000..ff43ef2a1f0c --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/setup-sh7709.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * SH7707/SH7709 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xfffffe80, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCI, | ||
| 20 | .irqs = { 23, 24, 25, 0 }, | ||
| 21 | }, { | ||
| 22 | .mapbase = 0xa4000150, | ||
| 23 | .flags = UPF_BOOT_AUTOCONF, | ||
| 24 | .type = PORT_SCIF, | ||
| 25 | .irqs = { 56, 57, 59, 58 }, | ||
| 26 | }, { | ||
| 27 | .mapbase = 0xa4000140, | ||
| 28 | .flags = UPF_BOOT_AUTOCONF, | ||
| 29 | .type = PORT_IRDA, | ||
| 30 | .irqs = { 52, 53, 55, 54 }, | ||
| 31 | }, { | ||
| 32 | .flags = 0, | ||
| 33 | } | ||
| 34 | }; | ||
| 35 | |||
| 36 | static struct platform_device sci_device = { | ||
| 37 | .name = "sh-sci", | ||
| 38 | .id = -1, | ||
| 39 | .dev = { | ||
| 40 | .platform_data = sci_platform_data, | ||
| 41 | }, | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct platform_device *sh7709_devices[] __initdata = { | ||
| 45 | &sci_device, | ||
| 46 | }; | ||
| 47 | |||
| 48 | static int __init sh7709_devices_setup(void) | ||
| 49 | { | ||
| 50 | return platform_add_devices(sh7709_devices, | ||
| 51 | ARRAY_SIZE(sh7709_devices)); | ||
| 52 | } | ||
| 53 | __initcall(sh7709_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile index 9611fab03b55..48946d54a2cd 100644 --- a/arch/sh/kernel/cpu/sh4/Makefile +++ b/arch/sh/kernel/cpu/sh4/Makefile | |||
| @@ -8,7 +8,13 @@ obj-$(CONFIG_SH_FPU) += fpu.o | |||
| 8 | obj-$(CONFIG_SH_STORE_QUEUES) += sq.o | 8 | obj-$(CONFIG_SH_STORE_QUEUES) += sq.o |
| 9 | 9 | ||
| 10 | # CPU subtype setup | 10 | # CPU subtype setup |
| 11 | obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o | ||
| 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o | ||
| 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o | ||
| 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | ||
| 11 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | 15 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o |
| 16 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
| 17 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o | ||
| 12 | 18 | ||
| 13 | # Primary on-chip clocks (common) | 19 | # Primary on-chip clocks (common) |
| 14 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o | 20 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c new file mode 100644 index 000000000000..6e4e96541358 --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * SH4-202 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xffe80000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCIF, | ||
| 20 | .irqs = { 40, 41, 43, 42 }, | ||
| 21 | }, { | ||
| 22 | .flags = 0, | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 | static struct platform_device sci_device = { | ||
| 27 | .name = "sh-sci", | ||
| 28 | .id = -1, | ||
| 29 | .dev = { | ||
| 30 | .platform_data = sci_platform_data, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct platform_device *sh4202_devices[] __initdata = { | ||
| 35 | &sci_device, | ||
| 36 | }; | ||
| 37 | |||
| 38 | static int __init sh4202_devices_setup(void) | ||
| 39 | { | ||
| 40 | return platform_add_devices(sh4202_devices, | ||
| 41 | ARRAY_SIZE(sh4202_devices)); | ||
| 42 | } | ||
| 43 | __initcall(sh4202_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh73180.c b/arch/sh/kernel/cpu/sh4/setup-sh73180.c new file mode 100644 index 000000000000..cc9ea1e2e5df --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh73180.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * SH73180 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xffe80000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCIF, | ||
| 20 | .irqs = { 80, 81, 83, 82 }, | ||
| 21 | }, { | ||
| 22 | .flags = 0, | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 | static struct platform_device sci_device = { | ||
| 27 | .name = "sh-sci", | ||
| 28 | .id = -1, | ||
| 29 | .dev = { | ||
| 30 | .platform_data = sci_platform_data, | ||
| 31 | }, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct platform_device *sh73180_devices[] __initdata = { | ||
| 35 | &sci_device, | ||
| 36 | }; | ||
| 37 | |||
| 38 | static int __init sh73180_devices_setup(void) | ||
| 39 | { | ||
| 40 | return platform_add_devices(sh73180_devices, | ||
| 41 | ARRAY_SIZE(sh73180_devices)); | ||
| 42 | } | ||
| 43 | __initcall(sh73180_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c new file mode 100644 index 000000000000..50812d57c1c1 --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * SH7750/SH7751 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xffe00000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCI, | ||
| 20 | .irqs = { 23, 24, 25, 0 }, | ||
| 21 | }, { | ||
| 22 | .mapbase = 0xffe80000, | ||
| 23 | .flags = UPF_BOOT_AUTOCONF, | ||
| 24 | .type = PORT_SCIF, | ||
| 25 | .irqs = { 40, 41, 43, 42 }, | ||
| 26 | }, { | ||
| 27 | .flags = 0, | ||
| 28 | } | ||
| 29 | }; | ||
| 30 | |||
| 31 | static struct platform_device sci_device = { | ||
| 32 | .name = "sh-sci", | ||
| 33 | .id = -1, | ||
| 34 | .dev = { | ||
| 35 | .platform_data = sci_platform_data, | ||
| 36 | }, | ||
| 37 | }; | ||
| 38 | |||
| 39 | static struct platform_device *sh7750_devices[] __initdata = { | ||
| 40 | &sci_device, | ||
| 41 | }; | ||
| 42 | |||
| 43 | static int __init sh7750_devices_setup(void) | ||
| 44 | { | ||
| 45 | return platform_add_devices(sh7750_devices, | ||
| 46 | ARRAY_SIZE(sh7750_devices)); | ||
| 47 | } | ||
| 48 | __initcall(sh7750_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c new file mode 100644 index 000000000000..97f1c9af35d6 --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * SH7760 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xfe600000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCIF, | ||
| 20 | .irqs = { 52, 53, 55, 54 }, | ||
| 21 | }, { | ||
| 22 | .mapbase = 0xfe610000, | ||
| 23 | .flags = UPF_BOOT_AUTOCONF, | ||
| 24 | .type = PORT_SCIF, | ||
| 25 | .irqs = { 72, 73, 75, 74 }, | ||
| 26 | }, { | ||
| 27 | .mapbase = 0xfe620000, | ||
| 28 | .flags = UPF_BOOT_AUTOCONF, | ||
| 29 | .type = PORT_SCIF, | ||
| 30 | .irqs = { 76, 77, 79, 78 }, | ||
| 31 | }, { | ||
| 32 | .flags = 0, | ||
| 33 | } | ||
| 34 | }; | ||
| 35 | |||
| 36 | static struct platform_device sci_device = { | ||
| 37 | .name = "sh-sci", | ||
| 38 | .id = -1, | ||
| 39 | .dev = { | ||
| 40 | .platform_data = sci_platform_data, | ||
| 41 | }, | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct platform_device *sh7760_devices[] __initdata = { | ||
| 45 | &sci_device, | ||
| 46 | }; | ||
| 47 | |||
| 48 | static int __init sh7760_devices_setup(void) | ||
| 49 | { | ||
| 50 | return platform_add_devices(sh7760_devices, | ||
| 51 | ARRAY_SIZE(sh7760_devices)); | ||
| 52 | } | ||
| 53 | __initcall(sh7760_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7770.c b/arch/sh/kernel/cpu/sh4/setup-sh7770.c new file mode 100644 index 000000000000..6a04cc5f5aca --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh7770.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * SH7770 Setup | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #include <linux/platform_device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/serial.h> | ||
| 13 | #include <asm/sci.h> | ||
| 14 | |||
| 15 | static struct plat_sci_port sci_platform_data[] = { | ||
| 16 | { | ||
| 17 | .mapbase = 0xff923000, | ||
| 18 | .flags = UPF_BOOT_AUTOCONF, | ||
| 19 | .type = PORT_SCIF, | ||
| 20 | .irqs = { 61, 61, 61, 61 }, | ||
| 21 | }, { | ||
| 22 | .mapbase = 0xff924000, | ||
| 23 | .flags = UPF_BOOT_AUTOCONF, | ||
| 24 | .type = PORT_SCIF, | ||
| 25 | .irqs = { 62, 62, 62, 62 }, | ||
| 26 | }, { | ||
| 27 | .mapbase = 0xff925000, | ||
| 28 | .flags = UPF_BOOT_AUTOCONF, | ||
| 29 | .type = PORT_SCIF, | ||
| 30 | .irqs = { 63, 63, 63, 63 }, | ||
| 31 | }, { | ||
| 32 | .flags = 0, | ||
| 33 | } | ||
| 34 | }; | ||
| 35 | |||
| 36 | static struct platform_device sci_device = { | ||
| 37 | .name = "sh-sci", | ||
| 38 | .id = -1, | ||
| 39 | .dev = { | ||
| 40 | .platform_data = sci_platform_data, | ||
| 41 | }, | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct platform_device *sh7770_devices[] __initdata = { | ||
| 45 | &sci_device, | ||
| 46 | }; | ||
| 47 | |||
| 48 | static int __init sh7770_devices_setup(void) | ||
| 49 | { | ||
| 50 | return platform_add_devices(sh7770_devices, | ||
| 51 | ARRAY_SIZE(sh7770_devices)); | ||
| 52 | } | ||
| 53 | __initcall(sh7770_devices_setup); | ||
