xref: /netbsd-src/sys/arch/arc/include/platform.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: platform.h,v 1.8 2005/12/11 12:16:39 christos Exp $	*/
2bc0d30a9Ssoda /*	NetBSD: cpuconf.h,v 1.12 2000/06/08 03:10:06 thorpej Exp 	*/
3bc0d30a9Ssoda 
4bc0d30a9Ssoda /*
5bc0d30a9Ssoda  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
6bc0d30a9Ssoda  *
7bc0d30a9Ssoda  * Redistribution and use in source and binary forms, with or without
8bc0d30a9Ssoda  * modification, are permitted provided that the following conditions
9bc0d30a9Ssoda  * are met:
10bc0d30a9Ssoda  * 1. Redistributions of source code must retain the above copyright
11bc0d30a9Ssoda  *    notice, this list of conditions and the following disclaimer.
12bc0d30a9Ssoda  * 2. Redistributions in binary form must reproduce the above copyright
13bc0d30a9Ssoda  *    notice, this list of conditions and the following disclaimer in the
14bc0d30a9Ssoda  *    documentation and/or other materials provided with the distribution.
15bc0d30a9Ssoda  * 3. All advertising materials mentioning features or use of this software
16bc0d30a9Ssoda  *    must display the following acknowledgement:
17bc0d30a9Ssoda  *      This product includes software developed by Christopher G. Demetriou
18bc0d30a9Ssoda  *	for the NetBSD Project.
19bc0d30a9Ssoda  * 4. The name of the author may not be used to endorse or promote products
20bc0d30a9Ssoda  *    derived from this software without specific prior written permission
21bc0d30a9Ssoda  *
22bc0d30a9Ssoda  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23bc0d30a9Ssoda  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24bc0d30a9Ssoda  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25bc0d30a9Ssoda  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26bc0d30a9Ssoda  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27bc0d30a9Ssoda  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28bc0d30a9Ssoda  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29bc0d30a9Ssoda  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30bc0d30a9Ssoda  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31bc0d30a9Ssoda  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32bc0d30a9Ssoda  */
33bc0d30a9Ssoda 
34bc0d30a9Ssoda struct platform {
35bc0d30a9Ssoda 	/*
36bc0d30a9Ssoda 	 * Platform Information.
37bc0d30a9Ssoda 	 */
38bc0d30a9Ssoda 	const char	*system_id;	/* from root of configuration tree */
39bc0d30a9Ssoda 	const char	*vendor_id;	/* vendor id from GetSystemId() */
40bc0d30a9Ssoda 	const char	*variant;	/* Variant Name */
41bc0d30a9Ssoda 	const char	*model;		/* Model Name */
42bc0d30a9Ssoda 	const char	*vendor;	/* Vendor Name */
43bc0d30a9Ssoda 	int		clock;		/* CPU clock [MHz] */
44bc0d30a9Ssoda 
45da084245Stsutsui 	const char	**mainbusdevs;
46bc0d30a9Ssoda 
47bc0d30a9Ssoda 	/*
48bc0d30a9Ssoda 	 * Platform Specific Function Hooks
49bc0d30a9Ssoda 	 */
507fe2a5a0Stsutsui 	int	(*match)(struct platform *);
517fe2a5a0Stsutsui 	void	(*init)(void);
527fe2a5a0Stsutsui 	void	(*cons_init)(void);
537fe2a5a0Stsutsui 	void	(*reset)(void);
547310abdeStsutsui 	void	(*set_intr)(uint32_t,
557310abdeStsutsui 		 uint32_t (*)(uint32_t, struct clockframe *), int);
56bc0d30a9Ssoda };
57bc0d30a9Ssoda 
587fe2a5a0Stsutsui int ident_platform(void);
597fe2a5a0Stsutsui int platform_generic_match(struct platform *);
607fe2a5a0Stsutsui void platform_nop(void);
61bc0d30a9Ssoda 
62bc0d30a9Ssoda extern struct platform *platform;
63bc0d30a9Ssoda 
64bc0d30a9Ssoda extern struct platform *const plattab[];
65bc0d30a9Ssoda extern const int nplattab;
66bc0d30a9Ssoda 
67bc0d30a9Ssoda /*
68bc0d30a9Ssoda  * supported platforms, sorted by alphabetic order of p_*.c filename.
69bc0d30a9Ssoda  */
70bc0d30a9Ssoda extern struct platform platform_acer_pica_61;
71bc0d30a9Ssoda extern struct platform platform_desktech_arcstation_i;
72bc0d30a9Ssoda extern struct platform platform_desktech_tyne;
73bc0d30a9Ssoda extern struct platform platform_microsoft_jazz;
74d658fd6eStsutsui extern struct platform platform_nec_j96a;
75bc0d30a9Ssoda extern struct platform platform_nec_jc94;
76bc0d30a9Ssoda extern struct platform platform_nec_r94;
77bc0d30a9Ssoda extern struct platform platform_nec_r96;
78bc0d30a9Ssoda extern struct platform platform_nec_riscserver_2200;
79bc0d30a9Ssoda extern struct platform platform_nec_rax94;
80bc0d30a9Ssoda extern struct platform platform_nec_rd94;
81bc0d30a9Ssoda extern struct platform platform_sni_rm200pci;
82bc0d30a9Ssoda 
837fe2a5a0Stsutsui void c_isa_init(void);
847fe2a5a0Stsutsui void c_isa_cons_init(void);
85bc0d30a9Ssoda 
86c32e803dStsutsui extern const char *c_jazz_eisa_mainbusdevs[];
877fe2a5a0Stsutsui void c_jazz_eisa_init(void);
887fe2a5a0Stsutsui void c_jazz_eisa_cons_init(void);
89bc0d30a9Ssoda 
907310abdeStsutsui void c_magnum_set_intr(uint32_t, uint32_t (*)(uint32_t, struct clockframe *),
917310abdeStsutsui     int);
927fe2a5a0Stsutsui void c_magnum_init(void);
93bc0d30a9Ssoda 
947fe2a5a0Stsutsui void c_nec_eisa_init(void);
957fe2a5a0Stsutsui void c_nec_eisa_cons_init(void);
96bc0d30a9Ssoda 
977310abdeStsutsui void c_nec_jazz_set_intr(uint32_t, uint32_t (*)(uint32_t, struct clockframe *),
987310abdeStsutsui     int);
997fe2a5a0Stsutsui void c_nec_jazz_init(void);
100bc0d30a9Ssoda 
101da084245Stsutsui extern const char *c_nec_pci_mainbusdevs[];
1027fe2a5a0Stsutsui void c_nec_pci_init(void);
1037fe2a5a0Stsutsui void c_nec_pci_cons_init(void);
104bc0d30a9Ssoda 
105bc0d30a9Ssoda 
106