/* $NetBSD: nexus.h,v 1.27 2011/06/05 16:59:21 matt Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)nexus.h 7.3 (Berkeley) 5/9/91
*/
/*
* ABus support added by Johnny Billquist 2010.
*/
#ifndef _VAX_NEXUS_H_
#define _VAX_NEXUS_H_
#include <machine/bus.h>
#ifdef _KERNEL
#include "opt_cputype.h"
#endif
/*
* Different definitions for nicer autoconf probing.
*/
enum bustypes {
VAX_SBIBUS, /* SBI parent (780) */
VAX_CMIBUS, /* CMI backplane (750) */
VAX_UNIBUS, /* Direct backplane (730) */
VAX_ABUS, /* ABus (8600) */
VAX_BIBUS, /* BI bus (8200) */
VAX_NMIBUS, /* NMI backplane (8800) */
VAX_VSBUS, /* Virtual vaxstation bus */
VAX_IBUS, /* Internal Microvax bus */
VAX_XMIBUS, /* XMI master bus (6000) */
};
/*
* Information about nexus's.
*
* Each machine has an address of backplane slots (nexi).
* Each nexus is some type of adapter, whose code is the low
* byte of the first word of the adapter address space.
* At boot time the system looks through the array of available
* slots and finds the interconnects for the machine.
*
* VAX8600 nexus information is located in ioa.h
*/
#define IO_CMI750 2
#define MAXNMCR 1
struct nexus {
union nexcsr {
long nex_csr;
u_char nex_type;
} nexcsr;
long nex_pad[NEXSIZE / sizeof (long) - 1];
};
struct abus_attach_args {
const char *aa_name;
int aa_type;
bus_addr_t aa_base;
int aa_num;
bus_space_tag_t aa_iot;
bus_space_handle_t aa_ioh;
bus_dma_tag_t aa_dmat;
};
struct sbi_attach_args {
int sa_nexnum; /* This nexus TR number */
int sa_type; /* This nexus type */
int sa_sbinum;
bus_space_tag_t sa_iot;
bus_space_handle_t sa_ioh;
bus_dma_tag_t sa_dmat;
bus_addr_t sa_base;
};
/* Memory device struct. This should be somewhere else */
struct mem_softc {
device_t sc_dev;
void * sc_memaddr;
int sc_memtype;
int sc_memnr;
};
struct ibus_attach_args {
const char *ia_type;
int ia_num;
int ia_partyp;
paddr_t ia_addr;
};
#endif