xref: /netbsd-src/sys/arch/algor/algor/algor_p5064var.h (revision eee38be7e41353fb57e0e7a817720a94e3fb7163)
1*eee38be7Smatt /*	$NetBSD: algor_p5064var.h,v 1.9 2011/07/08 18:48:56 matt 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 
32391925c7Sdyoung #include <sys/bus.h>
3316b9c606Sthorpej #include <dev/pci/pcivar.h>
3416b9c606Sthorpej #include <dev/isa/isavar.h>
3516b9c606Sthorpej 
3616b9c606Sthorpej struct p5064_config {
37*eee38be7Smatt 	struct mips_bus_space ac_iot;
38*eee38be7Smatt 	struct mips_bus_space ac_memt;
3916b9c606Sthorpej 
40*eee38be7Smatt 	struct mips_bus_dma_tag ac_pci_dmat;
41*eee38be7Smatt 	struct mips_bus_dma_tag ac_isa_dmat;
4216b9c606Sthorpej 
43*eee38be7Smatt 	struct mips_pci_chipset ac_pc;
44*eee38be7Smatt 	struct mips_isa_chipset ac_ic;
4516b9c606Sthorpej 
4616b9c606Sthorpej 	struct extent *ac_io_ex;
4716b9c606Sthorpej 	struct extent *ac_mem_ex;
4816b9c606Sthorpej 
4916b9c606Sthorpej 	int	ac_mallocsafe;
5016b9c606Sthorpej };
5116b9c606Sthorpej 
5216b9c606Sthorpej #ifdef _KERNEL
537c074dc8Sthorpej #define	P5064_IRQ_ETHERNET	4
547c074dc8Sthorpej #define	P5064_IRQ_SCSI		5
557c074dc8Sthorpej #define	P5064_IRQ_USB		6
567c074dc8Sthorpej 
577c074dc8Sthorpej #define	P5064_IRQ_MKBD		7
587c074dc8Sthorpej #define	P5064_IRQ_COM1		8
597c074dc8Sthorpej #define	P5064_IRQ_COM2		9
607c074dc8Sthorpej #define	P5064_IRQ_FLOPPY	10
617c074dc8Sthorpej #define	P5064_IRQ_CENTRONICS	11
627c074dc8Sthorpej #define	P5064_IRQ_RTC		12
637c074dc8Sthorpej 
647c074dc8Sthorpej #define	P5064_IRQ_ISABRIDGE	13
657c074dc8Sthorpej #define	P5064_IRQ_IDE0		14
667c074dc8Sthorpej #define	P5064_IRQ_IDE1		15
677c074dc8Sthorpej 
6816b9c606Sthorpej extern struct p5064_config p5064_configuration;
69f3410434Sthorpej extern const int p5064_isa_to_irqmap[];
7016b9c606Sthorpej 
7116b9c606Sthorpej void	algor_p5064_bus_io_init(bus_space_tag_t, void *);
7216b9c606Sthorpej void	algor_p5064_bus_mem_init(bus_space_tag_t, void *);
7316b9c606Sthorpej 
7416b9c606Sthorpej void	algor_p5064_dma_init(struct p5064_config *);
7516b9c606Sthorpej 
7616b9c606Sthorpej void	algor_p5064_intr_init(struct p5064_config *);
7716b9c606Sthorpej 
78ea810943Smatt void	algor_p5064_iointr(int, vaddr_t, uint32_t);
79ce66bf08Sthorpej 
80ce66bf08Sthorpej void	algor_p5064_cal_timer(bus_space_tag_t, bus_space_handle_t);
8116b9c606Sthorpej #endif /* _KERNEL */
82