lca_bus_io.c revision 1.4
11.4Scgd/* $NetBSD: lca_bus_io.c,v 1.4 1997/04/07 23:40:36 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.4Scgd#include <machine/options.h> /* Config options headers */ 311.4Scgd#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 321.4Scgd 331.4Scgd__KERNEL_RCSID(1, "$NetBSD: lca_bus_io.c,v 1.4 1997/04/07 23:40:36 cgd Exp $"); 341.1Scgd 351.1Scgd#include <sys/param.h> 361.1Scgd#include <sys/systm.h> 371.1Scgd#include <sys/malloc.h> 381.1Scgd#include <sys/syslog.h> 391.1Scgd#include <sys/device.h> 401.1Scgd#include <vm/vm.h> 411.1Scgd 421.1Scgd#include <machine/bus.h> 431.1Scgd 441.1Scgd#include <alpha/pci/lcareg.h> 451.1Scgd#include <alpha/pci/lcavar.h> 461.1Scgd 471.1Scgd#define CHIP lca 481.1Scgd 491.1Scgd#define CHIP_EX_MALLOC_SAFE(v) (((struct lca_config *)(v))->lc_mallocsafe) 501.1Scgd#define CHIP_IO_EXTENT(v) (((struct lca_config *)(v))->lc_io_ex) 511.1Scgd 521.1Scgd/* IO region 1 */ 531.1Scgd#define CHIP_IO_W1_BUS_START(v) 0x00000000UL 541.1Scgd#define CHIP_IO_W1_BUS_END(v) 0x00ffffffUL 551.1Scgd#define CHIP_IO_W1_SYS_START(v) LCA_PCI_SIO 561.1Scgd#define CHIP_IO_W1_SYS_END(v) (LCA_PCI_SIO + ((0x00ffffffUL + 1) << 5) - 1) 571.1Scgd 581.1Scgd#include "pcs_bus_io_common.c" 59