Commit Graph

116 Commits

Author SHA1 Message Date
rumble 0e95582ed1 WD33C93 has only two registers, which often times aren't mapped to adjacent
bus space locations. Map them individually, instead.
2009-02-12 06:24:45 +00:00
bjh21 11aab16b02 Split device_t from wd33c93_softc. Reviewed by cube; tested on sgimips
by tsutsui.
2009-01-25 15:23:42 +00:00
jnemeth 02b4a4a2af add a comment explaining how to regenerate podules.h and podule_data.h 2009-01-21 14:31:04 +00:00
bjh21 ca028b246f sec(4): use device_t and cfdata_t rather than explicit structure pointers. 2009-01-20 20:45:11 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
cegger 3bde75a1bc use device_lookup_private to get softc 2008-06-12 22:44:47 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger 801bd3ddec use aprint_*_dev and device_xname 2008-04-05 20:08:52 +00:00
tsutsui 5147571380 Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes. 2008-04-04 16:00:57 +00:00
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
cube 607ead0ef4 Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend).  Use proper types and ansify where appropriate.
2008-03-14 15:09:09 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
bjh21 a3ad5d7241 TRUE -> true; FALSE -> false. 2007-03-07 23:17:01 +00:00
he 7a89811338 Cast to char* before doing pointer arithmetic. 2007-03-05 17:37:06 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
bjh21 bafb9c4f84 The SEC uses the same page latch for both ROM and RAM, so we should arrange
to reset it to 0 on shutdown so that RISC OS gets to see the start of the
ROM.
2006-10-14 21:47:11 +00:00
bjh21 8ca76bdc37 Don't use the uPD71071's autoinitialize mode. This may slow things down
slightly, but autoinitialize mode is impossible to use reliably, since it
means that if disc interrupts are blocked for long enough (or sec_copyout
is too slow), the uPD71071 can run off the end of a block before the
base registers have been updated and end up processing the same block
twice.  With this change, the SEC in my A540 seems finally to be solid.
2006-10-02 22:10:55 +00:00
bjh21 439213ef2c Allow wd33c93 attachments to choose what DMA mode it should use, and arrange
to use burst mode on sec(4), which makes it slightly but significantly faster.
2006-10-01 22:02:55 +00:00
bjh21 bcef78957e Don't explicitly specify no DMA support, since that doesn't work if the kernel
doesn't support IDE DMA at all.
2006-10-01 21:34:30 +00:00
bjh21 5375dc7f10 New driver, sec(4), for the Acorn SCSI Expansion Card. Unlike asc(4), this
driver uses the board's DMA system, uses the machine-independent WD33C93
driver, works on NetBSD/acorn26, and doesn't share a name with six other
machine-dependent SCSI drivers.  Not tested on acorn32, but it seems to
work tolerably well on my A540.
2006-10-01 12:39:35 +00:00
gdamore 34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
thorpej 838ee1e0d9 Use device_private(). 2006-03-29 06:51:47 +00:00
he 405939eac0 Change MALLOC to malloc and FREE to free in one instance where the
size parameter is not an integer constant.  Fixes build problem seen
when building for acorn26.
2006-03-19 23:45:13 +00:00
bouyer bf1a4d2af5 properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
  for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
2006-01-16 20:30:18 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he f1f4a50e8b Adapt to compiling with -Wcast-qual by constifying a char* field. 2005-06-09 09:15:28 +00:00
perry 48b2bd6932 regen 2005-02-27 15:32:15 +00:00
perry 73125c5ec0 don't leave spaces at the end of stripped RCS Ids 2005-02-27 15:31:01 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
drochner 96b589fc18 a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
 config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
 on "locators.h"
2004-09-13 12:55:47 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
thorpej 2ecdd552dc Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers.  Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
2004-05-25 20:42:40 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
bjh21 a33e671568 Regen. 2004-01-07 22:02:23 +00:00
bjh21 38cb9d0fe2 It looks like the isc PC netslot version of the Nexus interface uses the
same podule ID as the A3020/A4000 netslot version.  Update list to reflect
this.
2004-01-07 22:00:51 +00:00
thorpej a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
thorpej 5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej 527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +00:00
bjh21 c6ae6a7dbd Update for new wdc.c with indirect register mapping. 2003-11-29 20:30:27 +00:00
bouyer 7719e83c8b Following Matt Thomas's request, rename ata attribute to ata_hl, and
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.
2003-10-08 20:57:59 +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
chris d577246bde Regen. 2003-01-26 19:35:52 +00:00
chris 339056bf8f Add podule id for NET100 card. 2003-01-26 19:35:04 +00:00
bjh21 bfd06a4ff0 Regen (Simtec USB). 2002-11-03 12:59:44 +00:00