xref: /netbsd-src/sys/arch/algor/algor/algor_p5064reg.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: algor_p5064reg.h,v 1.3 2008/04/28 20:23:10 martin Exp $	*/
216b9c606Sthorpej 
316b9c606Sthorpej /*-
416b9c606Sthorpej  * Copyright (c) 2001 The NetBSD Foundation, Inc.
516b9c606Sthorpej  * All rights reserved.
616b9c606Sthorpej  *
716b9c606Sthorpej  * This code is derived from software contributed to The NetBSD Foundation
816b9c606Sthorpej  * by Jason R. Thorpe.
916b9c606Sthorpej  *
1016b9c606Sthorpej  * Redistribution and use in source and binary forms, with or without
1116b9c606Sthorpej  * modification, are permitted provided that the following conditions
1216b9c606Sthorpej  * are met:
1316b9c606Sthorpej  * 1. Redistributions of source code must retain the above copyright
1416b9c606Sthorpej  *    notice, this list of conditions and the following disclaimer.
1516b9c606Sthorpej  * 2. Redistributions in binary form must reproduce the above copyright
1616b9c606Sthorpej  *    notice, this list of conditions and the following disclaimer in the
1716b9c606Sthorpej  *    documentation and/or other materials provided with the distribution.
1816b9c606Sthorpej  *
1916b9c606Sthorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2016b9c606Sthorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2116b9c606Sthorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2216b9c606Sthorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2316b9c606Sthorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2416b9c606Sthorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2516b9c606Sthorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2616b9c606Sthorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2716b9c606Sthorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2816b9c606Sthorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2916b9c606Sthorpej  * POSSIBILITY OF SUCH DAMAGE.
3016b9c606Sthorpej  */
3116b9c606Sthorpej 
3216b9c606Sthorpej /*
3316b9c606Sthorpej  * Memory map and register definitions for the Algorithmics P-5064.
3416b9c606Sthorpej  */
3516b9c606Sthorpej 
36e0787bd6Ssimonb #define	P5064_MEMORY		0x00000000UL	/* onboard DRAM memory */
3716b9c606Sthorpej 			/* 	256 MB		*/
3816b9c606Sthorpej #define	P5064_ISAMEM		0x10000000UL	/* ISA window of PCI memory */
3916b9c606Sthorpej 			/*	8MB		*/
4016b9c606Sthorpej #define	P5064_PCIMEM		0x11000000UL	/* PCI memory window */
4116b9c606Sthorpej 			/*	112MB		*/
4216b9c606Sthorpej #define	P5064_PCIIO		0x1d000000UL	/* PCI I/O window */
4316b9c606Sthorpej 			/*	16MB		*/
4416b9c606Sthorpej #define	P5064_PCICFG		0x1ee00000UL	/* PCI config space */
4516b9c606Sthorpej 			/*	1MB		*/
4616b9c606Sthorpej #define	P5064_V360EPC		0x1ef00000UL	/* V360EPC PCI controller */
4716b9c606Sthorpej 			/*	64KB		*/
4816b9c606Sthorpej #define	P5064_CFGBOOT_W		0x1f800000UL	/* configured bootstrap (W) */
4916b9c606Sthorpej 			/*	512KB		*/
5016b9c606Sthorpej #define	P5064_SOCKET_W		0x1f900000UL	/* socket EPROM (W) */
5116b9c606Sthorpej 			/*	512KB		*/
5216b9c606Sthorpej #define	P5064_FLASH_W		0x1fa00000UL	/* flash (W) */
5316b9c606Sthorpej 			/*	1MB		*/
5416b9c606Sthorpej #define	P5064_CFBOOT		0x1fc00000UL	/* configured bootstrap */
5516b9c606Sthorpej 			/*	512KB		*/
5616b9c606Sthorpej #define	P5064_SOCKET		0x1fd00000UL	/* socket EPROM */
5716b9c606Sthorpej 			/*	512KB		*/
5816b9c606Sthorpej #define	P5064_FLASH		0x1fe00000UL	/* flash */
5916b9c606Sthorpej 			/*	1MB		*/
6016b9c606Sthorpej #define	P5064_LED0		0x1ff00000UL	/* LED (1reg) */
6116b9c606Sthorpej #define	P5064_LED1		0x1ff20010UL	/* LED (4reg) */
6216b9c606Sthorpej #define	P5064_LCD		0x1ff30000UL	/* LCD display */
6316b9c606Sthorpej #define	P5064_Z80GPIO		0x1ff40000UL	/* Z80 GPIO (rev B only) */
6416b9c606Sthorpej #define	P5064_Z80GPIO_IACK	0x1ff50000UL	/* intr. ack. for Z80 */
6516b9c606Sthorpej #define	P5064_DBG_UART		0x1ff60000UL	/* UART on debug board */
6616b9c606Sthorpej #define	P5064_LOCINT		0x1ff90000UL	/* local interrupts */
6716b9c606Sthorpej #define	P5064_PANIC		0x1ff90004UL	/* panic interrupts */
6816b9c606Sthorpej #define	P5064_PCIINT		0x1ff90008UL	/* PCI interrupts */
6916b9c606Sthorpej #define	P5064_ISAINT		0x1ff9000cUL	/* ISA interrupts */
7016b9c606Sthorpej #define	P5064_XBAR0		0x1ff90010UL	/* Int. xbar 0 */
7116b9c606Sthorpej #define	P5064_XBAR1		0x1ff90014UL	/* Int. xbar 1 */
7216b9c606Sthorpej #define	P5064_XBAR2		0x1ff90018UL	/* Int. xbar 2 */
7316b9c606Sthorpej #define	P5064_XBAR3		0x1ff9001cUL	/* Int. xbar 3 */
7416b9c606Sthorpej #define	P5064_XBAR4		0x1ff90020UL	/* Int. xbar 4 */
7516b9c606Sthorpej #define	P5064_KBDINT		0x1ff90024UL	/* keyboard interrupts */
7616b9c606Sthorpej #define	P5064_LOGICREV		0x1ff9003cUL	/* logic revision */
7716b9c606Sthorpej #define	P5064_CFG0		0x1ffa0000UL	/* board configuration 0 */
7816b9c606Sthorpej #define	P5064_CFG1		0x1ffb0000UL	/* board configuration 1 */
7916b9c606Sthorpej #define	P5064_DRAMCFG		0x1ffc0000UL	/* DRAM configuration */
8016b9c606Sthorpej #define	P5064_BOARDREV		0x1ffd0000UL	/* board revision */
8116b9c606Sthorpej #define	P5064_PCIMEM_HI		0x20000000UL	/* PCI memory high window */
8216b9c606Sthorpej 			/*	3.5GB		*/
8316b9c606Sthorpej 
8416b9c606Sthorpej /* P5064_LOCINT */
8516b9c606Sthorpej #define	LOCINT_PCIBR		0x01
8616b9c606Sthorpej #define	LOCINT_FLP		0x02
8716b9c606Sthorpej #define	LOCINT_MKBD		0x04
8816b9c606Sthorpej #define	LOCINT_COM1		0x08
8916b9c606Sthorpej #define	LOCINT_COM2		0x10
9016b9c606Sthorpej #define	LOCINT_CENT		0x20
9116b9c606Sthorpej #define	LOCINT_RTC		0x80
9216b9c606Sthorpej 
9316b9c606Sthorpej /* P5064_PANIC */
9416b9c606Sthorpej #define	PANIC_DEBUG		0x01
9516b9c606Sthorpej #define	PANIC_PFAIL		0x02
9616b9c606Sthorpej #define	PANIC_BERR		0x04
9716b9c606Sthorpej #define	PANIC_ISANMI		0x08
9816b9c606Sthorpej #define	PANIC_IOPERR		0x10
9916b9c606Sthorpej #define	PANIC_CENT		0x20
10016b9c606Sthorpej #define	PANIC_EWAKE		0x40
10116b9c606Sthorpej #define	PANIC_ECODERR		0x80
10216b9c606Sthorpej 
10316b9c606Sthorpej /* P5064_PCIINT */
10416b9c606Sthorpej #define	PCIINT_EMDINT		0x01
10516b9c606Sthorpej #define	PCIINT_ETH		0x02
10616b9c606Sthorpej #define	PCIINT_SCSI		0x04
10716b9c606Sthorpej #define	PCIINT_USB		0x08
10816b9c606Sthorpej #define	PCIINT_PCI0		0x10
10916b9c606Sthorpej #define	PCIINT_PCI1		0x20
11016b9c606Sthorpej #define	PCIINT_PCI2		0x40
11116b9c606Sthorpej #define	PCIINT_PCI3		0x80
11216b9c606Sthorpej 
11316b9c606Sthorpej /* P5064_ISAINT */
11416b9c606Sthorpej #define	ISAINT_ISABR		0x01
11516b9c606Sthorpej #define	ISAINT_IDE0		0x02
11616b9c606Sthorpej #define	ISAINT_IDE1		0x04
11716b9c606Sthorpej 
11816b9c606Sthorpej /* P5064_KBDINT */
11916b9c606Sthorpej #define	KBDINT_KBD		0x01
12016b9c606Sthorpej #define	KBDINT_MOUSE		0x02
12116b9c606Sthorpej 
12216b9c606Sthorpej /*
12316b9c606Sthorpej  * The Algorithmics PMON initializes two DMA windows:
12416b9c606Sthorpej  *
12516b9c606Sthorpej  *	THE MANUAL CLAIMS THIS:
12616b9c606Sthorpej  *	PCI 0080.0000 -> Phys 0080.0000 (8MB)
12716b9c606Sthorpej  *
12816b9c606Sthorpej  *	THE PMON FIRMWARE DOES THIS:
12916b9c606Sthorpej  *	PCI 0080.0000 -> Phys 0000.0000 (8MB)
13016b9c606Sthorpej  *
13116b9c606Sthorpej  *	PCI 8000.0000 -> Phys 0000.0000 (256MB)
13216b9c606Sthorpej  */
13316b9c606Sthorpej #define	P5064_DMA_ISA_PCIBASE	0x00800000UL
13416b9c606Sthorpej #define	P5064_DMA_ISA_PHYSBASE	0x00000000UL
13516b9c606Sthorpej #define	P5064_DMA_ISA_SIZE	(8 * 1024 * 1024)
13616b9c606Sthorpej 
13716b9c606Sthorpej #define	P5064_DMA_PCI_PCIBASE	0x80000000UL
13816b9c606Sthorpej #define	P5064_DMA_PCI_PHYSBASE	0x00000000UL
13916b9c606Sthorpej #define	P5064_DMA_PCI_SIZE	(256 * 1024 * 1024)
140