diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2009-06-24 04:53:33 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-06-24 04:53:33 -0400 |
| commit | 00b9de9c249f51f09c19aa41cbbb3e3eb4eea807 (patch) | |
| tree | 28715dbc2472e6da8b7d670e63439172a1de9a6b /arch/sh/kernel/cpu/sh4 | |
| parent | bb38c222e07cbe252cfbd99cd6a9c834b0a2639a (diff) | |
serial: sh-sci: Move SCSCR_INIT in to platform data.
This moves all of the SCSCR_INIT definitions in to the platform data,
for future consolidation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4')
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 1 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7750.c | 48 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7760.c | 4 |
3 files changed, 35 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index 6d088d123591..9aa6fa3ca4e6 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c | |||
| @@ -19,6 +19,7 @@ static struct plat_sci_port sci_platform_data[] = { | |||
| 19 | { | 19 | { |
| 20 | .mapbase = 0xffe80000, | 20 | .mapbase = 0xffe80000, |
| 21 | .flags = UPF_BOOT_AUTOCONF, | 21 | .flags = UPF_BOOT_AUTOCONF, |
| 22 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
| 22 | .type = PORT_SCIF, | 23 | .type = PORT_SCIF, |
| 23 | .irqs = { 40, 41, 43, 42 }, | 24 | .irqs = { 40, 41, 43, 42 }, |
| 24 | }, { | 25 | }, { |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index 851672d15cf4..2159c439dce9 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
| 15 | #include <linux/sh_timer.h> | 15 | #include <linux/sh_timer.h> |
| 16 | #include <linux/serial_sci.h> | 16 | #include <linux/serial_sci.h> |
| 17 | #include <asm/machtypes.h> | ||
| 17 | 18 | ||
| 18 | static struct resource rtc_resources[] = { | 19 | static struct resource rtc_resources[] = { |
| 19 | [0] = { | 20 | [0] = { |
| @@ -35,32 +36,36 @@ static struct platform_device rtc_device = { | |||
| 35 | .resource = rtc_resources, | 36 | .resource = rtc_resources, |
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | static struct plat_sci_port sci_platform_data[] = { | 39 | static struct plat_sci_port sci_platform_data = { |
| 39 | { | 40 | .mapbase = 0xffe00000, |
| 40 | #ifndef CONFIG_SH_RTS7751R2D | 41 | .flags = UPF_BOOT_AUTOCONF, |
| 41 | .mapbase = 0xffe00000, | 42 | .type = PORT_SCI, |
| 42 | .flags = UPF_BOOT_AUTOCONF, | 43 | .scscr = SCSCR_TE | SCSCR_RE, |
| 43 | .type = PORT_SCI, | 44 | .irqs = { 23, 23, 23, 0 }, |
| 44 | .irqs = { 23, 23, 23, 0 }, | ||
| 45 | }, { | ||
| 46 | #endif | ||
| 47 | .mapbase = 0xffe80000, | ||
| 48 | .flags = UPF_BOOT_AUTOCONF, | ||
| 49 | .type = PORT_SCIF, | ||
| 50 | .irqs = { 40, 40, 40, 40 }, | ||
| 51 | }, { | ||
| 52 | .flags = 0, | ||
| 53 | } | ||
| 54 | }; | 45 | }; |
| 55 | 46 | ||
| 56 | static struct platform_device sci_device = { | 47 | static struct platform_device sci_device = { |
| 57 | .name = "sh-sci", | 48 | .name = "sh-sci", |
| 58 | .id = -1, | ||
| 59 | .dev = { | 49 | .dev = { |
| 60 | .platform_data = sci_platform_data, | 50 | .platform_data = sci_platform_data, |
| 61 | }, | 51 | }, |
| 62 | }; | 52 | }; |
| 63 | 53 | ||
| 54 | static struct plat_sci_port scif_platform_data = { | ||
| 55 | .mapbase = 0xffe80000, | ||
| 56 | .flags = UPF_BOOT_AUTOCONF, | ||
| 57 | .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE, | ||
| 58 | .type = PORT_SCIF, | ||
| 59 | .irqs = { 40, 40, 40, 40 }, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct platform_device scif_device = { | ||
| 63 | .name = "sh-sci", | ||
| 64 | .dev = { | ||
| 65 | .platform_data = scif_platform_data, | ||
| 66 | }, | ||
| 67 | }; | ||
| 68 | |||
| 64 | static struct sh_timer_config tmu0_platform_data = { | 69 | static struct sh_timer_config tmu0_platform_data = { |
| 65 | .name = "TMU0", | 70 | .name = "TMU0", |
| 66 | .channel_offset = 0x04, | 71 | .channel_offset = 0x04, |
| @@ -222,7 +227,6 @@ static struct platform_device tmu4_device = { | |||
| 222 | 227 | ||
| 223 | static struct platform_device *sh7750_devices[] __initdata = { | 228 | static struct platform_device *sh7750_devices[] __initdata = { |
| 224 | &rtc_device, | 229 | &rtc_device, |
| 225 | &sci_device, | ||
| 226 | &tmu0_device, | 230 | &tmu0_device, |
| 227 | &tmu1_device, | 231 | &tmu1_device, |
| 228 | &tmu2_device, | 232 | &tmu2_device, |
| @@ -236,6 +240,14 @@ static struct platform_device *sh7750_devices[] __initdata = { | |||
| 236 | 240 | ||
| 237 | static int __init sh7750_devices_setup(void) | 241 | static int __init sh7750_devices_setup(void) |
| 238 | { | 242 | { |
| 243 | if (mach_is_rts7751r2d()) { | ||
| 244 | scif_platform_data.scscr |= SCSCR_CKE1; | ||
| 245 | platform_register_device(&scif_device); | ||
| 246 | } else { | ||
| 247 | platform_register_device(&sci_device); | ||
| 248 | platform_register_device(&scif_device); | ||
| 249 | } | ||
| 250 | |||
| 239 | return platform_add_devices(sh7750_devices, | 251 | return platform_add_devices(sh7750_devices, |
| 240 | ARRAY_SIZE(sh7750_devices)); | 252 | ARRAY_SIZE(sh7750_devices)); |
| 241 | } | 253 | } |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 5b822519bd90..74b5e994724d 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
| @@ -130,21 +130,25 @@ static struct plat_sci_port sci_platform_data[] = { | |||
| 130 | { | 130 | { |
| 131 | .mapbase = 0xfe600000, | 131 | .mapbase = 0xfe600000, |
| 132 | .flags = UPF_BOOT_AUTOCONF, | 132 | .flags = UPF_BOOT_AUTOCONF, |
| 133 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
| 133 | .type = PORT_SCIF, | 134 | .type = PORT_SCIF, |
| 134 | .irqs = { 52, 53, 55, 54 }, | 135 | .irqs = { 52, 53, 55, 54 }, |
| 135 | }, { | 136 | }, { |
| 136 | .mapbase = 0xfe610000, | 137 | .mapbase = 0xfe610000, |
| 137 | .flags = UPF_BOOT_AUTOCONF, | 138 | .flags = UPF_BOOT_AUTOCONF, |
| 139 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
| 138 | .type = PORT_SCIF, | 140 | .type = PORT_SCIF, |
| 139 | .irqs = { 72, 73, 75, 74 }, | 141 | .irqs = { 72, 73, 75, 74 }, |
| 140 | }, { | 142 | }, { |
| 141 | .mapbase = 0xfe620000, | 143 | .mapbase = 0xfe620000, |
| 142 | .flags = UPF_BOOT_AUTOCONF, | 144 | .flags = UPF_BOOT_AUTOCONF, |
| 145 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
| 143 | .type = PORT_SCIF, | 146 | .type = PORT_SCIF, |
| 144 | .irqs = { 76, 77, 79, 78 }, | 147 | .irqs = { 76, 77, 79, 78 }, |
| 145 | }, { | 148 | }, { |
| 146 | .mapbase = 0xfe480000, | 149 | .mapbase = 0xfe480000, |
| 147 | .flags = UPF_BOOT_AUTOCONF, | 150 | .flags = UPF_BOOT_AUTOCONF, |
| 151 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | ||
| 148 | .type = PORT_SCI, | 152 | .type = PORT_SCI, |
| 149 | .irqs = { 80, 81, 82, 0 }, | 153 | .irqs = { 80, 81, 82, 0 }, |
| 150 | }, { | 154 | }, { |
