irongate_bus_io.c revision 1.1
11.1Sthorpej/* $NetBSD: irongate_bus_io.c,v 1.1 2000/06/01 20:30:30 thorpej Exp $ */
21.1Sthorpej
31.1Sthorpej/*-
41.1Sthorpej * Copyright (c) 2000 The NetBSD Foundation, Inc.
51.1Sthorpej * All rights reserved.
61.1Sthorpej *
71.1Sthorpej * This code is derived from software contributed to The NetBSD Foundation
81.1Sthorpej * by Jason R. Thorpe.
91.1Sthorpej *
101.1Sthorpej * Redistribution and use in source and binary forms, with or without
111.1Sthorpej * modification, are permitted provided that the following conditions
121.1Sthorpej * are met:
131.1Sthorpej * 1. Redistributions of source code must retain the above copyright
141.1Sthorpej *    notice, this list of conditions and the following disclaimer.
151.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright
161.1Sthorpej *    notice, this list of conditions and the following disclaimer in the
171.1Sthorpej *    documentation and/or other materials provided with the distribution.
181.1Sthorpej * 3. All advertising materials mentioning features or use of this software
191.1Sthorpej *    must display the following acknowledgement:
201.1Sthorpej *	This product includes software developed by the NetBSD
211.1Sthorpej *	Foundation, Inc. and its contributors.
221.1Sthorpej * 4. Neither the name of The NetBSD Foundation nor the names of its
231.1Sthorpej *    contributors may be used to endorse or promote products derived
241.1Sthorpej *    from this software without specific prior written permission.
251.1Sthorpej *
261.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.1Sthorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.1Sthorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.1Sthorpej * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.1Sthorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.1Sthorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.1Sthorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.1Sthorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.1Sthorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.1Sthorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.1Sthorpej * POSSIBILITY OF SUCH DAMAGE.
371.1Sthorpej */
381.1Sthorpej
391.1Sthorpej#include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
401.1Sthorpej
411.1Sthorpej__KERNEL_RCSID(1, "$NetBSD: irongate_bus_io.c,v 1.1 2000/06/01 20:30:30 thorpej Exp $");
421.1Sthorpej
431.1Sthorpej#include <sys/param.h>
441.1Sthorpej#include <sys/systm.h>
451.1Sthorpej#include <sys/malloc.h>
461.1Sthorpej#include <sys/syslog.h>
471.1Sthorpej#include <sys/device.h>
481.1Sthorpej#include <vm/vm.h>
491.1Sthorpej
501.1Sthorpej#include <machine/bus.h>
511.1Sthorpej
521.1Sthorpej#include <alpha/pci/irongatereg.h>
531.1Sthorpej#include <alpha/pci/irongatevar.h>
541.1Sthorpej
551.1Sthorpej#define	CHIP		irongate
561.1Sthorpej
571.1Sthorpej#define	CHIP_EX_MALLOC_SAFE(v)	(((struct irongate_config *)(v))->ic_mallocsafe)
581.1Sthorpej#define	CHIP_IO_EXTENT(v)	(((struct irongate_config *)(v))->ic_io_ex)
591.1Sthorpej
601.1Sthorpej#define	CHIP_IO_SYS_START(v)	IRONGATE_IO_BASE
611.1Sthorpej
621.1Sthorpej/*
631.1Sthorpej * AMD 751 core logic appears on EV6.  We require at least EV56
641.1Sthorpej * support for the assembler to emit BWX opcodes.
651.1Sthorpej */
661.1Sthorpej__asm(".arch ev6");
671.1Sthorpej
681.1Sthorpej#include <alpha/pci/pci_bwx_bus_io_chipdep.c>
69