Commit Graph

253 Commits

Author SHA1 Message Date
cgd babc8db2c1 fix inverted sense of tests in DE500 media select function. (Would
auto-detect as 100Mbps if 10Mbps, 10Mbps if 100Mbps.)
1996-04-01 19:37:54 +00:00
cgd 5c2768088c make sure that chipset tags are used properly (because the alpha cares),
and include <machine/intr.h> on the alpha, for interrupt information.
(i386 will probably switch to this eventually.)
1996-03-30 05:10:29 +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 d37d07a75b modify these to use the new PCI interfaces:
(1) use pci_{io,mem}_find(), to determine what I/O or memory
	    space is described by a given PCI configuration space
	    mapping register, and bus_{io,mem}_map() to map it.
	(2) use pci_intr_map(), pci_intr_string(), and
	    pci_intr_{,dis}establish() to manipulate and print info about
	    PCI interrupts.
	(5) make pci functions take as an argument a machine-dependent
	    cookie, to allow more flexibility in implementation.
1996-03-27 04:06:53 +00:00
cgd 72060dc6fa add definitions for the BIST/Header Type/Latency Timer/Cache Line Size
configuration space register, and use it to determine whether or not
a given PCI device uses multiple functions.
1996-03-27 00:13:50 +00:00
cgd 4835a9fbc1 spacing nit 1996-03-17 01:47:52 +00:00
thorpej de7c200585 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 00:53:54 +00:00
cgd d5d2502bcb fix types on a bunch of variables (were u_long's, now are U_INT32s or ncrcmds,
and a few other fixes).  print pointers with %p, rather than casting to
(unsigned), which breaks on the Alpha.
1996-03-14 05:21:20 +00:00
cgd ba6d1cb2dd These devices don't actually need softc's that are supersets of 'struct
device.'  No point in adding that complexity + space if they're not needed,
so axe them.
1996-03-14 04:02:58 +00:00
cgd 005569a6b3 include pcireg before pcivar.h 1996-03-14 03:04:17 +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 8d2afa9f27 RCS ID police; get rid of Id keyword. 1996-03-11 23:06:04 +00:00
cgd 2013e4059a kill extraneous empty line in comment block at start of file 1996-03-11 23:05:47 +00:00
thorpej 94fc5cf4ce Resolve conflicts from merge. 1996-03-11 21:41:28 +00:00
cgd ba91a74bb6 mostly convert to use interfaces provided by <machine/bus.h>. (For now,
assumes that pci_map_mem/pci_map_io provide interfaces which utilitize
bus_{io,mem}_handle_t's, or types which are compatible.  This works on the
i386, and will change eventually anyway.)
1996-03-11 18:57:04 +00:00
cgd 046633ffe1 Move INT32, U_INT32, TIMEOUT definitions to ncr_reg.h, and add definitions
for U_INT8, INT16, U_INT16 definitions.  Convert structs and
    definitions in ncr_reg.h (e.g. ncrcmd, the chip register layout, etc.)
    to use these definitions.
Add INB_OFF, INL_OFF, and OUTL_OFF macros to access specified offsets into
    I/O or memory space.  Convert register dumps (etc.), and cache snoop
    test to use these new macros, so that nothing accesses the device
    I/O or memory space directly.  (Register dumps now come from I/O space
    if NCR_IOMAPPED.  They used to bogusly use memory space.)
Add a new relocation type for script entries, RELOC_KVAR.  Allow scripts
    access to mono_time.tv_sec, mono_time, and ncr_cache via this
    mechanism, and convert scripts to use it.  An ncrcmd is only 32 bits
    wide, and KVAs may be > 32 bits wide (e.g. on Alpha), leading to
    linker problems.  This is a safer way to do this anyway; relocation is
    more deterministic this way, and doesn't rely on KVAs not looking like
    other relocation types.
Panic if an unmatched relocation other than 'zero' is specified.  That's
    now a script bug.  (This used to be used to convert KVAs of kernel
    variables referenced in the script to PCI bus physical addresses,
    and that is now handled by RELOC_KVAR relocations.)
Figure out and print the model of chip.
1996-03-11 16:13:57 +00:00
cgd 6f00e88e73 mostly convert to use interfaces provided by <machine/bus.h>. (For now,
assumes that pci_map_mem/pci_map_io provide interfaces which utilitize
bus_{io,mem}_handle_t's, or types which are compatible.  This works on the
i386, and will change eventually anyway.)
1996-03-11 15:07:06 +00:00
thorpej f350b1aa9d Fill in the missing pieces and make the NetBSD version of Matt Thomas's
DEFPA FDDI driver actually compile and link.
1996-03-09 03:46:21 +00:00
cgd a38dcb7018 remember the bus_chipset_tag_t given by our parent, and pass it on to
children.
1996-03-08 20:34:25 +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 c8487c701e reorganize mapping register definitions 1996-03-04 19:30:50 +00:00
cgd 272d9f69d2 fix aux argument to config_found() for secondary bus. 1996-03-04 17:02:46 +00:00
cgd acabb62791 the i386 port no longer attaches isa, eisa, and pci at root. 1996-03-04 03:29:12 +00:00
cgd 0d2cc07e1c remove some colons to be slightly more friendly to things trying to
parse autoconfiguration output.
1996-03-02 02:28:48 +00:00
cgd a4d39f5063 fix uninitialized variable; it shouldn't have been a variable at all.
(when probing to see if a device is there, always probe function 0.)
1996-03-02 02:03:55 +00:00
cgd 8806ff8c86 oops; spaces -> tabs 1996-03-02 01:09:13 +00:00
cgd c7241fb1ce if not PCIVERBOSE, don't say that vendor/product is "unknown," just say
what it is.
1996-03-02 01:07:47 +00:00
cgd 2e86958f9b make PCI bus match/attach and sub-device attachment machine-independent,
add definition of 'ppb' (PCI-PCI bridge) device.
1996-02-28 01:47:06 +00:00
cgd 47e551efff Preliminary support for PCI-PCI bridges. Recognize a PCI-PCI bridge
and attach the secondary pci bus as a 'pci' device.  Note that this support
is incomplete and will not yet work for ports other than that i386.  (The
i386 can rely on the PCI interrupt 'line' information to determine
interrupt mapping, which is not necessarily possible on other systems.)
1996-02-28 01:46:32 +00:00
cgd f1f9317dfb make PCI bus match/attach and sub-device attachment machine-independent. 1996-02-28 01:44:41 +00:00
cgd 3c43b4317d alphabetize device list 1996-02-27 01:31:33 +00:00
cgd 6be793f659 use mono_time, rather than time, to keep track of timeouts. time can change
unpredictably.
1996-02-24 21:09:38 +00:00
christos c456eaedc6 pcidevs was changed. 1996-02-19 20:09:24 +00:00
christos b6e5342075 Add 3c595 id 1996-02-19 20:08:25 +00:00
cgd 40628fb3e8 update for new version of 'pcidevs' 1996-01-31 00:45:25 +00:00
cgd 8a3babe178 update/clean entries for Adaptec PCI scsi chips/boards. 1996-01-31 00:43:02 +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
thorpej e422ebca1a Add the "ahe" driver, autoconfiguration support for the aic7xxx-based
Adaptec 2[78]4x SCSI controllers, from Michael Graff <explorer@flame.org>.
Fixes PR #1594 from Noriyuki Soda <soda@sra.co.jp> in a different way.
1996-01-13 02:05:14 +00:00
thorpej 3ee815f0ce Squish a couple of rogue old-style RCS ids. 1995-12-28 08:58:15 +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
tls 69d57286dc merge latest Thomas version with our minimal changes 1995-12-23 06:22:46 +00:00
jtc 0cd793449e merge in changes from 1.1 release branch 1995-11-30 00:56:23 +00:00
christos 7a68425190 Don't use the softc at probe time on pci devices because it has not been
allocated yet. Thanks Charles...
1995-11-12 20:55:26 +00:00
christos ffa8bfeda1 pcidevs was changed 1995-11-10 19:36:29 +00:00
christos c3ae59171a - pcidevs: add 3c590 and adaptec ultra
- aic7xxx.c: fix the probe routines to use pcidevs.h
1995-11-10 19:36:08 +00:00
pk 4ad1c05d71 DV_NULL should be DV_DULL. 1995-10-23 15:42:50 +00:00
pk bcff7be6b7 DV_DISK => DV_NULL (from Mike Long; PR#1607). 1995-10-22 20:45:07 +00:00
mycroft dbce1a97aa Add specs for ahc driver. 1995-10-10 12:16:54 +00:00
mycroft b216bead49 Add an Adaptec 2940 driver, by John Aycock and Justin Gibbs, ported to NetBSD by Stefan
Grefen, with several bug fixes by me.
1995-10-09 09:49:30 +00:00
mycroft 0bc6ad73eb Fix an oversight in the minphys routine. 1995-10-02 16:48:36 +00:00
mycroft b5beeaaca9 Incorporate recent changes from Wolfgang and Stefan. 1995-10-01 20:51:34 +00:00
mycroft 4fec83b441 Fix oversights in previous change.
Remove ugly casts and correct spelling.
1995-08-19 04:58:44 +00:00
cgd b0dc5d3d7f local adaptations, and fix a could of compilation errors 1995-08-19 04:35:18 +00:00
cgd 1c8b202de7 use I/O ports on the i386 1995-08-19 04:27:31 +00:00
cgd 9980150670 Generic FDDI support by Matt Thomas. Support for DEC "PDQ" FDDI chipset
and for the PCI attachment of said chipset ("if_fpa"), also from Matt Thomas.
Arguably, pdq* doesn't belong in sys/dev/ic, but it's going to be shared by
various bus attachment devices at some point in the future, and there's no
other place that seems to fit as well.
1995-08-19 00:59:47 +00:00
cgd 8b417fd28b add 'fpa' for Matt Thomas's driver for DEC PCI FDDI boards. alphabetize. 1995-08-19 00:44:48 +00:00
cgd c9dbf2d1d2 clean up 7/26 de snapshot import 1995-08-17 18:04:55 +00:00
cgd a2e0a97608 check for null subclass pointer. From Todd Mummert 1995-08-16 04:54:50 +00:00
mycroft 80d7b0695a minphys() functions really should return void. 1995-08-12 20:30:45 +00:00
mycroft e04a2a7a7f Add needs-flags for pci_subr.c. 1995-07-27 04:43:19 +00:00
mycroft fc427776a7 Add stuff for I/O mapping. 1995-07-27 00:29:02 +00:00
cgd 830a91b2e9 update SCSI minphys routines' definitions to match standard minphys()
definition and usage.
1995-07-24 07:16:44 +00:00
cgd 267dd7012f merge updated version from Matt Thomas, which includes dc21041 support.
There are a couple of questionable changes in here, that i'm going to
hammer out of him in the next week or so...
1995-07-24 03:54:14 +00:00
cgd bbe407930b header file got renamed 1995-06-28 03:26:36 +00:00
cgd 6907f7f64d fix reference to incorrect struct (paste-o) 1995-06-21 03:56:09 +00:00
cgd 9526317aa1 vendor IDs for Acer and SIS 1995-06-20 04:50:43 +00:00
cgd 4f7335a75a macros to split out various parts of PCI registers, adjust constants
to match.  (now, comparisons are comparisons, code doing them doesn't
have to mask.)  define types for the various parts of the registers'
contents, where practical.
1995-06-18 01:34:01 +00:00
cgd c4640b104d define and call "pci_devinfo()", which creates a string from the
vendor & product IDs and class information, which is printed if device
isn't found.  Optionally (via "PCIVERBOSE" option) does table lookup
to try to see if it knows what the device really is (informational only...).
1995-06-18 01:28:23 +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 8ced60f181 make a comment reflect the way things should be done 1995-06-18 01:23:11 +00:00
cgd 2cfceff6b5 built from pcidevs list 1995-06-18 01:09:14 +00:00
cgd 27adbb1130 learn about some PCI vendor and product numbers. not yet used 1995-06-18 01:07:04 +00:00
cgd ae76c070ec oops; forgot this in last commit 1995-06-17 23:06:44 +00:00
cgd 6f13f2448a more appropriate name, as this only has PCI support subroutines. 1995-06-17 22:40:26 +00:00
cgd 3349ad1b56 update from matt thomas 1995-06-06 23:31:24 +00:00
cgd dede989b85 enable the de driver 1995-06-05 01:03:45 +00:00
cgd d0d9fe6333 set a shutdown hook 1995-06-05 01:03:30 +00:00
cgd 96caf354eb kill old Id, add NetBSD Id 1995-06-05 00:47:42 +00:00
cgd 551bcffab9 dc21040 driver, from Matt Thomas 1995-06-05 00:38:18 +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 af67271a66 try to actually (gasp!) describe the drivers. 1995-04-17 17:54:15 +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 5f252bb8ea config.new files description for PCI mi files. 1995-04-17 07:46:10 +00:00
jtc db0046c14d KERNEL -> _KERNEL 1995-03-28 19:59:56 +00:00
mycroft c937d3b9f2 Patch from Wolfgang to fix a missing spl. 1995-02-01 09:32:45 +00:00
cgd 87ed227cb4 include files from the correct places. 1995-01-27 05:44:29 +00:00
mycroft 52f079131b Incorporate recent changes from Wolfgang. Recognize the 815. 1995-01-16 21:48:35 +00:00
mycroft 290ed068ab Remove many of the `static's, to facilitate debugging. 1995-01-04 09:02:32 +00:00
mycroft 8fd135209c Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
mycroft 35cdd801e6 Convert port, IRQ, and DRQ numbers to ints. 1994-11-18 21:57:40 +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
mycroft 94cde915db Rename pciprobe() to pcimatch(), and move it to pci_machdep.c. 1994-11-03 22:27:16 +00:00
mycroft e06bd72a85 Always use direct configuration. 1994-11-03 22:15:19 +00:00
cgd 022ee8f7fe new RCS ID format. 1994-10-27 04:14:23 +00:00
andrew 5a13863a4b Default to decent performance. 1994-10-27 02:04:18 +00:00
andrew fc67924047 Merge changes from Wolfgang Stanglmeier's 941012 release. 1994-10-27 02:02:00 +00:00
mycroft 6ddbe860c2 Update from Wolfgang Stanglemeier. 1994-10-01 06:27:56 +00:00
mycroft 3c3258eb6d Make this work. 1994-08-11 04:54:13 +00:00
mycroft 55b11feb0a Update some comments. 1994-08-10 04:37:52 +00:00
mycroft 8dbfcf9e2e Add NCR 53c8XX driver, originally from Wolfgang Stanglmeier. 1994-08-09 22:20:44 +00:00
mycroft 6df721be97 Add PCI autoconfiguration support. 1994-08-09 00:47:46 +00:00