Commit Graph

25 Commits

Author SHA1 Message Date
Warner Losh
155a83e87a remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
John Baldwin
0d484d249f Allow device hints to wire the unit numbers of devices.
- An "at" hint now reserves a device name.
- A new BUS_HINT_DEVICE_UNIT method is added to the bus interface.  When
  determining the unit number of a device, this method is invoked to
  let the bus driver specify the unit of a device given a specific
  devclass.  This is the only way a device can be given a name reserved
  via an "at" hint.
- Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers.
  Both of these busses implement this by comparing the resources for a
  given hint device with the resources enumerated by ACPI/PnPBIOS and
  wire a unit if the hint resources are a subset of the "real" resources.
- Use bus_hinted_children() for adding hinted devices on isa(4) busses
  now instead of doing it by hand.
- Remove the unit kludging from sio(4) as it is no longer necessary.

Prodding from:	peter, imp
OK'd by:	marcel
MFC after:	1 month
2008-11-18 21:01:54 +00:00
Maxim Konovalov
991555c9c0 o Revert last. The chip is already supported by puc(4).
Pointed out by:	marcel, Joseph Terner
2007-03-29 04:26:52 +00:00
Maxim Konovalov
747bef5b85 o Add MosChip 9835 PCI Dual UART PCI id.
PR:		kern/110967
Submitted by:	Joseph Terner
MFC after:	1 month
2007-03-28 18:56:27 +00:00
Yoshihiro Takahashi
d4fcf3cba5 Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64.  The optimization is a trivial on recent machines.

Reviewed by:	-arch (imp, marcel, dfr)
2005-05-29 04:42:30 +00:00
John Baldwin
b9d9b6ef3d Oops, revert a commit that snuck in with the earlier critical section
changes.

Noticed by:	bde
2005-04-05 18:06:28 +00:00
John Baldwin
c6a37e8413 Divorce critical sections from spinlocks. Critical sections as denoted by
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions.  They no longer have any affect on
interrupts.  This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.

Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit().  This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock.  For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections.  Note that I've also taken this
opportunity to push a few things into MD code rather than MI.  For example,
critical_fork_exit() no longer exists.  Instead, MD code ensures that new
threads have the correct state when they are created.  Also, we no longer
try to fixup the idlethreads for APs in MI code.  Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.

This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).

Reviewed by:	grehan, cognet, arch@, others
Tested on:	i386, alpha, sparc64, powerpc, arm, possibly more
2005-04-04 21:53:56 +00:00
Warner Losh
c80b5ef285 puc handles this card, so remove it from here.
PR: 48468
2005-01-11 00:53:58 +00:00
Nate Lawson
e5979322ba Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c.  Perhaps something
similar should be done for the "disabled" hints also.

MFC after:	2 weeks
2004-10-14 22:21:59 +00:00
Bill Paul
cdd83ba354 Add an entry to the PCI ID list to support the serial interface on the
Broadcom 802.11g/GPRS CardBus card.

Submitted by:	Yann Berthier yb at sainte-barbe dot org
2004-06-07 16:33:47 +00:00
Warner Losh
347934fa63 Sometimes cardbus attachments don't attach, so while we track down
this problem put these lines back in.  While they should be
unnecessary, they appear to be sometimes necessary.

Reviewed in concept: dfr
Approved by: re (scottl@)
2003-11-28 05:28:29 +00:00
Doug Rabson
0be389f3ca Remove explicit cardbus attachments from drivers where this is identical
to the pci attachment. Cardbus is a derived class of pci so all pci
drivers are automatically available for matching against cardbus devices.

Reviewed by: imp
2003-11-03 09:22:18 +00:00
David E. O'Brien
945ff31afa Use __FBSDID().
Also some minor style cleanups.
2003-08-24 18:03:45 +00:00
Warner Losh
b63ff62456 Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
2003-08-22 06:17:16 +00:00
Poul-Henning Kamp
c2b46fcca4 Add yet a patch for the patchwork quilt called sio(4):
Allow people set set flags on pci based SIO ports.
2003-02-27 14:09:36 +00:00
Warner Losh
58f4eca2a6 Whatever dumbass wrote sio_pci.c didn't include a detach method.
Wearing said pointy hat, correct the oversight and hope nobody
notices.

# this should make xircom modems happier to detach once other bugs with
# the cardbus layer are fixed.

Noticed by: scottl
Conical Hat to: imp
2003-02-16 18:05:54 +00:00
Poul-Henning Kamp
1b1cf40164 Add PCI id for Quatech SSCLP-200/300 lowprofile single-port RS422/485 card. 2003-01-31 21:11:20 +00:00
Maxim Sobolev
8c6d67ef99 Add PCI ID and configuration hint for Netmos Nm9845 PCI 6-ports serial
card.

Submitted by:	Oleg Antoshin <oleh@at2000.kiev.ua>
MFC after:	3 days
2002-07-10 17:26:11 +00:00
John Baldwin
565f27f116 Add PCI ID for the SeaLevel Ultra 530.PCI single port card.
Sponsored by:	The Weather Channel
2002-03-20 19:38:26 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Warner Losh
e181db22a4 Add device ID for Xircom modem. Also add work around from gwk@sgi.com
to put the device into 8 bit mode a second time.  This appears to have
no ill effects on other devices, and appears to be necessary for the
xircom modem.

Submitted by: gwk@sgi.com, many others that found his patch in the archives.
2002-03-16 04:26:46 +00:00
Yoshihiro Takahashi
9fdd7481ef Add pc98 support. 2002-01-31 08:24:36 +00:00
John Hay
57019e6041 Add support for different serial clock frequencies and not just the
standard one of 1.8432MHz. This will be used by the puc (PCI
"universal" communication card) device driver.

Reviewed by:	bde
2002-01-30 17:22:04 +00:00
Warner Losh
1c988e75f4 bde suggests that sio really wants to manage its own softc. This
allows us to move the sio softc data structure back into sio.c and
reduce the complexity of the non sio.c sio files.

Submitted by: bde

# I didn't fix the locking issues that bruce also submitted.
2001-11-26 07:39:51 +00:00
Warner Losh
2ce87d3448 Break out the bus front ends into their own files. Rewrite
sio_pccard_detach to use new siodetach.  Add an extra arg to sioprobe
to tell driver to probe/not probe the device for IRQs.

This incorporates most of Bruce's review material.  I'm at a good
checkpoint, but there will be more to come based on bde's further
reviews.

Reviewed by: bde
2001-10-23 15:17:33 +00:00