xref: /netbsd-src/sys/arch/arc/jazz/pica.h (revision e1901f8e741ea3b5b8d8c5647d1d7cce89170319)
1*e1901f8eStsutsui /*	$NetBSD: pica.h,v 1.4 2011/03/06 14:58:44 tsutsui Exp $	*/
2459f2585Sur /*	$OpenBSD: pica.h,v 1.4 1996/09/14 15:58:28 pefo Exp $ */
3459f2585Sur 
4459f2585Sur /*
5459f2585Sur  * Copyright (c) 1994, 1995, 1996 Per Fogelstrom
6459f2585Sur  *
7459f2585Sur  * Redistribution and use in source and binary forms, with or without
8459f2585Sur  * modification, are permitted provided that the following conditions
9459f2585Sur  * are met:
10459f2585Sur  * 1. Redistributions of source code must retain the above copyright
11459f2585Sur  *    notice, this list of conditions and the following disclaimer.
12459f2585Sur  * 2. Redistributions in binary form must reproduce the above copyright
13459f2585Sur  *    notice, this list of conditions and the following disclaimer in the
14459f2585Sur  *    documentation and/or other materials provided with the distribution.
15459f2585Sur  * 3. All advertising materials mentioning features or use of this software
16459f2585Sur  *    must display the following acknowledgement:
17459f2585Sur  *	This product includes software developed under OpenBSD by
18459f2585Sur  *	Per Fogelstrom.
19459f2585Sur  * 4. The name of the author may not be used to endorse or promote products
20459f2585Sur  *    derived from this software without specific prior written permission.
21459f2585Sur  *
22459f2585Sur  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
23459f2585Sur  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24459f2585Sur  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25459f2585Sur  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
26459f2585Sur  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27459f2585Sur  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28459f2585Sur  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29459f2585Sur  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30459f2585Sur  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31459f2585Sur  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32459f2585Sur  * SUCH DAMAGE.
33459f2585Sur  *
34459f2585Sur  */
35459f2585Sur #ifndef	_PICA_H_
36459f2585Sur #define	_PICA_H_ 1
37459f2585Sur 
38459f2585Sur /*
39459f2585Sur  * PICA's Physical address space
40459f2585Sur  */
41459f2585Sur 
42459f2585Sur #define PICA_PHYS_MIN		0x00000000	/* 256 Meg */
43459f2585Sur #define PICA_PHYS_MAX		0x0fffffff
44459f2585Sur 
45459f2585Sur /*
46459f2585Sur  * Memory map
47459f2585Sur  */
48459f2585Sur 
49459f2585Sur #define PICA_PHYS_MEMORY_START	0x00000000
50459f2585Sur #define PICA_PHYS_MEMORY_END	0x0fffffff	/* 256 Meg in 8 slots */
51459f2585Sur 
52459f2585Sur #define PICA_MEMORY_SIZE_REG	0xe00fffe0	/* Memory size register */
53459f2585Sur #define	PICA_CONFIG_REG		0xe00ffff0	/* Hardware config reg  */
54459f2585Sur 
55459f2585Sur /*
56459f2585Sur  * I/O map
57459f2585Sur  */
58459f2585Sur 
59459f2585Sur #define	R4030_P_LOCAL_IO_BASE	0x80000000	/* I/O Base address */
60459f2585Sur #define	R4030_V_LOCAL_IO_BASE	0xe0000000
61459f2585Sur #define	R4030_S_LOCAL_IO_BASE	0x00040000	/* Size */
62459f2585Sur #define R4030 R4030_V_LOCAL_IO_BASE
63459f2585Sur 
64459f2585Sur #define	R4030_SYS_CONFIG	(R4030+0x0000)	/* Global config register */
65459f2585Sur #define	R4030_SYS_TL_BASE	(R4030+0x0018)	/* DMA transl. table base */
66459f2585Sur #define	R4030_SYS_TL_LIMIT	(R4030+0x0020)	/* DMA transl. table limit */
67459f2585Sur #define	R4030_SYS_TL_IVALID	(R4030+0x0028)	/* DMA transl. cache inval */
68459f2585Sur #define	R4030_SYS_DMA0_REGS	(R4030+0x0100)	/* DMA ch0 base address */
69459f2585Sur #define	R4030_SYS_DMA1_REGS	(R4030+0x0120)	/* DMA ch0 base address */
70459f2585Sur #define	R4030_SYS_DMA2_REGS	(R4030+0x0140)	/* DMA ch0 base address */
71459f2585Sur #define	R4030_SYS_DMA3_REGS	(R4030+0x0160)	/* DMA ch0 base address */
72459f2585Sur #define	R4030_SYS_DMA_INT_SRC	(R4030+0x0200)	/* DMA int source status reg */
73459f2585Sur #define	R4030_SYS_NVRAM_PROT	(R4030+0x0220)	/* NV ram protect register */
74459f2585Sur #define	R4030_SYS_IT_VALUE	(R4030+0x0228)	/* Interval timer reload */
75459f2585Sur #define	R4030_SYS_IT_STAT	(R4030+0x0230)	/* Interval timer count */
76459f2585Sur #define	R4030_SYS_ISA_VECTOR	(R4030+0x0238)	/* ISA Interrupt vector */
77459f2585Sur #define	R4030_SYS_EXT_IMASK	(R4030+0x00e8)	/* External int enable mask */
78459f2585Sur 
79459f2585Sur #define PVLB R4030_V_LOCAL_IO_BASE
80459f2585Sur #define	PICA_SYS_SONIC		(PVLB+0x1000)	/* SONIC base address */
81459f2585Sur #define	PICA_SYS_SCSI		(PVLB+0x2000)	/* SCSI base address */
82459f2585Sur #define	PICA_SYS_FLOPPY		(PVLB+0x3000)	/* Floppy base address */
83459f2585Sur #define	PICA_SYS_CLOCK		(PVLB+0x4000)	/* Clock base address */
84459f2585Sur #define	PICA_SYS_KBD		(PVLB+0x5000)	/* Keybrd/mouse base address */
85459f2585Sur #define	PICA_SYS_COM1		(PVLB+0x6000)	/* Com port 1 */
86459f2585Sur #define	PICA_SYS_COM2		(PVLB+0x7000)	/* Com port 2 */
87459f2585Sur #define	PICA_SYS_PAR1		(PVLB+0x8000)	/* Parallel port 1 */
88459f2585Sur #define	PICA_SYS_NVRAM		(PVLB+0x9000)	/* Unprotected NV-ram */
89459f2585Sur #define	PICA_SYS_PNVRAM		(PVLB+0xa000)	/* Protected NV-ram */
90459f2585Sur #define	PICA_SYS_NVPROM		(PVLB+0xb000)	/* Read only NV-ram */
91459f2585Sur #define	PICA_SYS_SOUND		(PVLB+0xc000)	/* Sound port */
92459f2585Sur 
93a92570f1Stsutsui #define	C_JAZZ_EISA_TODCLOCK_AS	0x70		/* address select for clock */
94459f2585Sur 
95459f2585Sur #define	PICA_P_DRAM_CONF	0x800e0000	/* Dram config registers */
96459f2585Sur #define	PICA_V_DRAM_CONF	0xe00e0000
97459f2585Sur #define	PICA_S_DRAM_CONF	0x00020000
98459f2585Sur 
99459f2585Sur #define	PICA_P_INT_SOURCE	0xf0000000	/* Interrupt src registers */
100459f2585Sur #define	PICA_V_INT_SOURCE	R4030_V_LOCAL_IO_BASE+R4030_S_LOCAL_IO_BASE
101459f2585Sur #define	PICA_S_INT_SOURCE	0x00001000
102459f2585Sur #define PVIS PICA_V_INT_SOURCE
103459f2585Sur #define	PICA_SYS_LB_IS		(PVIS+0x0000)	/* Local bus int source */
104459f2585Sur #define	PICA_SYS_LB_IE		(PVIS+0x0002)	/* Local bus int enables */
105459f2585Sur 
106459f2585Sur #define	PICA_P_LOCAL_VIDEO_CTRL	0x60000000	/* Local video control */
107459f2585Sur #define	PICA_V_LOCAL_VIDEO_CTRL	0xe0200000
108459f2585Sur #define	PICA_S_LOCAL_VIDEO_CTRL	0x00200000
109459f2585Sur 
110459f2585Sur #define	PICA_P_EXTND_VIDEO_CTRL	0x60200000	/* Extended video control */
111459f2585Sur #define	PICA_V_EXTND_VIDEO_CTRL	0xe0400000
112459f2585Sur #define	PICA_S_EXTND_VIDEO_CTRL	0x00200000
113459f2585Sur 
114459f2585Sur #define	PICA_P_LOCAL_VIDEO	0x40000000	/* Local video memory */
115459f2585Sur #define	PICA_V_LOCAL_VIDEO	0xe0800000
116459f2585Sur #define	PICA_S_LOCAL_VIDEO	0x00800000
117459f2585Sur 
118459f2585Sur #define	PICA_P_ISA_IO		0x90000000	/* ISA I/O control */
119459f2585Sur #define	PICA_V_ISA_IO		0xe2000000
120459f2585Sur #define	PICA_S_ISA_IO		0x01000000
121459f2585Sur 
122459f2585Sur #define	PICA_P_ISA_MEM		0x91000000	/* ISA Memory control */
123459f2585Sur #define	PICA_V_ISA_MEM		0xe3000000
124459f2585Sur #define	PICA_S_ISA_MEM		0x01000000
125459f2585Sur 
126459f2585Sur /*
127459f2585Sur  *  Addresses used by various display drivers.
128459f2585Sur  */
129459f2585Sur #define PICA_MONO_BASE	(PICA_V_LOCAL_VIDEO_CTRL + 0x3B4)
130459f2585Sur #define PICA_MONO_BUF	(PICA_V_LOCAL_VIDEO + 0xB0000)
131459f2585Sur #define PICA_CGA_BASE	(PICA_V_LOCAL_VIDEO_CTRL + 0x3D4)
132459f2585Sur #define PICA_CGA_BUF	(PICA_V_LOCAL_VIDEO + 0xB8000)
133459f2585Sur #endif	/* _PICA_H_ */
134