diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2008-04-28 05:14:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:30 -0400 |
commit | fc3f341b5a1a3f26ec8ed74a38234db7d0d1bae1 (patch) | |
tree | d7c0bc678f4b83ddf66bb9b9501d72a02a39fa11 /arch | |
parent | baac58955d6933571f29126a1a95299b421faef7 (diff) |
serial: add VR41xx SIU setup for serial console
Add VR41xx SIU setup for serial console.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/vr41xx/common/init.c | 4 | ||||
-rw-r--r-- | arch/mips/vr41xx/common/siu.c | 36 |
2 files changed, 38 insertions, 2 deletions
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index 76d4b5ed3fc0..c64995342ba8 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * init.c, Common initialization routines for NEC VR4100 series. | 2 | * init.c, Common initialization routines for NEC VR4100 series. |
3 | * | 3 | * |
4 | * Copyright (C) 2003-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2003-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -53,6 +53,8 @@ void __init plat_time_init(void) | |||
53 | void __init plat_mem_setup(void) | 53 | void __init plat_mem_setup(void) |
54 | { | 54 | { |
55 | iomem_resource_init(); | 55 | iomem_resource_init(); |
56 | |||
57 | vr41xx_siu_setup(); | ||
56 | } | 58 | } |
57 | 59 | ||
58 | void __init prom_init(void) | 60 | void __init prom_init(void) |
diff --git a/arch/mips/vr41xx/common/siu.c b/arch/mips/vr41xx/common/siu.c index b735f45b25f0..654dee6208be 100644 --- a/arch/mips/vr41xx/common/siu.c +++ b/arch/mips/vr41xx/common/siu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * NEC VR4100 series SIU platform device. | 2 | * NEC VR4100 series SIU platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -118,3 +118,37 @@ err_free_device: | |||
118 | return retval; | 118 | return retval; |
119 | } | 119 | } |
120 | device_initcall(vr41xx_siu_add); | 120 | device_initcall(vr41xx_siu_add); |
121 | |||
122 | void __init vr41xx_siu_setup(void) | ||
123 | { | ||
124 | struct uart_port port; | ||
125 | struct resource *res; | ||
126 | unsigned int *type; | ||
127 | int i; | ||
128 | |||
129 | switch (current_cpu_type()) { | ||
130 | case CPU_VR4111: | ||
131 | case CPU_VR4121: | ||
132 | type = siu_type1_ports; | ||
133 | res = siu_type1_resource; | ||
134 | break; | ||
135 | case CPU_VR4122: | ||
136 | case CPU_VR4131: | ||
137 | case CPU_VR4133: | ||
138 | type = siu_type2_ports; | ||
139 | res = siu_type2_resource; | ||
140 | break; | ||
141 | default: | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | for (i = 0; i < SIU_PORTS_MAX; i++) { | ||
146 | port.line = i; | ||
147 | port.type = type[i]; | ||
148 | if (port.type == PORT_UNKNOWN) | ||
149 | break; | ||
150 | port.mapbase = res[i].start; | ||
151 | port.membase = (unsigned char __iomem *)KSEG1ADDR(res[i].start); | ||
152 | vr41xx_siu_early_setup(&port); | ||
153 | } | ||
154 | } | ||