1*47e06126Smatt /* $NetBSD: pciide_machdep.c,v 1.1 2011/07/09 15:57:39 matt Exp $ */
2*47e06126Smatt
3*47e06126Smatt /*
4*47e06126Smatt * Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
5*47e06126Smatt *
6*47e06126Smatt * Redistribution and use in source and binary forms, with or without
7*47e06126Smatt * modification, are permitted provided that the following conditions
8*47e06126Smatt * are met:
9*47e06126Smatt * 1. Redistributions of source code must retain the above copyright
10*47e06126Smatt * notice, this list of conditions and the following disclaimer.
11*47e06126Smatt * 2. Redistributions in binary form must reproduce the above copyright
12*47e06126Smatt * notice, this list of conditions and the following disclaimer in the
13*47e06126Smatt * documentation and/or other materials provided with the distribution.
14*47e06126Smatt * 3. All advertising materials mentioning features or use of this software
15*47e06126Smatt * must display the following acknowledgement:
16*47e06126Smatt * This product includes software developed by Christopher G. Demetriou
17*47e06126Smatt * for the NetBSD Project.
18*47e06126Smatt * 4. The name of the author may not be used to endorse or promote products
19*47e06126Smatt * derived from this software without specific prior written permission
20*47e06126Smatt *
21*47e06126Smatt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22*47e06126Smatt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23*47e06126Smatt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24*47e06126Smatt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25*47e06126Smatt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26*47e06126Smatt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*47e06126Smatt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*47e06126Smatt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*47e06126Smatt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30*47e06126Smatt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*47e06126Smatt */
32*47e06126Smatt
33*47e06126Smatt /*
34*47e06126Smatt * PCI IDE controller driver (malta machine-dependent portion).
35*47e06126Smatt *
36*47e06126Smatt * Author: Christopher G. Demetriou, March 2, 1998 (derived from NetBSD
37*47e06126Smatt * sys/dev/pci/ppb.c, revision 1.16).
38*47e06126Smatt *
39*47e06126Smatt * See "PCI IDE Controller Specification, Revision 1.0 3/4/94" from the
40*47e06126Smatt * PCI SIG.
41*47e06126Smatt */
42*47e06126Smatt
43*47e06126Smatt #include <sys/cdefs.h>
44*47e06126Smatt __KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.1 2011/07/09 15:57:39 matt Exp $");
45*47e06126Smatt
46*47e06126Smatt #include <sys/param.h>
47*47e06126Smatt #include <sys/device.h>
48*47e06126Smatt
49*47e06126Smatt #include <dev/pci/pcireg.h>
50*47e06126Smatt #include <dev/pci/pcivar.h>
51*47e06126Smatt #include <dev/pci/pciidereg.h>
52*47e06126Smatt #include <dev/pci/pciidevar.h>
53*47e06126Smatt
54*47e06126Smatt void *
pciide_machdep_compat_intr_establish(device_t dev,const struct pci_attach_args * pa,int chan,int (* func)(void *),void * arg)55*47e06126Smatt pciide_machdep_compat_intr_establish(device_t dev,
56*47e06126Smatt const struct pci_attach_args *pa, int chan, int (*func)(void *), void *arg)
57*47e06126Smatt {
58*47e06126Smatt pci_chipset_tag_t pc = pa->pa_pc;
59*47e06126Smatt
60*47e06126Smatt if (pc->pc_pciide_compat_intr_establish == NULL)
61*47e06126Smatt return (NULL);
62*47e06126Smatt return (mips_pciide_compat_intr_establish(pc, dev, pa, chan,
63*47e06126Smatt func, arg));
64*47e06126Smatt }
65