/*
* Copyright (c) 2002 Steve Rumble
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/
static int
pic_match(device_t parent, cfdata_t match, void *aux)
{
/*
* PIC exists on IP12 systems. It appears to be the immediate
* ancestor of the mc, for mips1 processors.
*/
if (mach_type == MACH_SGI_IP12)
return 1;
else
return 0;
}
psc.iot = normal_memt;
if (bus_space_map(psc.iot, ma->ma_addr, 0x20010,
BUS_SPACE_MAP_LINEAR, &psc.ioh))
panic("pic_attach: could not allocate memory\n");
/* default gio32 burst time */
bus_space_write_4(psc.iot, psc.ioh, PIC_GIO32ARB_BURST,
PIC_GIO32ARB_DEFBURST);
/* default gio32 delay time */
bus_space_write_4(psc.iot, psc.ioh, PIC_GIO32ARB_DELAY,
PIC_GIO32ARB_DEFDELAY);
printf("\n");
platform.intr5 = pic_bus_error;
/*
* A GIO bus exists on all IP12's. However, Personal Iris
* machines use VME for their expansion bus.
*/
iaa.iaa_name = "gio";
(void)config_found(self, (void *)&iaa, pic_print, CFARGS_NONE);