Commit Graph

133 Commits

Author SHA1 Message Date
peter
44d31e635d Well folks, this is it - The second stage of the removal for build support
for LKM's..
1999-04-17 08:36:07 +00:00
peter
dc1b9002a0 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
eivind
fa5d159312 Staticize. 1999-04-11 02:50:42 +00:00
n_hibma
6ae645bb66 Moved [uo]hci_pci.c from /sys/dev/pci to /sys/pci after Soren
threatened to send Bruce. These files are no longer shared
   with NetBSD anyway.

   Requires a config and make depend.
1999-02-18 21:42:19 +00:00
n_hibma
bd591971ff Added vendor Compaq/CMDTACH and USB067[03] 1999-02-15 21:39:49 +00:00
n_hibma
50b111ed9b Added OPTi FireLink and NEC (Toshiba and others) to OHCI ID's 1999-01-22 00:36:46 +00:00
se
78cf82dd0d Fix problem with zero valued map registers followed by valid map entries.
The previous code just ignored the invalid map register, but this gave
surprising results because of the way pci_map_port() associated the map
register offset supplied with a map entry in the map array.
1999-01-19 23:29:20 +00:00
bde
92a4c0b9dc Let drivers specify interrupt flags (INTR_EXCL and/or INTR_FAST)
using the new pci_map_int_right() variant of pci_map_int().  Fast
interrupts work for PCI devices if and only if they are exclusive.
(The PCI interrupt mux doesn't support fast interrupts and can't
support a mixture of fast and slow interrupts even in principle.)

Don't assume that intrmask_t == unsigned in pci_map_int().
1999-01-13 04:59:19 +00:00
n_hibma
5f8f17c1f9 Removed warning and comments 1999-01-13 01:05:43 +00:00
eivind
3184025920 Clean out warnings by changin ID string declarations to be char xxx[]
instead of char *xxx.
1999-01-12 02:16:16 +00:00
eivind
dde412dea5 Remove 'pci_bridgeto' - it was just an empty placeholder. 1999-01-12 01:44:42 +00:00
n_hibma
f121575ba4 Remove warning 1999-01-10 18:31:22 +00:00
n_hibma
9896b86a8c Clean up, nothing major 1999-01-07 23:01:11 +00:00
n_hibma
ee282ee876 Added proper names to the device messages at probe and attach.
Missing ones:
	Device Id ADS technologies
	Device Id's SiS hardware
1999-01-06 19:55:49 +00:00
n_hibma
c52465cd60 Removed NetBSD specific code 1999-01-06 12:31:28 +00:00
julian
40038f7ee0 The OHCI interfaces I have access to map their control regs etc. into
memory address space rather than IO space.. reflect this when looking for the
interface revision register.

If this is not true for them all then we probably need some smarter code.
1998-12-14 21:14:11 +00:00
n_hibma
ae5096146e Added Id 1998-12-14 09:40:15 +00:00
dillon
5fb9bd9c35 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
dillon
1de643f504 pci_device pd_probe function changed from returning char * to returning
const char *.  Originally I was going to add casts from const char * to
    char * in some of the pci device drivers, but the reality is that the
    pci device probes return constant quoted strings.
1998-12-14 05:47:29 +00:00
n_hibma
c389a095ee Fixed same as Julian did in uhci_pci.c and fixed the fetching of the revision ohci_pci.c; clean up 1998-12-11 00:09:54 +00:00
julian
3d764c8751 The shift and the masking were in the wrong order for extracting
the INTERFACE type byte from the longword register.
1998-12-10 22:07:05 +00:00
n_hibma
32da6cd8a0 Preliminary support for OHCI motherboards 1998-12-09 23:28:43 +00:00
n_hibma
a612f60f3c 1) Fixed bug: sc was used unitialised in uhci_run
2) Clean up the code and remove superfluous statements
1998-12-09 23:23:13 +00:00
n_hibma
2cf279dba5 Initial commit of ported NetBSD USB stack 1998-11-26 23:13:13 +00:00
peter
1034ece765 s/%#p/%p/ to fix a warning. This looks like a leftover of once being
%#x, which causes a leading 0x to be prepended. %p has this by default
and the '#' is ignored by the kernel prinf code for %p.
1998-11-09 08:08:06 +00:00
julian
0d2cd28a04 In the cyrix Cx5530, there are null (empty) Base address registers before the
base register that controls Ultra-DMA, so we need to examine all possible
base registers instead of just giving up at the first empty one.
Also, looking at the source code to the BIOS, I see that they are also
checking for 0xffffffff as an invalid value so do the same. Stefan may like
to clean this up, but at least now I can find my PCI IDE registers.
1998-11-03 08:47:29 +00:00
gibbs
15e25d221d ahc_pci.c:
Disable DPARCKEN in the DSCOMMAND0 register on the aic7890/91/96/97.
	Parity checking is broken for some chip/MB combinations and this
	is the work around recommended by Adaptec.

dpt_pci.c:
	Remove a superflous '{' that prevented DPT_ALLOW_MEMIO from working.

pcireg.h:
	Add a definition for Parity Error Reponse bit in the PCI Space
	command register.
1998-10-07 03:40:51 +00:00
dfr
c6ccc784f8 Add functions for accessing dense and bwx memory for pci devices. These
routines are necessary to allow the use of certain types of hardware on
the alpha, particularly a Myrinet card.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-06 14:18:40 +00:00
dfr
b06ef8d077 Some workarounds for a common DEC pci-pci bridge found on alphas.
Fix printf format errors which show up on the alpha.
1998-09-16 08:28:11 +00:00
gibbs
244f2bf096 Correct printf format bugs. 1998-09-15 22:05:44 +00:00
gibbs
4d5e41f72f Revive PCIConf.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:21:13 +00:00
tegge
05420fa9d0 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
gibbs
0d8b0cfaf0 Use "baseclass" instead of "class" for storing the contents of PCI register
0xB so that C++ programs can use the PCI conf interface.
1998-08-13 19:12:20 +00:00
dfr
df7d3d7c86 Add a call to a platform-specific irq remapping function for alpha platforms
which don't record the correct irqs in PCI config space.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:40:46 +00:00
dfr
8c8588d006 On the alpha, ports may be allocated above 64k.
Change the port address argument to pci_map_port to pci_port_t* which is
defined as u_int on the alpha, u_short on i386.  This is a stopgap with a
hopefully limited lifetime.

Discussed with: Stefan Esser <se@freebsd.org>
1998-07-22 08:39:08 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
tegge
a7357d6dd1 Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is
	  an ISA/EISA interrupt according to the mp table.

	- Attempt to handle multiple IO APIC pins connected to
	  the same PCI or ISA/EISA interrupt source.  Print a
	  warning if this happens, since performance is suboptimal.
	  This workaround is only used for PCI devices.

With these two workarounds, the -SMP kernel is capable of running on
my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
1998-04-01 21:07:37 +00:00
eivind
193b154c46 Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.
This introduce an xxxFS_BOOT for each of the rootable filesystems.
(Presently not required, but encouraged to allow a smooth move of option *FS
to opt_dontuse.h later.)

LFS is temporarily disabled, and will be re-enabled tomorrow.
1998-01-24 02:54:56 +00:00
phk
0f7586cd71 Remove a bunch of variables which were unused both in GENERIC and LINT.
Found by:	-Wunused
1997-11-07 08:53:44 +00:00
dyson
9ab0a902f3 Addition of support of the slightly rogue Promise IDE interface(Dyson), support
of multiple PCI IDE controllers(Dyson), and some updates and cleanups from
John Hood, who originally made our IDE DMA stuff work :-).

I have run tests with 7 IDE drives connected to my system, all in DMA
mode, with no errors.  Modulo any bugs, this stuff makes IDE look
really good (within it's limitations.)

Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
1997-09-20 07:41:58 +00:00
peter
58767db594 Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
fsmp
f029af4779 Reorder function decls alphabetically. 1997-08-21 08:31:41 +00:00
fsmp
c65f3883a2 A few more casts and a function declaration for warning free kernel builds. 1997-08-21 07:05:54 +00:00
bde
2b60d80b5b Removed unused #includes. 1997-08-02 14:33:27 +00:00
fsmp
f8c61ec262 Modified to use renamed get_pci_apic_irq() -> pci_apic_pin() function. 1997-06-25 20:56:29 +00:00
se
4d82026e5b Move call of pci_addcfg() before test of cfg->subordinatebus, since the
device probe of a host to PCI bridge may modify that value, based on
its knowledge of device specific registers. This makes the Intel XXpress
work, as verified by: Terje Marthinussen <terjem@cc.uit.no>.
1997-06-02 19:59:01 +00:00
peter
28ac66ba9a PCI_CLASS_MASS_STORAGE (under PCI_COMPAT) was used in a driver in LINT
still (stallion.c).
1997-06-01 16:00:43 +00:00
se
5d576a06ba Add one more compatibility define to make the Adaptec driver compile
with option AHC_ALLOW_MEMIO again ....
1997-05-28 20:37:19 +00:00
se
7278536ccf Define command register enable bits, which are required for a consitency
test added to pci_compat.c
1997-05-28 11:15:18 +00:00
se
457f053edf Two minor changes to the code that builds the pci map array:
1) Stop at the first map register that contains a zero value.
2) When testing for the map size work up from low values, since
   this works around a bug in some BusLogic SCSI card, which has
   the 16 upper port base address bits hardwired to zero.

The config register dump printed in the bootverbose case has
been slightly rearranged.
1997-05-28 10:01:03 +00:00