1 /* $NetBSD: p_ms_jazz.c,v 1.9 2011/03/06 14:58:42 tsutsui Exp $ */
2 /* $OpenBSD: picabus.c,v 1.11 1999/01/11 05:11:10 millert Exp $ */
3
4 /*
5 * Copyright (c) 1994, 1995 Carnegie-Mellon University.
6 * All rights reserved.
7 *
8 * Author: Chris G. Demetriou
9 * Author: Per Fogelstrom. (Mips R4x00)
10 *
11 * Permission to use, copy, modify and distribute this software and
12 * its documentation is hereby granted, provided that both the copyright
13 * notice and this permission notice appear in all copies of the
14 * software, derivative works or modified versions, and any portions
15 * thereof, and that both notices appear in supporting documentation.
16 *
17 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
18 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
19 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20 *
21 * Carnegie Mellon requests users of this software to return to
22 *
23 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
24 * School of Computer Science
25 * Carnegie Mellon University
26 * Pittsburgh PA 15213-3890
27 *
28 * any improvements or extensions that they make and grant Carnegie the
29 * rights to redistribute these changes.
30 */
31
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: p_ms_jazz.c,v 1.9 2011/03/06 14:58:42 tsutsui Exp $");
34
35 #include <sys/param.h>
36
37 #include <machine/autoconf.h>
38 #include <machine/platform.h>
39
40 #include <arc/jazz/pica.h>
41 #include <arc/jazz/jazziovar.h>
42
43 #include "com.h"
44
45 /* MAGNUM. NEC goes here too. */
46
47 #ifndef COM_FREQ_MAGNUM
48 #if 0
49 #define COM_FREQ_MAGNUM 4233600 /* 4.2336MHz - ARC? */
50 #else
51 #define COM_FREQ_MAGNUM 8192000 /* 8.192 MHz - NEC RISCstation M402 */
52 #endif
53 #endif /* COM_FREQ_MAGNUM */
54
55 void p_ms_jazz_init(void);
56
57 struct platform platform_microsoft_jazz = {
58 "Microsoft-Jazz",
59 "MIPS MAG",
60 "",
61 "Magnum",
62 "MIPS",
63 150, /* MHz */
64 c_jazz_eisa_mainbusdevs,
65 platform_generic_match,
66 p_ms_jazz_init,
67 c_jazz_eisa_cons_init,
68 jazzio_reset,
69 c_magnum_set_intr,
70 };
71
72 /*
73 * jazzio bus configuration
74 */
75
76 struct pica_dev mips_magnum_r4000_cpu[] = {
77 {{ "timer", -1, 0, }, (void *)R4030_SYS_IT_VALUE, },
78 {{ "dallas_rtc", -1, 0, }, (void *)PICA_SYS_CLOCK, },
79 {{ "LPT1", 0, 0, }, (void *)PICA_SYS_PAR1, },
80 {{ "I82077", 1, 0, }, (void *)PICA_SYS_FLOPPY, },
81 {{ "MAGNUM", 2, 0, }, (void *)PICA_SYS_SOUND,},
82 {{ "VXL", 3, 0, }, (void *)PICA_V_LOCAL_VIDEO, },
83 {{ "SONIC", 4, 0, }, (void *)PICA_SYS_SONIC, },
84 {{ "ESP216", 5, 0, }, (void *)PICA_SYS_SCSI, },
85 {{ "I8742", 6, 0, }, (void *)PICA_SYS_KBD, },
86 {{ "pms", 7, 0, }, (void *)PICA_SYS_KBD, }, /* XXX */
87 {{ "COM1", 8, 0, }, (void *)PICA_SYS_COM1, },
88 {{ "COM2", 9, 0, }, (void *)PICA_SYS_COM2, },
89 {{ NULL, -1, 0, }, NULL, },
90 };
91
92 /*
93 * critial i/o space, interrupt, and other chipset related initialization.
94 */
95 void
p_ms_jazz_init(void)96 p_ms_jazz_init(void)
97 {
98
99 c_magnum_init();
100
101 /* jazzio bus configuration */
102 jazzio_devconfig = mips_magnum_r4000_cpu;
103
104 #if NCOM > 0
105 com_freq = COM_FREQ_MAGNUM;
106 #endif
107 }
108