Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH][1/5][MIPS] txx9_board_vec set directly without mips_machtype
@ 2008-07-13 10:51 Yoichi Yuasa
  2008-07-13 10:54 ` [PATCH][2/5][MIPS] txx9_cpu_clock setup move to rbtx4927_time_init() Yoichi Yuasa
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yoichi Yuasa @ 2008-07-13 10:51 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, Atsushi Nemoto, linux-mips

txx9_board_vec set directly without mips_machtype.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/arch/mips/txx9/generic/setup.c linux/arch/mips/txx9/generic/setup.c
--- linux-orig/arch/mips/txx9/generic/setup.c	2008-07-13 15:59:38.884682499 +0900
+++ linux/arch/mips/txx9/generic/setup.c	2008-07-13 16:00:06.436034688 +0900
@@ -99,19 +99,6 @@ extern struct txx9_board_vec rbtx4927_ve
 extern struct txx9_board_vec rbtx4937_vec;
 extern struct txx9_board_vec rbtx4938_vec;
 
-/* board definitions */
-static struct txx9_board_vec *board_vecs[] __initdata = {
-#ifdef CONFIG_TOSHIBA_JMR3927
-	&jmr3927_vec,
-#endif
-#ifdef CONFIG_TOSHIBA_RBTX4927
-	&rbtx4927_vec,
-	&rbtx4937_vec,
-#endif
-#ifdef CONFIG_TOSHIBA_RBTX4938
-	&rbtx4938_vec,
-#endif
-};
 struct txx9_board_vec *txx9_board_vec __initdata;
 static char txx9_system_type[32];
 
@@ -134,31 +121,26 @@ void __init prom_init_cmdline(void)
 
 void __init prom_init(void)
 {
-	int i;
-
 #ifdef CONFIG_CPU_TX39XX
-	mips_machtype = MACH_TOSHIBA_JMR3927;
+	txx9_board_vec = &jmr3927_vec;
 #endif
 #ifdef CONFIG_CPU_TX49XX
 	switch (TX4938_REV_PCODE()) {
 	case 0x4927:
-		mips_machtype = MACH_TOSHIBA_RBTX4927;
+		txx9_board_vec = &rbtx4927_vec;
 		break;
 	case 0x4937:
-		mips_machtype = MACH_TOSHIBA_RBTX4937;
+		txx9_board_vec = &rbtx4937_vec;
 		break;
 	case 0x4938:
-		mips_machtype = MACH_TOSHIBA_RBTX4938;
+		txx9_board_vec = &rbtx4938_vec;
 		break;
 	}
 #endif
-	for (i = 0; i < ARRAY_SIZE(board_vecs); i++) {
-		if (board_vecs[i]->type == mips_machtype) {
-			txx9_board_vec = board_vecs[i];
-			strcpy(txx9_system_type, txx9_board_vec->system);
-			return txx9_board_vec->prom_init();
-		}
-	}
+
+	strcpy(txx9_system_type, txx9_board_vec->system);
+
+	return txx9_board_vec->prom_init();
 }
 
 void __init prom_free_prom_memory(void)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-07-14 11:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 10:51 [PATCH][1/5][MIPS] txx9_board_vec set directly without mips_machtype Yoichi Yuasa
2008-07-13 10:54 ` [PATCH][2/5][MIPS] txx9_cpu_clock setup move to rbtx4927_time_init() Yoichi Yuasa
2008-07-13 11:01   ` [PATCH][3/5][MIPS] separate rbtx4927_arch_init() and rbtx4937_arch_init() Yoichi Yuasa
2008-07-13 11:02     ` [PATCH][4/5][MIPS] separate rbtx4927_time_init() and rbtx4937_time_init() Yoichi Yuasa
2008-07-13 11:04       ` [PATCH][5/5][MIPS] remove machtype for group Toshiba Yoichi Yuasa
2008-07-13 13:31         ` Atsushi Nemoto
2008-07-13 13:28       ` [PATCH][4/5][MIPS] separate rbtx4927_time_init() and rbtx4937_time_init() Atsushi Nemoto
2008-07-13 13:28     ` [PATCH][3/5][MIPS] separate rbtx4927_arch_init() and rbtx4937_arch_init() Atsushi Nemoto
2008-07-13 13:26   ` [PATCH][2/5][MIPS] txx9_cpu_clock setup move to rbtx4927_time_init() Atsushi Nemoto
2008-07-13 13:17 ` [PATCH][1/5][MIPS] txx9_board_vec set directly without mips_machtype Atsushi Nemoto
2008-07-14 11:08 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox