Commit Graph

38 Commits

Author SHA1 Message Date
drochner e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
drochner c6ad150573 use the locator passing config_found/submatch, and limit use of the
"locators.h" header to the .c file
2004-09-01 21:09:09 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
thorpej 3e1286d67c - Use ANSI function decls.
- Sprinkle some static around.
- Sprinkle some const around.
2004-08-23 05:50:02 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 9d4a640785 Use CFATTACH_DECL(). 2002-09-30 21:04:24 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
lukem b84f53efc5 add RCSID 2001-11-13 12:47:33 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
ad e9bc438c50 - Simplify eisa_devinfo().
- New KNF.
2000-09-01 17:18:20 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
thorpej ea3a1d9c44 Nuke __BROKEN_INDIRECT_CONFIG. 1998-06-08 06:55:54 +00:00
thorpej 9c183e53cb Slight change to previous. 1998-01-12 08:57:20 +00:00
thorpej b731c12641 Adjust for config changes. 1998-01-12 08:51:09 +00:00
enami 7f3eb8e4fb Declare EISAVERBOSE by defopt in files.eisa. Include opt_eisaverbose.h
in eisa.c.
1997-09-13 08:48:59 +00:00
thorpej fbc0df0a1a Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:30:02 +00:00
cgd 197d80c63a update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:25:23 +00:00
thorpej 16c4c5af26 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:24:37 +00:00
christos 86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos a9f11a46e4 printf -> kprintf, sprintf -> ksprintf 1996-10-10 19:54:10 +00:00
cgd 2a73ef60b7 change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
1996-08-27 21:53:46 +00:00
cgd d645bb042d make the EISA code look a bit more like the PCI code, in the way
the bus is configured, interrupts are handled, etc.  machine-dependent
header (machine/eisa/eisa_machdep.h) defines eisa_chipset_tag_t and
eisa_intr_handle_t types, and the following functions:
	eisa_attach_hook()
	eisa_maxslots()
	eisa_intr_map()
	eisa_intr_string()
	eisa_intr_establish()
	eisa_intr_disestablish()
Don't define the interrupt establish/disestablish functions directly
in terms of the ISA functions any more (on some wacked out systems,
there can be a difference).
1996-04-09 22:46:11 +00:00
cgd 80efcebba5 kill some pasted spaces. 1996-04-06 02:04:00 +00:00
christos b8e757d588 - remove unused variable
- add missing argument to printf statement
1996-03-30 23:08:29 +00:00
thorpej 6d9ea4cf59 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:43:52 +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 5e7aedd067 remember the bus_chipset_tag_t given by our parent, and pass it on to
children.  use I/O space access routines defined in <machine/bus.h>
when examining I/O space for slot ID information.
1996-03-08 20:39:32 +00:00
cgd 7c61fe7779 change printing of unknown device names when not (BUS)VERBOSE slightly 1996-03-02 02:44:25 +00:00
cgd 91f3357fe9 clean up some diagnostic printfs 1996-03-02 02:25:40 +00:00
cgd f33acccd57 if not EISAVERBOSE, don't say that vendor/product is "unknown," just say
what it is.
1996-03-02 01:09:37 +00:00
cgd a21351b381 use config_found_sm(), rather than config_search+config_attach()+glue, to
attach subdevices.
1996-02-27 21:48:52 +00:00
cgd 4bd7608739 Better EISA autoconfiguration, per PR 1959. 1996-02-27 00:20:54 +00:00