svn commit: r184314 - head/sys/powerpc/powermac
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Oct 26 17:09:14 PDT 2008
Author: nwhitehorn
Date: Mon Oct 27 00:09:14 2008
New Revision: 184314
URL: http://svn.freebsd.org/changeset/base/184314
Log:
Bring Kauai ATA driver in line with Macio ATA by reading the PIO config reg
to set the initial PIO mode instead of assuming PIO4. There are still a few
nagging issues:
- There are some problems with 64 K DMA transfers waiting on lower level
changes.
- ATAPI DMA is broken on Marcel's Mac Mini because we need an ATA SELECT hook
propagated up to individual drivers for hardware without timing registers for
each ATA channel.
Modified:
head/sys/powerpc/powermac/ata_kauai.c
Modified: head/sys/powerpc/powermac/ata_kauai.c
==============================================================================
--- head/sys/powerpc/powermac/ata_kauai.c Sun Oct 26 23:11:25 2008 (r184313)
+++ head/sys/powerpc/powermac/ata_kauai.c Mon Oct 27 00:09:14 2008 (r184314)
@@ -292,16 +292,12 @@ ata_kauai_attach(device_t dev)
#endif
/* Set up initial mode */
- if (sc->shasta)
- sc->pioconf[0] = sc->pioconf[1] = pio_timing_shasta[4];
- else
- sc->pioconf[0] = sc->pioconf[1] = pio_timing_kauai[4];
+ sc->pioconf[0] = sc->pioconf[1] =
+ bus_read_4(sc->sc_memr, PIO_CONFIG_REG) & 0x0f000fff;
sc->udmaconf[0] = sc->udmaconf[1] = 0;
sc->wdmaconf[0] = sc->wdmaconf[1] = 0;
- bus_write_4(sc->sc_memr, PIO_CONFIG_REG, sc->pioconf[0]);
-
/* Magic FCR value from Apple */
bus_write_4(sc->sc_memr, 0, 0x00000007);
More information about the svn-src-all
mailing list