xref: /netbsd-src/sys/arch/arc/arc/p_nec_r96.c (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: p_nec_r96.c,v 1.6 2005/12/11 12:16:37 christos Exp $	*/
28612165cSsoda 
38612165cSsoda /*-
48612165cSsoda  * Copyright (C) 2000 Shuichiro URATA.  All rights reserved.
58612165cSsoda  *
68612165cSsoda  * Redistribution and use in source and binary forms, with or without
78612165cSsoda  * modification, are permitted provided that the following conditions
88612165cSsoda  * are met:
98612165cSsoda  * 1. Redistributions of source code must retain the above copyright
108612165cSsoda  *    notice, this list of conditions and the following disclaimer.
118612165cSsoda  * 2. Redistributions in binary form must reproduce the above copyright
128612165cSsoda  *    notice, this list of conditions and the following disclaimer in the
138612165cSsoda  *    documentation and/or other materials provided with the distribution.
148612165cSsoda  * 3. The name of the author may not be used to endorse or promote products
158612165cSsoda  *    derived from this software without specific prior written permission.
168612165cSsoda  *
178612165cSsoda  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
188612165cSsoda  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
198612165cSsoda  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
208612165cSsoda  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
218612165cSsoda  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
228612165cSsoda  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
238612165cSsoda  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
248612165cSsoda  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
258612165cSsoda  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
268612165cSsoda  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
278612165cSsoda  */
288612165cSsoda 
29a4183603Slukem #include <sys/cdefs.h>
30*95e1ffb1Schristos __KERNEL_RCSID(0, "$NetBSD: p_nec_r96.c,v 1.6 2005/12/11 12:16:37 christos Exp $");
31a4183603Slukem 
328612165cSsoda #include <sys/param.h>
338612165cSsoda #include <sys/systm.h>
348612165cSsoda #include <sys/kcore.h>
358612165cSsoda 
368612165cSsoda #include <machine/autoconf.h>
378612165cSsoda #include <machine/platform.h>
388612165cSsoda 
398612165cSsoda #include <arc/arc/arcbios.h>
408612165cSsoda #include <arc/jazz/rd94.h>
418612165cSsoda #include <arc/jazz/jazziovar.h>
428612165cSsoda 
437fe2a5a0Stsutsui static int p_nec_riscserver_2200_match(struct platform *);
448612165cSsoda 
458612165cSsoda struct platform platform_nec_r96 = {
468612165cSsoda 	"NEC-R96",
478612165cSsoda 	"MIPS DUO",
488612165cSsoda 	"",
498612165cSsoda 	"Express RISCserver",
508612165cSsoda 	"NEC",
518612165cSsoda 	150, /* MHz */
528612165cSsoda 	c_jazz_eisa_mainbusdevs,
538612165cSsoda 	platform_generic_match,
548612165cSsoda 	c_nec_eisa_init,
55f9f27acbStsutsui 	c_nec_eisa_cons_init,
568612165cSsoda 	jazzio_reset,
578612165cSsoda 	c_nec_jazz_set_intr,
588612165cSsoda };
598612165cSsoda 
608612165cSsoda struct platform platform_nec_riscserver_2200 = {
618612165cSsoda 	"NEC-R96",
628612165cSsoda 	"MIPS DUO",
638612165cSsoda 	"",
648612165cSsoda 	"RISCserver 2200",
658612165cSsoda 	"NEC",
668612165cSsoda 	200, /* MHz */
678612165cSsoda 	c_jazz_eisa_mainbusdevs,
688612165cSsoda 	p_nec_riscserver_2200_match,
698612165cSsoda 	c_nec_eisa_init,
70cc8f388dStsutsui 	c_nec_eisa_cons_init,
718612165cSsoda 	jazzio_reset,
728612165cSsoda 	c_nec_jazz_set_intr,
738612165cSsoda };
748612165cSsoda 
758612165cSsoda static int
p_nec_riscserver_2200_match(struct platform * p)767fe2a5a0Stsutsui p_nec_riscserver_2200_match(struct platform *p)
778612165cSsoda {
787fe2a5a0Stsutsui 
798612165cSsoda 	if (strcmp(arc_id, p->system_id) == 0 &&
808612165cSsoda 	    (p->vendor_id == NULL || strcmp(arc_vendor_id, p->vendor_id) == 0)
818612165cSsoda 	    && arc_cpu_l2cache_size == 2 * 1024 * 1024)
827fe2a5a0Stsutsui 		return 2;
838612165cSsoda 
847fe2a5a0Stsutsui 	return 0;
858612165cSsoda }
86