Commit Graph

47 Commits

Author SHA1 Message Date
christos
98f48d5f26 ICH10 support from Brad du Plessis 2008-10-01 15:38:14 +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
dyoung
f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
drochner
98da2f9c50 fix some unaligned PCI config space accesses in suspend/resume functions 2008-01-15 00:24:47 +00:00
joerg
e6f452fd65 Allow saving of up to 4 PCI registers in the IDE code. 2008-01-04 00:27:27 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
xtraeme
cf19cf6244 Another ICH8M SATA Controller found in jmcneill's laptop. 2007-09-09 01:09:02 +00:00
xtraeme
930907a507 Proper ICH8M IDE Controller support (missed in previous). 2007-08-31 01:35:07 +00:00
xtraeme
8de967d769 Attach to the ICH8M IDE Controller. 2007-08-31 00:01:17 +00:00
xtraeme
a7e0991f20 Attach to the ICH9 SATA devices. 2007-08-30 23:55:03 +00:00
itohy
691799bc9b I tried the test code in PR kern/35934 on PIIX4 and ICH6,
both of which turned out to have the problem.
Enabled (untested) workaround for all PIIX controllers.

XXX  Do other controllers also have this problem?
2007-03-10 06:01:43 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
cube
ffb2095341 Now that we have a AHCI driver (thanks a bunch, Manuel!), we can remove the
nonsense quirk that switched operating mode on ICH7 and ICH8.

I removed the obvious candidates for ahcisata(4), and I'll have a closer
look later if there are others to be removed;  ahcisata(4) will take over
handling the device anyway, but there is no reason to keep AHCI devices in
that list.

Along the way, remove the code that tries to put the chip in Enhanced mode,
it makes absolutely no sense to do that, and some BIOSes might not have
prepared the BARs for that, as proven by PR#34885.  If people want to use
all IDE and SATA channels, they have to tell the BIOS.
2006-12-01 10:31:30 +00:00
wiz
6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
drochner
53056d0217 avoid magic number 2006-11-08 11:09:52 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
jmcneill
f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
xtraeme
44522b1f90 * Add support for ICH8 and ICH8M SATA/RAID controllers.
* If the controller is in AHCI, ask for SATA IDE mode of operation.

jsg@openbsd says:

"X60/T60 Thinkpads are shipped in AHCI configuration by default,
 this makes them work without changing a BIOS option."

Tested by eye of the beholder. From OpenBSD.

Ok'ed tls.
2006-09-03 18:30:35 +00:00
cube
d45fad2e7e Add support for the 631xESB/632xESB. 2006-08-08 19:38:34 +00:00
jmcneill
5045be0e4d Restore IDE and UDMA timings on resume for the PIIX4. 2006-06-17 17:05:20 +00:00
markd
d6a59139b0 Add Intel 82801GBM/GHM Serial ATA Controller. 2006-05-19 01:27:00 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
bouyer
13f098d5de Not add PIIX are wired to compat mode these days. Problem reported and fix
tested by Havard Eidnes.
2005-08-10 13:23:38 +00:00
tron
3cc55e5b70 Add support for PATA and SATA ports in the Intel ICH7 southbridge (82801G).
Patch supplied by Marcello Balduccini in PR port-i386/30795.
2005-07-21 07:09:31 +00:00
briggs
5c1f94f81d Match the 6300ESB on-board SATA/RAID controller.
Set the ATA RAID flag, if appropriate, in the SATA chip map.
Ensure that the interrupts are enabled in the SATA chip map.
2005-06-20 02:10:18 +00:00
bouyer
ec4bb683de Support Intel 82801FBM Serial ATA Controller. From Kurt Schreiner on tech-kern. 2005-06-15 18:01:12 +00:00
lukem
ec43f8fc40 add __KERNEL_RCSID 2005-05-24 05:25:15 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
jmcneill
5a6c12cd3b Add powerhooks for PIIX IDE driver. 2005-01-26 21:50:31 +00:00
cube
7d9f9f3cc2 Add support for the ICH6 IDE controller (82801FB). 2004-11-10 17:19:05 +00:00
cube
49440f65c0 Add support for the 82801FB/FR (ICH6/6R) SATA controllers. 2004-10-22 15:09:22 +00:00
thorpej
335b799580 atastart() (called only at splbio(), and from interrupts) can change
drive_flags, to make sure all drive_flags manipulations are done at
splbio().
2004-08-21 00:28:34 +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
1600c8b8cd - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
  ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
  ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
  ata_channel.  (This one just hides a cast, and is really just for
  consistency with the others.)
2004-08-19 23:25:35 +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
46f4277564 WDCDEBUG -> ATADEBUG. 2004-08-13 04:10:49 +00:00
thorpej
ab20886f7b Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
2004-08-13 03:12:59 +00:00
thorpej
4a923452bb Handle the i6300ESB IDE / SATA controllers. These are apparently just ICH5. 2004-05-11 23:15:37 +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
2f2ca9e66b Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
2003-12-14 01:32:01 +00:00
bouyer
464de24c0e Clone artisea_chip_map() for use by the ICH5 SATA controllers.
The 31244 is really different from the ICH5, and one day the map function
could be incompatibles. Suggested by thorpej@
2003-12-06 22:40:03 +00:00
bouyer
b42d959140 Add support for the Intel 82801ER Serial ATA/Raid Controller.
From Simas Mockevicius on current-users@.
2003-12-05 23:12:41 +00:00
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
thorpej
36e9866d7b Cosmetic changes:
- Use static to unexport symbols that don't need to be exported.
- ANSI'ify.
- Some whitespace nits.
2003-10-11 17:40:15 +00:00
bouyer
9d02ccdbdf Split pciide in per-chip family driver, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0007.html
We now have:
acardide*       at pci? dev ? function ?        # Acard IDE controllers
aceride*        at pci? dev ? function ?        # Acer Lab IDE controllers
cmdide*         at pci? dev ? function ?        # CMD tech IDE controllers
cypide*         at pci? dev ? function ?        # Cypress IDE controllers
hptide*         at pci? dev ? function ?        # Triones/HighPoint IDE controllers
optiide*        at pci? dev ? function ?        # Opti IDE controllers
piixide*        at pci? dev ? function ?        # Intel IDE controllers
pdcide*         at pci? dev ? function ?        # Promise IDE controllers
siside*         at pci? dev ? function ?        # SiS IDE controllers
slide*          at pci? dev ? function ?        # Symphony Labs IDE controllers
viaide*         at pci? dev ? function ?        # VIA/AMD/Nvidia IDE controllers
pciide*         at pci? dev ? function ? flags 0x0000   # GENERIC pciide driver

serverworks driver not commited yet; there are still copyright issues about
it.
2003-10-08 11:51:59 +00:00