diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 77 | ||||
-rw-r--r-- | arch/sh/cchips/voyagergx/irq.c | 3 | ||||
-rw-r--r-- | arch/sh/cchips/voyagergx/setup.c | 2 |
3 files changed, 71 insertions, 11 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 60907f574f34..f6ce7021feba 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -1,18 +1,76 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/sh/kernel/setup_rts7751r2d.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Kazumoto Kojima | ||
5 | * | ||
6 | * Renesas Technology Sales RTS7751R2D Support. | 2 | * Renesas Technology Sales RTS7751R2D Support. |
7 | * | 3 | * |
8 | * Modified for RTS7751R2D by | 4 | * Copyright (C) 2002 Atom Create Engineering Co., Ltd. |
9 | * Atom Create Engineering Co., Ltd. 2002. | 5 | * Copyright (C) 2004 - 2006 Paul Mundt |
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file "COPYING" in the main directory of this archive | ||
9 | * for more details. | ||
10 | */ | 10 | */ |
11 | |||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/serial_8250.h> | ||
13 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
15 | #include <asm/rts7751r2d/rts7751r2d.h> | 16 | #include <asm/mach/rts7751r2d.h> |
17 | #include <asm/mach/voyagergx_reg.h> | ||
18 | |||
19 | static struct plat_serial8250_port uart_platform_data[] = { | ||
20 | { | ||
21 | .membase = (void *)VOYAGER_UART_BASE, | ||
22 | .mapbase = VOYAGER_UART_BASE, | ||
23 | .iotype = UPIO_MEM, | ||
24 | .irq = VOYAGER_UART0_IRQ, | ||
25 | .flags = UPF_BOOT_AUTOCONF, | ||
26 | .regshift = 2, | ||
27 | .uartclk = (9600 * 16), | ||
28 | }, { | ||
29 | .flags = 0, | ||
30 | }, | ||
31 | }; | ||
32 | |||
33 | static void __init voyagergx_serial_init(void) | ||
34 | { | ||
35 | unsigned long val; | ||
36 | |||
37 | /* | ||
38 | * GPIO Control | ||
39 | */ | ||
40 | val = inl(GPIO_MUX_HIGH); | ||
41 | val |= 0x00001fe0; | ||
42 | outl(val, GPIO_MUX_HIGH); | ||
43 | |||
44 | /* | ||
45 | * Power Mode Gate | ||
46 | */ | ||
47 | val = inl(POWER_MODE0_GATE); | ||
48 | val |= (POWER_MODE0_GATE_U0 | POWER_MODE0_GATE_U1); | ||
49 | outl(val, POWER_MODE0_GATE); | ||
50 | |||
51 | val = inl(POWER_MODE1_GATE); | ||
52 | val |= (POWER_MODE1_GATE_U0 | POWER_MODE1_GATE_U1); | ||
53 | outl(val, POWER_MODE1_GATE); | ||
54 | } | ||
55 | |||
56 | static struct platform_device uart_device = { | ||
57 | .name = "serial8250", | ||
58 | .id = -1, | ||
59 | .dev = { | ||
60 | .platform_data = uart_platform_data, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | static struct platform_device *rts7751r2d_devices[] __initdata = { | ||
65 | &uart_device, | ||
66 | }; | ||
67 | |||
68 | static int __init rts7751r2d_devices_setup(void) | ||
69 | { | ||
70 | return platform_add_devices(rts7751r2d_devices, | ||
71 | ARRAY_SIZE(rts7751r2d_devices)); | ||
72 | } | ||
73 | __initcall(rts7751r2d_devices_setup); | ||
16 | 74 | ||
17 | const char *get_system_type(void) | 75 | const char *get_system_type(void) |
18 | { | 76 | { |
@@ -32,4 +90,7 @@ void __init platform_setup(void) | |||
32 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | 90 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); |
33 | ctrl_outw(0x0000, PA_OUTPORT); | 91 | ctrl_outw(0x0000, PA_OUTPORT); |
34 | pm_power_off = rts7751r2d_power_off; | 92 | pm_power_off = rts7751r2d_power_off; |
93 | |||
94 | voyagergx_serial_init(); | ||
95 | |||
35 | } | 96 | } |
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 0dc1fb8f9687..036e8f900013 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -32,8 +32,7 @@ | |||
32 | 32 | ||
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
35 | #include <asm/rts7751r2d/rts7751r2d.h> | 35 | #include <asm/mach/voyagergx_reg.h> |
36 | #include <asm/rts7751r2d/voyagergx_reg.h> | ||
37 | 36 | ||
38 | static void disable_voyagergx_irq(unsigned int irq) | 37 | static void disable_voyagergx_irq(unsigned int irq) |
39 | { | 38 | { |
diff --git a/arch/sh/cchips/voyagergx/setup.c b/arch/sh/cchips/voyagergx/setup.c index 139ca88ac9e6..3a4cfaa9a214 100644 --- a/arch/sh/cchips/voyagergx/setup.c +++ b/arch/sh/cchips/voyagergx/setup.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/rts7751r2d/voyagergx_reg.h> | 16 | #include <asm/mach/voyagergx_reg.h> |
17 | 17 | ||
18 | static int __init setup_voyagergx(void) | 18 | static int __init setup_voyagergx(void) |
19 | { | 19 | { |