lca_bus_io.c revision 1.3
11.3Scgd/* $NetBSD: lca_bus_io.c,v 1.3 1997/04/07 06:36:55 cgd Exp $ */
21.1Scgd
31.1Scgd/*
41.1Scgd * Copyright (c) 1996 Carnegie-Mellon University.
51.1Scgd * All rights reserved.
61.1Scgd *
71.1Scgd * Author: Chris G. Demetriou
81.1Scgd *
91.1Scgd * Permission to use, copy, modify and distribute this software and
101.1Scgd * its documentation is hereby granted, provided that both the copyright
111.1Scgd * notice and this permission notice appear in all copies of the
121.1Scgd * software, derivative works or modified versions, and any portions
131.1Scgd * thereof, and that both notices appear in supporting documentation.
141.1Scgd *
151.1Scgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
161.1Scgd * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
171.1Scgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
181.1Scgd *
191.1Scgd * Carnegie Mellon requests users of this software to return to
201.1Scgd *
211.1Scgd *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
221.1Scgd *  School of Computer Science
231.1Scgd *  Carnegie Mellon University
241.1Scgd *  Pittsburgh PA 15213-3890
251.1Scgd *
261.1Scgd * any improvements or extensions that they make and grant Carnegie the
271.1Scgd * rights to redistribute these changes.
281.1Scgd */
291.3Scgd
301.3Scgd#include <machine/options.h>		/* Pull in config options headers */
311.1Scgd
321.1Scgd#include <sys/param.h>
331.1Scgd#include <sys/systm.h>
341.1Scgd#include <sys/malloc.h>
351.1Scgd#include <sys/syslog.h>
361.1Scgd#include <sys/device.h>
371.1Scgd#include <vm/vm.h>
381.1Scgd
391.1Scgd#include <machine/bus.h>
401.1Scgd
411.1Scgd#include <alpha/pci/lcareg.h>
421.1Scgd#include <alpha/pci/lcavar.h>
431.1Scgd
441.1Scgd#define	CHIP		lca
451.1Scgd
461.1Scgd#define	CHIP_EX_MALLOC_SAFE(v)	(((struct lca_config *)(v))->lc_mallocsafe)
471.1Scgd#define	CHIP_IO_EXTENT(v)	(((struct lca_config *)(v))->lc_io_ex)
481.1Scgd
491.1Scgd/* IO region 1 */
501.1Scgd#define	CHIP_IO_W1_BUS_START(v)	0x00000000UL
511.1Scgd#define	CHIP_IO_W1_BUS_END(v)	0x00ffffffUL
521.1Scgd#define	CHIP_IO_W1_SYS_START(v)	LCA_PCI_SIO
531.1Scgd#define	CHIP_IO_W1_SYS_END(v)	(LCA_PCI_SIO + ((0x00ffffffUL + 1) << 5) - 1)
541.1Scgd
551.1Scgd#include "pcs_bus_io_common.c"
56