Pass the interrupt swizzle down to the platforms' fixup functions.
N.B. Only using it on the ulmb60xa for now.
This commit is contained in:
parent
4880e83638
commit
db5b1f2fa2
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: platform.h,v 1.8 2004/06/26 21:51:04 kleink Exp $ */
|
/* $NetBSD: platform.h,v 1.9 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -48,7 +48,7 @@ struct platform {
|
||||||
const char *model;
|
const char *model;
|
||||||
int (*match)(struct platform *);
|
int (*match)(struct platform *);
|
||||||
void (*pci_get_chipset_tag)(pci_chipset_tag_t);
|
void (*pci_get_chipset_tag)(pci_chipset_tag_t);
|
||||||
void (*pci_intr_fixup)(int, int, int *);
|
void (*pci_intr_fixup)(int, int, int, int *);
|
||||||
void (*init_intr)(void);
|
void (*init_intr)(void);
|
||||||
void (*cpu_setup)(struct device *);
|
void (*cpu_setup)(struct device *);
|
||||||
void (*reset)(void);
|
void (*reset)(void);
|
||||||
|
@ -65,7 +65,7 @@ extern const char *obiodevs_nodev[];
|
||||||
|
|
||||||
int ident_platform(void);
|
int ident_platform(void);
|
||||||
int platform_generic_match(struct platform *);
|
int platform_generic_match(struct platform *);
|
||||||
void pci_intr_nofixup(int, int, int *);
|
void pci_intr_nofixup(int, int, int, int *);
|
||||||
void cpu_setup_unknown(struct device *);
|
void cpu_setup_unknown(struct device *);
|
||||||
void reset_unknown(void);
|
void reset_unknown(void);
|
||||||
void reset_prep_generic(void);
|
void reset_prep_generic(void);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.18 2003/07/15 02:54:51 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.19 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -192,7 +192,7 @@ prep_pci_conf_interrupt(void *v, int bus, int dev, int pin,
|
||||||
int swiz, int *iline)
|
int swiz, int *iline)
|
||||||
{
|
{
|
||||||
|
|
||||||
(*platform->pci_intr_fixup)(bus, dev, iline);
|
(*platform->pci_intr_fixup)(bus, dev, swiz, iline);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ibm_6015.c,v 1.1 2004/06/26 21:51:04 kleink Exp $ */
|
/* $NetBSD: ibm_6015.c,v 1.2 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
#include <machine/platform.h>
|
#include <machine/platform.h>
|
||||||
|
|
||||||
void pci_intr_fixup_ibm_6015(int, int, int *);
|
void pci_intr_fixup_ibm_6015(int, int, int, int *);
|
||||||
|
|
||||||
struct platform platform_ibm_6015 = {
|
struct platform platform_ibm_6015 = {
|
||||||
"IBM PPS Model 6015", /* model */
|
"IBM PPS Model 6015", /* model */
|
||||||
|
@ -55,7 +55,7 @@ struct platform platform_ibm_6015 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
pci_intr_fixup_ibm_6015(int bus, int dev, int *line)
|
pci_intr_fixup_ibm_6015(int bus, int dev, int swiz, int *line)
|
||||||
{
|
{
|
||||||
if (bus != 0)
|
if (bus != 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ibm_6040.c,v 1.3 2003/07/15 02:54:52 lukem Exp $ */
|
/* $NetBSD: ibm_6040.c,v 1.4 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ibm_6040.c,v 1.3 2003/07/15 02:54:52 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ibm_6040.c,v 1.4 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibm_6040.c,v 1.3 2003/07/15 02:54:52 lukem Exp $");
|
||||||
#include <machine/platform.h>
|
#include <machine/platform.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static void pci_intr_fixup_ibm_6040(int, int, int *);
|
static void pci_intr_fixup_ibm_6040(int, int, int, int *);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char *obiodevs_ibm_6040[] = {
|
static const char *obiodevs_ibm_6040[] = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ibm_6050.c,v 1.7 2003/07/15 02:54:52 lukem Exp $ */
|
/* $NetBSD: ibm_6050.c,v 1.8 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,14 +37,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ibm_6050.c,v 1.7 2003/07/15 02:54:52 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ibm_6050.c,v 1.8 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
#include <machine/platform.h>
|
#include <machine/platform.h>
|
||||||
|
|
||||||
static void pci_intr_fixup_ibm_6050(int, int, int *);
|
static void pci_intr_fixup_ibm_6050(int, int, int, int *);
|
||||||
|
|
||||||
static const char *obiodevs_ibm_6050[] = {
|
static const char *obiodevs_ibm_6050[] = {
|
||||||
"wdc",
|
"wdc",
|
||||||
|
@ -63,7 +63,7 @@ struct platform platform_ibm_6050 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pci_intr_fixup_ibm_6050(int bus, int dev, int *line)
|
pci_intr_fixup_ibm_6050(int bus, int dev, int swiz, int *line)
|
||||||
{
|
{
|
||||||
if (bus != 0)
|
if (bus != 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ibm_7043_140.c,v 1.2 2003/07/15 02:54:52 lukem Exp $ */
|
/* $NetBSD: ibm_7043_140.c,v 1.3 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ibm_7043_140.c,v 1.2 2003/07/15 02:54:52 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ibm_7043_140.c,v 1.3 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include "opt_openpic.h"
|
#include "opt_openpic.h"
|
||||||
#if !defined(OPENPIC)
|
#if !defined(OPENPIC)
|
||||||
|
@ -58,7 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibm_7043_140.c,v 1.2 2003/07/15 02:54:52 lukem Exp $
|
||||||
#include <dev/pci/pcireg.h>
|
#include <dev/pci/pcireg.h>
|
||||||
#include <dev/pci/pcidevs.h>
|
#include <dev/pci/pcidevs.h>
|
||||||
|
|
||||||
void pci_intr_fixup_ibm_7043_140(int, int, int *);
|
void pci_intr_fixup_ibm_7043_140(int, int, int, int *);
|
||||||
void init_intr_mpic(void);
|
void init_intr_mpic(void);
|
||||||
|
|
||||||
struct platform platform_ibm_7043_140 = {
|
struct platform platform_ibm_7043_140 = {
|
||||||
|
@ -73,7 +73,7 @@ struct platform platform_ibm_7043_140 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
pci_intr_fixup_ibm_7043_140(int bus, int dev, int *line)
|
pci_intr_fixup_ibm_7043_140(int bus, int dev, int swiz, int *line)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (*line >= 1 && *line < OPENPIC_INTR_NUM - 3)
|
if (*line >= 1 && *line < OPENPIC_INTR_NUM - 3)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ibm_7248.c,v 1.7 2003/07/15 02:54:52 lukem Exp $ */
|
/* $NetBSD: ibm_7248.c,v 1.8 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,14 +37,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ibm_7248.c,v 1.7 2003/07/15 02:54:52 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ibm_7248.c,v 1.8 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
#include <machine/platform.h>
|
#include <machine/platform.h>
|
||||||
|
|
||||||
static void pci_intr_fixup_ibm_7248(int, int, int *);
|
static void pci_intr_fixup_ibm_7248(int, int, int, int *);
|
||||||
|
|
||||||
struct platform platform_ibm_7248 = {
|
struct platform platform_ibm_7248 = {
|
||||||
"IBM PPS Model 7248 (E)", /* model */
|
"IBM PPS Model 7248 (E)", /* model */
|
||||||
|
@ -58,7 +58,7 @@ struct platform platform_ibm_7248 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pci_intr_fixup_ibm_7248(int bus, int dev, int *line)
|
pci_intr_fixup_ibm_7248(int bus, int dev, int swiz, int *line)
|
||||||
{
|
{
|
||||||
if (bus != 0)
|
if (bus != 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* $NetBSD: mot_ulmb60xa.c,v 1.7 2003/07/15 02:54:52 lukem Exp $ */
|
/* $NetBSD: mot_ulmb60xa.c,v 1.8 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is derived from software contributed to The NetBSD Foundation
|
* This code is derived from software contributed to The NetBSD Foundation
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: mot_ulmb60xa.c,v 1.7 2003/07/15 02:54:52 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: mot_ulmb60xa.c,v 1.8 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: mot_ulmb60xa.c,v 1.7 2003/07/15 02:54:52 lukem Exp $
|
||||||
|
|
||||||
|
|
||||||
static int mot_ulmb60xa_match(struct platform *);
|
static int mot_ulmb60xa_match(struct platform *);
|
||||||
static void pci_intr_fixup_mot_ulmb60xa(int, int, int *);
|
static void pci_intr_fixup_mot_ulmb60xa(int, int, int, int *);
|
||||||
|
|
||||||
struct platform platform_mot_ulmb60xa = {
|
struct platform platform_mot_ulmb60xa = {
|
||||||
"BULL ESTRELLA (e0) (e0)", /* model */ /* XXX */
|
"BULL ESTRELLA (e0) (e0)", /* model */ /* XXX */
|
||||||
|
@ -107,12 +107,10 @@ mot_ulmb60xa_match(struct platform *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pci_intr_fixup_mot_ulmb60xa(int bus, int dev, int *line)
|
pci_intr_fixup_mot_ulmb60xa(int bus, int dev, int swiz, int *line)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (bus != 0)
|
if (bus == 0) {
|
||||||
return;
|
|
||||||
|
|
||||||
switch (dev) {
|
switch (dev) {
|
||||||
case 12: /* NCR 53c810 */
|
case 12: /* NCR 53c810 */
|
||||||
*line = 11;
|
*line = 11;
|
||||||
|
@ -130,4 +128,7 @@ pci_intr_fixup_mot_ulmb60xa(int bus, int dev, int *line)
|
||||||
*line = 11;
|
*line = 11;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
*line = 9 + ((swiz + dev + 0) & 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: platform.c,v 1.9 2003/07/15 02:54:53 lukem Exp $ */
|
/* $NetBSD: platform.c,v 1.10 2005/01/13 23:57:04 kleink Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: platform.c,v 1.9 2003/07/15 02:54:53 lukem Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: platform.c,v 1.10 2005/01/13 23:57:04 kleink Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -114,7 +114,7 @@ platform_generic_match(struct platform *p)
|
||||||
|
|
||||||
/* ARGUSED */
|
/* ARGUSED */
|
||||||
void
|
void
|
||||||
pci_intr_nofixup(int busno, int device, int *intr)
|
pci_intr_nofixup(int busno, int device, int swiz, int *intr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue