Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Sun, 13 Jul 2008 04:05:46 -0700
Received: from chiesmta2-3.messageone.com ([216.203.30.55]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Sun, 13 Jul 2008 04:05:46 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by chiesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id m6DB5iDl013792
	for <andy.sharp@onstor.com>; Sun, 13 Jul 2008 06:05:45 -0500
Received: from localhost.localdomain ([127.0.0.1]:61919 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S20036287AbYGMLFd (ORCPT <rfc822;andy.sharp@onstor.com>);
	Sun, 13 Jul 2008 12:05:33 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 13 Jul 2008 12:05:16 +0100 (BST)
Received: from mo32.po.2iij.NET ([210.128.50.17]:55367 "EHLO mo32.po.2iij.net")
	by ftp.linux-mips.org with ESMTP id S20036084AbYGMLFM (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Sun, 13 Jul 2008 12:05:12 +0100
Received: by mo.po.2iij.net (mo32) id m6DB59b9009574; Sun, 13 Jul 2008 20:05:09 +0900 (JST)
Received: from delta (61.25.30.125.dy.iij4u.or.jp [125.30.25.61])
	by mbox.po.2iij.net (po-mbox302) id m6DB56VA006089
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 13 Jul 2008 20:05:07 +0900
Date: 	Sun, 13 Jul 2008 19:51:55 +0900
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: yoichi_yuasa@tripeaks.co.jp, Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
        linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH][1/5][MIPS] txx9_board_vec set directly without
 mips_machtype
Message-Id: <20080713195155.08c4285d.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-archive-position: 19800
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: yoichi_yuasa@tripeaks.co.jp
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-07-12_01:2008-07-09,2008-07-12,2008-07-12 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0807130024
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 13 Jul 2008 11:05:46.0228 (UTC) FILETIME=[6668EB40:01C8E4D8]

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)

