11.6Sthorpej/* $NetBSD: pciide_machdep.c,v 1.6 2020/09/22 15:24:02 thorpej Exp $ */ 21.1Sthorpej 31.1Sthorpej/* 41.1Sthorpej * Copyright (c) 1998 Christopher G. Demetriou. All rights reserved. 51.1Sthorpej * 61.1Sthorpej * Redistribution and use in source and binary forms, with or without 71.1Sthorpej * modification, are permitted provided that the following conditions 81.1Sthorpej * are met: 91.1Sthorpej * 1. Redistributions of source code must retain the above copyright 101.1Sthorpej * notice, this list of conditions and the following disclaimer. 111.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 121.1Sthorpej * notice, this list of conditions and the following disclaimer in the 131.1Sthorpej * documentation and/or other materials provided with the distribution. 141.1Sthorpej * 3. All advertising materials mentioning features or use of this software 151.1Sthorpej * must display the following acknowledgement: 161.1Sthorpej * This product includes software developed by Christopher G. Demetriou 171.1Sthorpej * for the NetBSD Project. 181.1Sthorpej * 4. The name of the author may not be used to endorse or promote products 191.1Sthorpej * derived from this software without specific prior written permission 201.1Sthorpej * 211.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Sthorpej * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Sthorpej * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Sthorpej * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Sthorpej * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Sthorpej * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Sthorpej * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Sthorpej * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Sthorpej * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Sthorpej * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Sthorpej */ 321.1Sthorpej 331.1Sthorpej/* 341.1Sthorpej * PCI IDE controller driver (Alpha machine-dependent portion). 351.1Sthorpej * 361.1Sthorpej * Author: Christopher G. Demetriou, March 2, 1998 (derived from NetBSD 371.1Sthorpej * sys/dev/pci/ppb.c, revision 1.16). 381.1Sthorpej * 391.1Sthorpej * See "PCI IDE Controller Specification, Revision 1.0 3/4/94" from the 401.1Sthorpej * PCI SIG. 411.1Sthorpej */ 421.1Sthorpej 431.1Sthorpej#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 441.1Sthorpej 451.6Sthorpej__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.6 2020/09/22 15:24:02 thorpej Exp $"); 461.1Sthorpej 471.1Sthorpej#include <sys/param.h> 481.1Sthorpej#include <sys/systm.h> 491.1Sthorpej#include <sys/device.h> 501.1Sthorpej 511.1Sthorpej#include <dev/pci/pcireg.h> 521.1Sthorpej#include <dev/pci/pcivar.h> 531.1Sthorpej#include <dev/pci/pciidereg.h> 541.1Sthorpej#include <dev/pci/pciidevar.h> 551.1Sthorpej 561.1Sthorpej#include <dev/isa/isavar.h> 571.1Sthorpej 581.1Sthorpejvoid * 591.5Sdyoungpciide_machdep_compat_intr_establish(device_t dev, 601.5Sdyoung const struct pci_attach_args *pa, int chan, int (*func)(void *), void *arg) 611.1Sthorpej{ 621.1Sthorpej pci_chipset_tag_t pc = pa->pa_pc; 631.1Sthorpej 641.6Sthorpej if (pc->pc_pciide_compat_intr_establish == NULL) 651.6Sthorpej return NULL; 661.6Sthorpej 671.6Sthorpej return pc->pc_pciide_compat_intr_establish(dev, pa, chan, func, arg); 681.1Sthorpej} 69