get rid of homegrown pci_conf_hook(), use the mechanism from arm32_pci_chipset

instead
less difference to evbarm
This commit is contained in:
macallan 2019-01-23 22:13:01 +00:00
parent a964285a66
commit 06f467a6c5
3 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: std.iyonix,v 1.7 2018/01/17 20:30:17 skrll Exp $
# $NetBSD: std.iyonix,v 1.8 2019/01/23 22:13:01 macallan Exp $
#
# standard NetBSD/iyonix for GENERIC options
@ -18,3 +18,5 @@ options ARM_INTR_IMPL="<arch/arm/xscale/i80321_intr.h>"
# We need to configure the PCI bus.
options PCI_NETBSD_CONFIGURE
options I80321_USE_DIRECT_WIN
options __BUS_SPACE_HAS_STREAM_METHODS
options __HAVE_PCI_CONF_HOOK

View File

@ -1,6 +1,3 @@
/* $NetBSD: pci_machdep.h,v 1.2 2005/12/11 12:17:51 christos Exp $ */
/* $NetBSD: pci_machdep.h,v 1.3 2019/01/23 22:13:01 macallan Exp $ */
#include <arm/pci_machdep.h>
#define __HAVE_PCI_CONF_HOOK
int pci_conf_hook(void *, int, int, int, pcireg_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: iyonix_pci.c,v 1.9 2018/11/18 14:12:28 jmcneill Exp $ */
/* $NetBSD: iyonix_pci.c,v 1.10 2019/01/23 22:13:01 macallan Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iyonix_pci.c,v 1.9 2018/11/18 14:12:28 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: iyonix_pci.c,v 1.10 2019/01/23 22:13:01 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -70,6 +70,7 @@ void *iyonix_pci_intr_establish(void *, pci_intr_handle_t,
void iyonix_pci_intr_disestablish(void *, void *);
void pci_conf_write_byte(pci_chipset_tag_t, pcitag_t, int, int);
int pci_conf_read_byte(pci_chipset_tag_t, pcitag_t, int);
int iyonix_pci_conf_hook(void *, int, int, int, pcireg_t);
void
iyonix_pci_init(pci_chipset_tag_t pc, void *cookie)
@ -81,6 +82,7 @@ iyonix_pci_init(pci_chipset_tag_t pc, void *cookie)
pc->pc_intr_evcnt = iyonix_pci_intr_evcnt;
pc->pc_intr_establish = iyonix_pci_intr_establish;
pc->pc_intr_disestablish = iyonix_pci_intr_disestablish;
pc->pc_conf_hook = iyonix_pci_conf_hook;
}
int
@ -182,7 +184,7 @@ pci_conf_read_byte(pci_chipset_tag_t pc, pcitag_t tag, int addr)
}
int
pci_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
iyonix_pci_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
{
/*