diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-10-27 20:01:14 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-10-27 20:01:14 +0000 |
commit | 54ea7f6ac2b60fce081fa01ba82040b762137427 (patch) | |
tree | 1e03113d822bccb131c5cc22c892b75607be2934 /sys | |
parent | 6157dc117efb2e7cafe025db1195944e02cbc3d1 (diff) |
repair ops. looking at the doc i suppose had no doc and no good clue when wrote it; tested on osb5
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/pci/rccosb4.c | 14 | ||||
-rw-r--r-- | sys/arch/i386/pci/rccosb4reg.h | 9 |
2 files changed, 10 insertions, 13 deletions
diff --git a/sys/arch/i386/pci/rccosb4.c b/sys/arch/i386/pci/rccosb4.c index 7361e7b7bf0..cf91d70cef0 100644 --- a/sys/arch/i386/pci/rccosb4.c +++ b/sys/arch/i386/pci/rccosb4.c @@ -1,7 +1,7 @@ -/* $OpenBSD: rccosb4.c,v 1.1 2004/06/22 09:47:01 mickey Exp $ */ +/* $OpenBSD: rccosb4.c,v 1.2 2005/10/27 20:01:13 mickey Exp $ */ /* - * Copyright (c) 2004 Michael Shalayeff + * Copyright (c) 2004,2005 Michael Shalayeff * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,7 +97,7 @@ int osb4_getclink(pciintr_icu_handle_t v, int link, int *clinkp) { if (OSB4_LEGAL_LINK(link - 1)) { - *clinkp = link - 1; + *clinkp = link; return (0); } @@ -112,9 +112,8 @@ osb4_get_intr(pciintr_icu_handle_t v, int clink, int *irqp) if (!OSB4_LEGAL_LINK(clink)) return (1); - bus_space_write_1(ph->osb4_iot, ph->osb4_ioh, 0, - clink | OSB4_PIAIR_PMASK); - *irqp = bus_space_read_1(ph->osb4_iot, ph->osb4_ioh, 1); + bus_space_write_1(ph->osb4_iot, ph->osb4_ioh, 0, clink); + *irqp = bus_space_read_1(ph->osb4_iot, ph->osb4_ioh, 1) & 0xf; if (*irqp == 0) *irqp = I386_PCI_INTERRUPT_LINE_NO_CONNECTION; @@ -129,8 +128,7 @@ osb4_set_intr(pciintr_icu_handle_t v, int clink, int irq) if (!OSB4_LEGAL_LINK(clink) || !OSB4_LEGAL_IRQ(irq)) return (1); - bus_space_write_1(ph->osb4_iot, ph->osb4_ioh, 0, - clink | OSB4_PIAIR_PMASK); + bus_space_write_1(ph->osb4_iot, ph->osb4_ioh, 0, clink); bus_space_write_1(ph->osb4_iot, ph->osb4_ioh, 1, irq); return (0); diff --git a/sys/arch/i386/pci/rccosb4reg.h b/sys/arch/i386/pci/rccosb4reg.h index 9a2d9c466d8..bc38b9653d6 100644 --- a/sys/arch/i386/pci/rccosb4reg.h +++ b/sys/arch/i386/pci/rccosb4reg.h @@ -1,7 +1,7 @@ -/* $OpenBSD: rccosb4reg.h,v 1.1 2004/06/22 09:47:01 mickey Exp $ */ +/* $OpenBSD: rccosb4reg.h,v 1.2 2005/10/27 20:01:13 mickey Exp $ */ /* - * Copyright (c) 2004, Michael Shalayeff + * Copyright (c) 2004,2005 Michael Shalayeff * Copyright (c) 1999, by UCHIYAMA Yasushi * All rights reserved. * @@ -30,9 +30,9 @@ * Register definitions for the RCC South Bridge interrupt controller. */ -#define OSB4_LEGAL_LINK(link) ((link) >= 0 && (link) <= 15) +#define OSB4_LEGAL_LINK(link) ((link) >= 0 && (link) <= 0x1f) -#define OSB4_PIRQ_MASK 0xdef8 +#define OSB4_PIRQ_MASK 0xdefa #define OSB4_LEGAL_IRQ(irq) ((irq) > 0 && (irq) <= 15 && \ ((1 << (irq)) & OSB4_PIRQ_MASK) != 0) @@ -40,7 +40,6 @@ * PCI Interrupts Address Index Register */ #define OSB4_PIAIR 0xc00 -#define OSB4_PIAIR_PMASK 0x10 #define OSB4_PIRR 0xc01 /* |