Commit Graph

51 Commits

Author SHA1 Message Date
fvdl 6242a54566 There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

	bus_space_write_4(tag, handle, offset, value)

becomes

	bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).
2003-11-27 23:02:40 +00:00
bouyer 99d6009c2a Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
mycroft eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
matt 7ba7388e87 Don't malloc channel_queue, put it in the softc. 2003-03-22 20:01:05 +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 71adb76f75 Use CFATTACH_DECL(). 2002-09-30 21:57:46 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
yamt 0f75af34c0 constify and make auto const variables static. 2002-06-08 17:07:53 +00:00
pooka d70864a866 make this compile:
include dev/ic/joyvar.h instead of the now non-existant arm32/isa/joyvar.h
2002-02-03 23:17:58 +00:00
tsutsui bcba62925f Call malloc(9) with M_ZERO flag instead of bzero() after malloc(). 2002-01-14 13:32:44 +00:00
yamt dbaca00330 move dev/isa/cs89x0{.c,{var,reg}.h} into dev/ic
and split isadma parts into /dev/isa/cs89x0isa*.
2001-11-26 19:17:05 +00:00
lukem ab5d9d2b0c add RCSIDs 2001-11-13 07:24:43 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
jdolecek 372e5956ef Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
2001-04-11 07:42:31 +00:00
matt 9ae27fdc8c print the modes of the IDE devices we've attached. 2001-03-04 03:22:23 +00:00
matt 0da665182e Add pckbc attachment so we can get wscons on the dnard. 2001-02-26 02:39:30 +00:00
nathanw 46b2a2fcd4 Do ess_config_addr() in the ofisa front end, rather than in the match
routine. Prevents problems with non-SCR ess chips, as described in
PR 11630.
2001-01-06 22:50:00 +00:00
mycroft a6fe4b78f2 Um, we need rnd.h so that cs_softc is defined properly. Overrunning structures
is bad.
NOTE: #IFDEF IN SOFTC DEFINITIONS IS BAD.
2000-12-26 09:42:21 +00:00
thorpej ae7f25d8af Fix a typo. 1999-03-30 20:07:56 +00:00
cgd a6eca03c65 pull ofisa_machdep.h in from machine/ 1999-03-19 03:30:35 +00:00
mycroft 9e041fd850 Adjustments for structure name changes. 1999-03-16 13:07:45 +00:00
mycroft 4822d3d0b0 Move IRQ setup into frontend. Need to move DRQ handling as well. 1999-02-19 16:10:44 +00:00
sommerfe 57ba10cfab Change ofisa attachment comparable to change drochner made to isa
attachment.  Works at least well enough to allow kernel to build &
boot on diskless shark with wdc controller in it.
1998-12-02 00:18:41 +00:00
bouyer 354f32509f Pass the rigth argument to wdcintr(). Closes PR 6342. 1998-10-23 13:58:17 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00
thorpej 96aa1cec21 Add ofisa attachment for the ISA joystick driver.
XXX currently arm32-specific.
1998-08-20 07:02:32 +00:00
thorpej ee26f0775b This now needs <dev/midi_if.h> to build. 1998-08-18 17:55:09 +00:00
thorpej d0a17ab63e Fix a typo. 1998-08-17 20:34:19 +00:00
thorpej 2b869a383f Use _CS_OFISA_MD_* callbacks for old, broken OpenFirmware builds. 1998-08-15 02:59:01 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
augustss 6b407a79c6 Major cleanup of the ESS driver. It now sorta works. More to come. 1998-07-31 15:17:17 +00:00
thorpej 4f8d24662e Uncomment the SoundBlaster ofisa attachment; the Shark isn't the only
potenial user of ofisa (e.g. my FirePower).  An ofisa attachment for the
SoundBlaster is prefectly legitimate.
1998-07-30 21:25:05 +00:00
thorpej 0bd4f9291c Use the correct "compatible" strings (ESS, not generic SB!), and correct
some comments about what we expect as far as interrupt and dma properties.
1998-07-30 21:22:59 +00:00
augustss c0ca4781ed ESS attachments for ofisa. 1998-07-30 14:15:59 +00:00
augustss cdeb158d5f A first stab at making the SHARK sound work. It doesn't really work
yet, but it probes and makes a noise when used.  Stay tuned!
1998-07-30 14:11:42 +00:00
thorpej 8db7ed28a4 ISA with OpenFirmware configuration glue for the CS8900 Ethernet driver. 1998-07-27 01:26:43 +00:00
thorpej 750e240c97 Print the "model" property. 1998-07-14 01:39:34 +00:00
thorpej 30291f0f2f Declare the ofisa soundblaster attachment. 1998-07-08 05:14:10 +00:00
thorpej 213e26d670 OpenFirmware glue for ISA SoundBlaster and compatible devices. 1998-07-01 06:52:12 +00:00
thorpej 34e62af19a - Fix a bug that prevented one from requesting a subset of a property
containing multiple values.
- Add a way to get the "dma" property for a node.
1998-06-30 00:09:36 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
thorpej c5a827e7f6 Per leo@netbsd.org: Don't call isa_dmainit() if NISADMA == 0. 1998-06-11 08:43:01 +00:00
tv 209848d4ab Change `dev' -> `self' in ofisaattach(), compile error 1998-06-10 16:48:21 +00:00
thorpej e290abfe34 Initialize DMA state when we attach the ofisa bus. 1998-06-09 00:02:43 +00:00
cgd 09cde3ae17 compile with -Wall, update for changes to dev/ofw 1998-03-21 02:06:17 +00:00
thorpej 8354e68508 Remove "class" declarations, and add "devclass" declarations where
appropriate.  Fix several inconsistencies between device class and
attributes.  Mostly from Chris Demetriou.
1998-02-16 22:12:45 +00:00
cgd f1fa872906 don't forget class spec 1998-02-07 00:49:19 +00:00