Commit Graph

100 Commits

Author SHA1 Message Date
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
bjh21 097f627f92 Add Simtec USB podule. 2002-11-03 12:58:15 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +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
bjh21 681c52938e Regen (many new podules). 2002-05-23 22:01:14 +00:00
bjh21 e3d123e4e4 Add all the product IDs from <arm/xcb.h> on RISC iX 1.2. There are several
places where they disagree with our list (and reality).  In those cases,
I've kept the old value and added a comment.  The RISC iX list stops at
ID 181 (0xb5).
2002-05-23 22:00:49 +00:00
bjh21 f402b4faa2 Regen (sorting). 2002-05-22 23:46:53 +00:00
bjh21 2a1092efaa Sort the Wild Vision parallel card into order. 2002-05-22 23:46:36 +00:00
bjh21 1e170f49cd Regen (merge of RISC iX manufacturers list). 2002-05-22 23:27:16 +00:00
bjh21 35010db489 Merge in the list of manufacturer IDs from <arm/xcb.h> on RISC iX 1.2.
Where they differ with what we've had historically, I've kept our value
and added a comment.  The RISC iX list stops at 65 (0x41).
2002-05-22 23:23:23 +00:00
bjh21 205186731b Substantial overhaul of podule IDs. Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers.  This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus.  Thus, we don't do that
any more.

This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.
2002-05-22 22:43:13 +00:00
bjh21 6d59ad5ec5 Add podule_readcmos(), for getting the CMOS configuration for a podule.
Only implemented on acorn26 for now, but the acorn32 implementation should
be pretty much identical.
2002-05-22 22:13:12 +00:00
bjh21 b741178a9b Regen: RISC Developments IDE, FaxPack. 2002-05-19 22:34:07 +00:00
bjh21 b6c3ea4d91 Add a few Wakefield acquisitions:
Computer Concepts FaxPack
RISC Developments 8-bit IDE interface
Note about Oak EtherO card, which seems to share an ID with their SCSI card.
2002-05-19 22:29:57 +00:00
bjh21 ca682b8433 Remove "This file is part of NetBSD/arm26" comment. 2002-03-29 17:27:34 +00:00
bjh21 f248dd79bd Regen: Computer Concepts ROM/RAM podule. 2002-03-29 00:18:24 +00:00