Implement intr_create/intr_connect.

This commit is contained in:
Doug Rabson 1998-07-12 16:16:22 +00:00
parent 2895b128c7
commit b46e6c4115
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37590
2 changed files with 37 additions and 3 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: chipset.h,v 1.1 1998/06/10 10:54:32 dfr Exp $
*/
#ifndef _MACHINE_CHIPSET_H_
@ -69,6 +69,13 @@ typedef struct alpha_chipset {
alpha_chipset_cfgwriteb_t* cfgwriteb;
alpha_chipset_cfgwritew_t* cfgwritew;
alpha_chipset_cfgwritel_t* cfgwritel;
/*
* PCI bridge device.
* (XXX hack until I change pci code to use new
* device framework.)
*/
void* bridge;
} alpha_chipset_t;
extern alpha_chipset_t chipset;

View File

@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: pcibus.c,v 1.41 1997/12/20 09:04:25 se Exp $
* $Id: pcibus.c,v 1.1 1998/06/10 10:55:37 dfr Exp $
*
*/
@ -31,7 +31,8 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus_private.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <pci/pcivar.h>
#include <machine/chipset.h>
@ -87,3 +88,29 @@ pci_cfgopen(void)
{
return 1;
}
/*
* These can disappear when I update the pci code to use the new
* device framework.
*/
struct intrec *
intr_create(void *dev_instance, int irq, inthand2_t handler, void *arg,
intrmask_t *maskptr, int flags)
{
device_t pcib = chipset.bridge;
if (pcib)
return BUS_CREATE_INTR(pcib, pcib,
irq, (driver_intr_t*) handler, arg);
else
return 0;
}
int
intr_connect(struct intrec *idesc)
{
device_t pcib = chipset.bridge;
if (pcib)
return BUS_CONNECT_INTR(pcib, idesc);
else
return EINVAL;
}