Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/iyonix get rid of homegrown pci_conf_hook(), use th...



details:   https://anonhg.NetBSD.org/src/rev/41876ff39a34
branches:  trunk
changeset: 448175:41876ff39a34
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jan 23 22:13:01 2019 +0000

description:
get rid of homegrown pci_conf_hook(), use the mechanism from arm32_pci_chipset
instead
less difference to evbarm

diffstat:

 sys/arch/iyonix/conf/std.iyonix       |  4 +++-
 sys/arch/iyonix/include/pci_machdep.h |  5 +----
 sys/arch/iyonix/iyonix/iyonix_pci.c   |  8 +++++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r a8d86ceace89 -r 41876ff39a34 sys/arch/iyonix/conf/std.iyonix
--- a/sys/arch/iyonix/conf/std.iyonix   Wed Jan 23 20:46:18 2019 +0000
+++ b/sys/arch/iyonix/conf/std.iyonix   Wed Jan 23 22:13:01 2019 +0000
@@ -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 @@
 # 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
diff -r a8d86ceace89 -r 41876ff39a34 sys/arch/iyonix/include/pci_machdep.h
--- a/sys/arch/iyonix/include/pci_machdep.h     Wed Jan 23 20:46:18 2019 +0000
+++ b/sys/arch/iyonix/include/pci_machdep.h     Wed Jan 23 22:13:01 2019 +0000
@@ -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);
-
diff -r a8d86ceace89 -r 41876ff39a34 sys/arch/iyonix/iyonix/iyonix_pci.c
--- a/sys/arch/iyonix/iyonix/iyonix_pci.c       Wed Jan 23 20:46:18 2019 +0000
+++ b/sys/arch/iyonix/iyonix/iyonix_pci.c       Wed Jan 23 22:13:01 2019 +0000
@@ -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_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 @@
        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 @@
 }
 
 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)
 {
 
        /*



Home | Main Index | Thread Index | Old Index