Commit Graph

35 Commits

Author SHA1 Message Date
augustss deb00272b9 Add USB support. Supported so far:
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers
1998-07-12 19:51:55 +00:00
thorpej ab548fbb40 Remove the PCI-ISA bridge callback mechanism; it's no longer needed. 1998-06-09 18:48:41 +00:00
cgd 6e73ca754f add a PCI 'quirks' mechanism, meant to be used as the mechanism
of last resort when trying to communicate information about
bogus behaviour of PCI devices to the MI autoconfiguration code.
In general, bogus behaviour should be handled by drivers, but there
are some types of bogons which can't be addressed that way.  The
only quirk currently defined is one which indicates that the device
is multi-function even though the device's header says otherwise.
(Mmm, Intel 82371FB PCI-to-ISA Bridge (PIIX); you'd think that at least
Intel would have gotten it right...)
1998-05-31 06:07:59 +00:00
mark 69a9a5c445 Include arm32/pci/pci_machdep.h if arm32 is defined. 1998-05-25 22:11:37 +00:00
cgd 4b0876c74b largely reimplement pci_conf_print():
* print all configuration space registers.  Then, where possible,
  interpret them.  (That is, PRESENT ALL THE DATA, then interpret it --
  don't hide data behind interpretation.  Also, when interpreting
  fields, try to print out the specific value that's being interpreted.)
* handle different header types.
* allow caller to specify a function which can interpret the
  device-dependent header and is responsible for pretty-printing it.

It spews (use 'options MSGBUFSIZE=...' 8-), but when you want the data,
you really want _all_ of it.

Still needs some cleanup and additional code (e.g. interepretation
of PCI-PCI (type 1) and PCI-Cardbus (type 2(?)) bridge headers).
1998-05-18 17:25:17 +00:00
tsubai 02aa1f7050 Add macppc support. 1998-05-15 12:35:06 +00:00
thorpej a95c0ac15a Add pci_conf_print(), a function to dump the PCI configuration space, useful
in driver debugging.  From Zubin D. Dittia <zubin@clouseau.arl.wustl.edu>,
PR #4249.
1998-04-14 21:24:50 +00:00
sakamoto 837124b35c add bebox 1997-10-14 07:15:45 +00:00
thorpej 8eb7170ff8 Back out last change. (Partially my fault, for not reviewing it close
enough.)
1997-10-06 21:01:23 +00:00
lonhyn a9ad6cae19 pci_mapreg_info() has been changed to take arguments like pci_mapreg_map() 1997-10-03 18:45:39 +00:00
mycroft aae78d29c3 Don't export pci_*_find() any more. 1997-08-30 06:48:24 +00:00
jtk c0f08c42a8 use "locators.h" defines for indices for cf_loc[] and default values 1997-07-17 01:01:06 +00:00
thorpej 11e78a6b0d Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:43:45 +00:00
cgd 78b378b2bc create pci_mapreg_info() which simply gets mapping register information.
It's used by pci_mapreg_map() and can be used directly by drivers
with special needs (e.g. those being attached as console devices).
1997-04-13 22:05:10 +00:00
cgd 36949596f0 rename pci_map_register to pci_mapreg_map. The latter name is more
descriptive, and allows for a sane name for a function which just digs
the info out of the mapping register but doesn't do the mapping.
1997-04-13 20:14:20 +00:00
cgd 2eae910210 implement pci_map_register(), which gets information about a device's
mapping register, maps it, and returns all of the relevant information.
deprecate use of pci_{io,mem}_find(), but leave them around (for a while)
for backward compatibility with third-party drivers.
1997-04-13 19:46:01 +00:00
cgd cc93b2c4eb pass memory- and i/o-enabled flags down via the PCI bus and device attach
arguments, so that a device can tell if its memory and I/O spaces are
enabled.  The flags are cleared, depending on the contents of devices CSR
registers, in the machine-independent PCI bus code.
1997-04-10 23:12:16 +00:00
leo 91c17fedfa The atari has a pci_machdep.h file. 1996-12-01 21:02:18 +00:00
cgd 828f1f3aa1 Provide a routine so that ISA/EISA bridges can set up a callback so
that their child busses can be attached after the PCI bus
autoconfiguration for their parent bus is done.

This works because:
	(1) there can be at most one ISA/EISA bridge per PCI bus, and
	(2) any ISA/EISA bridges must be attached to primary PCI
	    busses (i.e. bus zero).

That boils down to: there can only be one of these outstanding
at a time, it is cleared when configuring PCI bus 0 before any
subdevices have been found, and it is run after all subdevices
of PCI bus 0 have been found.

This (or something like it) is needed because there are some (legacy)
PCI devices which can show up as ISA/EISA devices as well (the prime
example of which are VGA controllers).  If you attach ISA from a
PCI-ISA/EISA bridge, and the bridge is seen before the video board is,
the board can show up as an ISA device, and that can (bogusly)
complicate the PCI device's attach code, or make the PCI device not be
properly attached at all.

This could be done with machine-dependent code, but as more ports
add support for PCI (and PCI-ISA/EISA bridges) more will need it.
The i386 port could (perhaps should) be converted to use it as well.
1996-11-23 21:58:16 +00:00
thorpej 546c8abcee New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
	  devices.  It's all "bus space" now, and space tags
	  differentiate the space with finer grain than the
	  bus chipset tag.
	- Add memory barrier methods.
	- Implement space alloc/free methods.
	- Implement region read/write methods (like memcpy to/from
	  bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
1996-10-21 22:56:24 +00:00
cgd 80ed7f1dc8 remove inappropriate an potentially confusing comments ("unnecessary?") from
the pa_device and pa_function members of the pci_attach_args structure.
1996-03-28 02:16:23 +00:00
cgd 87328287b7 modify these to provide a new, better-specified PCI interface
(soon to be documented on mailing lists; eventually in section 9 manual
pages), most importantly:
	(1) support interrupt pin swizzling on non-i386 systems with
	    PCI-PCI bridges (per PPB spec; done, but meaningless, on i386).
	(2) provide pci_{io,mem}_find(), to determine what I/O or memory
	    space is described by a given PCI configuration space
	    mapping register.
	(3) provide pci_intr_map(), pci_intr_string(), and
	    pci_intr_{,dis}establish() to manipulate and print info about
	    PCI interrupts.
	(4) make pci functions take as an argument a machine-dependent
	    cookie, to allow more flexibility in implementation.
1996-03-27 04:08:24 +00:00
cgd 7fda077700 (1) provide #defines for cf_loc[] entries for devices that attach to
pcibus and pci.
(2) remove the #ifdef i386 from pci.c, and provide a machine-dependent
    hook (pci_md_attach_hook()) to do any machine-dependent attachment
    gunk, e.g. on the i386 printing out the configuration mode (if bus 0)
(3) don't pass max device number for a given bus in, use
    PCI_MAX_DEVICE_NUMBER, which can be defined on a per-machine basis.
    (defaults to 32.  on i386, it's 32 if pci conf mode == 1, 16 if 2.)
1996-03-14 02:35:32 +00:00
cgd 5087096150 pass a bus_chipset_tag_t (defined in <machine/bus.h>) to the bus when
attaching, and to the devices when attaching them.  #include <machine/bus.h>
to make this backward compatible with old #include requirements.
Also, clean up idempotency so that isa/eisa/pci "var.h" headers are
consistent (make them all idempotent).
1996-03-08 20:25:22 +00:00
cgd f1f9317dfb make PCI bus match/attach and sub-device attachment machine-independent. 1996-02-28 01:44:41 +00:00
cgd 0d743e5a05 update PCIVERBOSE code in various ways:
(1) remove the 'UNSUPP' keyword from the device list,
	    because it can't be reasonably used (becuase different
	    devices may be supported on different machines, for
	    good reason).
	(2) enhance pci_devinfo so that class/subclass information
	    is optional (so pci_devinfo can be used by drivers that
	    match classes of devices, and want to look up the
	    devices' names easily).
	(3) more known vendors and devices.
1996-01-22 21:08:09 +00:00
mycroft 3da4b2a160 The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
1995-12-24 02:29:35 +00:00
cgd e86a68a339 prototype for pci_devinfo function 1995-06-18 01:26:50 +00:00
cgd c644446a99 add include for the alpha, alphabetize 1995-06-18 01:24:40 +00:00
cgd bad826164e split single-subdevice lookup & attachment into a subroutine
(pci_attach_subdev()).  remove pciattach() function and the pcicd cfdriver
struct, the former because thre are a lot of attachment actions which really
are machine-dependent (perhaps even "most"), and the latter because now that
both pcimatch() and pciattach() are machine-dependent it's bad style to
declare them here and it gains nothing.
1995-05-23 03:43:06 +00:00
cgd 8a640328ed clean up several ISA device interfaces: autoconfiguration, header
inclusion, and interrupt configuration.  more work still needs to be done,
but it's getting better...
1995-04-17 12:06:30 +00:00
cgd 87ed227cb4 include files from the correct places. 1995-01-27 05:44:29 +00:00
mycroft f8183b2d0e Make a wrapper match function to check the bus and device numbers, rather
than insisting that every driver do it.
1994-11-04 09:42:18 +00:00
cgd 022ee8f7fe new RCS ID format. 1994-10-27 04:14:23 +00:00
mycroft 6df721be97 Add PCI autoconfiguration support. 1994-08-09 00:47:46 +00:00