diff options
Diffstat (limited to 'sys/pci/pcibus.h')
-rw-r--r-- | sys/pci/pcibus.h | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/sys/pci/pcibus.h b/sys/pci/pcibus.h index 1c5671c..842d97c 100644 --- a/sys/pci/pcibus.h +++ b/sys/pci/pcibus.h @@ -1,14 +1,14 @@ /************************************************************************** ** -** $Id: pcibus.h,v 1.2 1994/11/02 23:47:14 se Exp $ +** $Id: pcibus.h,v 1.1 1995/02/01 22:56:47 se Exp $ ** ** Declarations for pci bus driver. ** -** 386bsd / FreeBSD +** FreeBSD ** **------------------------------------------------------------------------- ** -** Copyright (c) 1994 Wolfgang Stanglmeier. All rights reserved. +** Copyright (c) 1995 Wolfgang Stanglmeier. All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions @@ -36,51 +36,58 @@ */ #ifndef __PCI_BUS_H__ -#define __PCI_BUS_H__ - +#define __PCI_BUS_H__ "pl1 95/03/13" + /*----------------------------------------------------------------- ** ** The following functions are provided by the pci bios. ** They are used only by the pci configuration. ** -** pb_mode(): +** pcibus_setup(): ** Probes for a pci system. -** Returns 1 or 2 for pci configuration mechanism. -** Returns 0 if no pci system. +** Sets pci_maxdevice and pci_mechanism. +** +** pcibus_tag(): +** Creates a handle for pci configuration space access. +** This handle is given to the read/write functions. ** -** pb_tag(): -** Gets a handle for accessing the pci configuration -** space. -** This handle is given to the mapping functions (see -** above) or to the read/write functions. +** pcibus_ftag(): +** Creates a modified handle. ** -** pb_read(): +** pcibus_read(): ** Read a long word from the pci configuration space. ** Requires a tag (from pcitag) and the register -** number (should be a long word aligned one). +** number (should be a long word alligned one). ** -** pb_write(): +** pcibus_write(): ** Writes a long word to the pci configuration space. ** Requires a tag (from pcitag), the register number -** (should be a long word aligned one), and a value. +** (should be a long word alligned one), and a value. ** -** pb_regint(): +** pcibus_regirq(): ** Register an interupt handler for a pci device. -** Requires a tag (from pcitag), the handler function -** and it's argument, and an interupt mask. +** Requires a tag (from pcitag), the register number +** (should be a long word alligned one), and a value. ** **----------------------------------------------------------------- */ struct pcibus { char *pb_name; - int (*pb_mode ) (void); - pcici_t (*pb_tag ) (u_char bus, u_char device, u_char func); - u_long (*pb_read ) (pcici_t tag, u_long reg); - void (*pb_write ) (pcici_t tag, u_long reg, u_long data); - int (*pb_regint) (pcici_t tag, int(*func)(), void*arg, unsigned*mp); + void (*pb_setup ) (void); + pcici_t (*pb_tag ) (u_char bus, u_char device, u_char func); + pcici_t (*pb_ftag ) (pcici_t tag, u_char func); + u_long (*pb_read ) (pcici_t tag, u_long reg); + void (*pb_write ) (pcici_t tag, u_long reg, u_long data); + unsigned pb_maxirq; + int (*pb_iattach) (int irq, void(*func)(), int arg, unsigned*maskp); + int (*pb_idetach) (int irq, void(*func)()); + int (*pb_imaskinc)(int irq, unsigned *maskptr); + int (*pb_imaskexc)(int irq, unsigned *maskptr); }; +#define PCI_MAX_IRQ (16) + /* ** The following structure should be generated by the driver */ |