Fix pci_conf_hook/interrupt for ARM.

This commit is contained in:
matt 2012-09-07 04:25:36 +00:00
parent 1bf0c8b153
commit a8140c3a49
5 changed files with 24 additions and 14 deletions

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.c,v 1.3 2012/09/07 03:05:12 matt Exp $ */
/* $NetBSD: pci_machdep.c,v 1.4 2012/09/07 04:25:36 matt Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.3 2012/09/07 03:05:12 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.4 2012/09/07 04:25:36 matt Exp $");
#include "opt_mvsoc.h"
#include "gtpci.h"
@ -154,6 +154,8 @@ struct arm32_pci_chipset arm32_mvpex1_chipset = {
#endif
#if NGTPCI > 0
/* ARGSUSED */
void
gtpci_conf_interrupt(void *v, int bus, int dev, int pin, int swiz, int *iline)
{
@ -161,8 +163,6 @@ gtpci_conf_interrupt(void *v, int bus, int dev, int pin, int swiz, int *iline)
/* nothing */
}
#if NGTPCI > 0
#if NGTPCI_MBUS > 0
#define GTPCI_MBUS_CA 0x0c78 /* Configuration Address */
#define GTPCI_MBUS_CD 0x0c7c /* Configuration Data */
@ -266,6 +266,14 @@ gtpci_gpp_intr_disestablish(void *v, void *ih)
#endif
#if NMVPEX_MBUS > 0
/* ARGSUSED */
void
mvpex_conf_interrupt(void *v, int bus, int dev, int ipin, int swiz, int *ilinep)
{
/* nothing */
}
static pcireg_t
mvpex_mbus_conf_read(void *v, pcitag_t tag, int reg)
{

@ -1,4 +1,4 @@
/* $NetBSD: gtpci.c,v 1.29 2012/01/27 18:53:08 para Exp $ */
/* $NetBSD: gtpci.c,v 1.30 2012/09/07 04:25:37 matt Exp $ */
/*
* Copyright (c) 2008, 2009 KIYOHARA Takashi
* All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.29 2012/01/27 18:53:08 para Exp $");
__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.30 2012/09/07 04:25:37 matt Exp $");
#include "opt_pci.h"
#include "pci.h"
@ -589,7 +589,7 @@ gtpci_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
/* ARGSUSED */
int
gtpci_conf_hook(pci_chipset_tag_t pc, int bus, int dev, int func, pcireg_t id)
gtpci_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
{
/* Oops, We have two PCI buses. */
if (dev == 0 &&

@ -1,4 +1,4 @@
/* $NetBSD: gtpcivar.h,v 1.10 2010/06/02 06:44:32 kiyohara Exp $ */
/* $NetBSD: gtpcivar.h,v 1.11 2012/09/07 04:25:37 matt Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@ -52,7 +52,8 @@ pcitag_t gtpci_make_tag(void *, int, int, int);
void gtpci_decompose_tag(void *, pcitag_t, int *, int *, int *);
pcireg_t gtpci_conf_read(void *, pcitag_t, int);
void gtpci_conf_write(void *, pcitag_t, int, pcireg_t);
int gtpci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
int gtpci_conf_hook(void *, int, int, int, pcireg_t);
void gtpci_conf_interrupt(void *, int, int, int, int, int *);
int gtpci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *gtpci_intr_string(void *, pci_intr_handle_t);
const struct evcnt *gtpci_intr_evcnt(void *, pci_intr_handle_t);

@ -1,4 +1,4 @@
/* $NetBSD: mvpex.c,v 1.6 2012/01/27 18:53:08 para Exp $ */
/* $NetBSD: mvpex.c,v 1.7 2012/09/07 04:25:37 matt Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.6 2012/01/27 18:53:08 para Exp $");
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.7 2012/09/07 04:25:37 matt Exp $");
#include "opt_pci.h"
#include "pci.h"
@ -586,7 +586,7 @@ mvpex_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
/* ARGSUSED */
int
mvpex_conf_hook(pci_chipset_tag_t pc, int bus, int dev, int func, pcireg_t id)
mvpex_conf_hook(void *v, int bus, int dev, int func, pcireg_t id)
{
if (bus == 0 && dev == 0) /* don't configure GT */

@ -1,4 +1,4 @@
/* $NetBSD: mvpexvar.h,v 1.2 2011/04/04 20:37:56 dyoung Exp $ */
/* $NetBSD: mvpexvar.h,v 1.3 2012/09/07 04:25:37 matt Exp $ */
/*
* Copyright (c) 2009 KIYOHARA Takashi
* All rights reserved.
@ -65,7 +65,8 @@ pcitag_t mvpex_make_tag(void *, int, int, int);
void mvpex_decompose_tag(void *, pcitag_t, int *, int *, int *);
pcireg_t mvpex_conf_read(void *, pcitag_t, int);
void mvpex_conf_write(void *, pcitag_t, int, pcireg_t);
int mvpex_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
int mvpex_conf_hook(void *, int, int, int, pcireg_t);
void mvpex_conf_interrupt(void *, int, int, int, int, int *);
int mvpex_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
const char *mvpex_intr_string(void *, pci_intr_handle_t);
const struct evcnt *mvpex_intr_evcnt(void *, pci_intr_handle_t);