From 78c7ebb2d07f017d09d4709412006de76cde19c7 Mon Sep 17 00:00:00 2001 From: thorpej Date: Sat, 18 Apr 1998 01:10:54 +0000 Subject: [PATCH] Add a second Alpha-specific pci_chipset_tag_t method for establishing PCI IDE compat interrupts. Note that this function is optional, and platform-specific code may initialize the pointer to NULL. --- sys/arch/alpha/pci/pci_machdep.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arch/alpha/pci/pci_machdep.h b/sys/arch/alpha/pci/pci_machdep.h index 2a75f06e64b5..b735b08c158d 100644 --- a/sys/arch/alpha/pci/pci_machdep.h +++ b/sys/arch/alpha/pci/pci_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.8 1997/07/19 09:50:02 cgd Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.9 1998/04/18 01:10:54 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -38,6 +38,11 @@ typedef struct alpha_pci_chipset *pci_chipset_tag_t; typedef u_long pcitag_t; typedef u_long pci_intr_handle_t; +/* + * Forward declarations. + */ +struct pci_attach_args; + /* * alpha-specific PCI structure and type definitions. * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. @@ -62,6 +67,9 @@ struct alpha_pci_chipset { /* alpha-specific */ void (*pc_decompose_tag) __P((void *, pcitag_t, int *, int *, int *)); + void *(*pc_pciide_compat_intr_establish) __P((void *, + struct device *, struct pci_attach_args *, int, + int (*)(void *), void *)); }; /* @@ -94,3 +102,7 @@ void pci_display_console __P((bus_space_tag_t, bus_space_tag_t, pci_chipset_tag_t, int, int, int)); #define alpha_pci_decompose_tag(c, t, bp, dp, fp) \ (*(c)->pc_decompose_tag)((c)->pc_conf_v, (t), (bp), (dp), (fp)) +#define alpha_pciide_compat_intr_establish(c, d, p, ch, f, a) \ + ((c)->pc_pciide_compat_intr_establish == NULL ? NULL : \ + (*(c)->pc_pciide_compat_intr_establish)((c)->pc_conf_v, (d), (p), \ + (ch), (f), (a)))