diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2008-07-13 06:51:55 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-15 13:44:37 -0400 |
commit | 7a1fdf1946b641f7c2866b3386414657eeb88084 (patch) | |
tree | 90255789a3f54a38338a749d69e124690486d8f8 /arch/mips | |
parent | b03d7b18fd783f39e31560d568e7db954f3080af (diff) |
[MIPS] txx9_board_vec set directly without mips_machtype
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 66ff74f80c6b..517828e1ec92 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -99,19 +99,6 @@ extern struct txx9_board_vec rbtx4927_vec; | |||
99 | extern struct txx9_board_vec rbtx4937_vec; | 99 | extern struct txx9_board_vec rbtx4937_vec; |
100 | extern struct txx9_board_vec rbtx4938_vec; | 100 | extern struct txx9_board_vec rbtx4938_vec; |
101 | 101 | ||
102 | /* board definitions */ | ||
103 | static struct txx9_board_vec *board_vecs[] __initdata = { | ||
104 | #ifdef CONFIG_TOSHIBA_JMR3927 | ||
105 | &jmr3927_vec, | ||
106 | #endif | ||
107 | #ifdef CONFIG_TOSHIBA_RBTX4927 | ||
108 | &rbtx4927_vec, | ||
109 | &rbtx4937_vec, | ||
110 | #endif | ||
111 | #ifdef CONFIG_TOSHIBA_RBTX4938 | ||
112 | &rbtx4938_vec, | ||
113 | #endif | ||
114 | }; | ||
115 | struct txx9_board_vec *txx9_board_vec __initdata; | 102 | struct txx9_board_vec *txx9_board_vec __initdata; |
116 | static char txx9_system_type[32]; | 103 | static char txx9_system_type[32]; |
117 | 104 | ||
@@ -134,31 +121,26 @@ void __init prom_init_cmdline(void) | |||
134 | 121 | ||
135 | void __init prom_init(void) | 122 | void __init prom_init(void) |
136 | { | 123 | { |
137 | int i; | ||
138 | |||
139 | #ifdef CONFIG_CPU_TX39XX | 124 | #ifdef CONFIG_CPU_TX39XX |
140 | mips_machtype = MACH_TOSHIBA_JMR3927; | 125 | txx9_board_vec = &jmr3927_vec; |
141 | #endif | 126 | #endif |
142 | #ifdef CONFIG_CPU_TX49XX | 127 | #ifdef CONFIG_CPU_TX49XX |
143 | switch (TX4938_REV_PCODE()) { | 128 | switch (TX4938_REV_PCODE()) { |
144 | case 0x4927: | 129 | case 0x4927: |
145 | mips_machtype = MACH_TOSHIBA_RBTX4927; | 130 | txx9_board_vec = &rbtx4927_vec; |
146 | break; | 131 | break; |
147 | case 0x4937: | 132 | case 0x4937: |
148 | mips_machtype = MACH_TOSHIBA_RBTX4937; | 133 | txx9_board_vec = &rbtx4937_vec; |
149 | break; | 134 | break; |
150 | case 0x4938: | 135 | case 0x4938: |
151 | mips_machtype = MACH_TOSHIBA_RBTX4938; | 136 | txx9_board_vec = &rbtx4938_vec; |
152 | break; | 137 | break; |
153 | } | 138 | } |
154 | #endif | 139 | #endif |
155 | for (i = 0; i < ARRAY_SIZE(board_vecs); i++) { | 140 | |
156 | if (board_vecs[i]->type == mips_machtype) { | 141 | strcpy(txx9_system_type, txx9_board_vec->system); |
157 | txx9_board_vec = board_vecs[i]; | 142 | |
158 | strcpy(txx9_system_type, txx9_board_vec->system); | 143 | return txx9_board_vec->prom_init(); |
159 | return txx9_board_vec->prom_init(); | ||
160 | } | ||
161 | } | ||
162 | } | 144 | } |
163 | 145 | ||
164 | void __init prom_free_prom_memory(void) | 146 | void __init prom_free_prom_memory(void) |