[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-6] src/sys/arch/x68k/dev
Module Name: src
Committed By: riz
Date: Sun Nov 18 21:56:37 UTC 2012
src/sys/arch/x68k/dev [netbsd-6]: fd.c fdreg.h intio_dmac.c
Pull up following revision(s) (requested by tsutsui in ticket #646):
sys/arch/x68k/dev/intio_dmac.c: revision 1.34
sys/arch/x68k/dev/fd.c: revision 1.100
sys/arch/x68k/dev/fd.c: revision 1.101
sys/arch/x68k/dev/fd.c: revision 1.102
sys/arch/x68k/dev/fd.c: revision 1.103
sys/arch/x68k/dev/fd.c: revision 1.104
sys/arch/x68k/dev/fd.c: revision 1.105
sys/arch/x68k/dev/fd.c: revision 1.98
sys/arch/x68k/dev/fd.c: revision 1.99
sys/arch/x68k/dev/fdreg.h: revision 1.5
sys/arch/x68k/dev/fdreg.h: revision 1.6
Explicitly specify a proper FDC data register address for HD63450 DMAC
to avoid confusion.
Previous one (fdc->sc_addr + fddata) wasn't a right address for
the FDC's data register but one for the command register by accident,
but FDC ignores A0 address input (connected to A1 of x68k address bus)
during DMA xfer (i.e. when DACK is asserted) so it happened to work
as expected on the real X680x0 hardware, but caused trouble on emulators.
The inconsistency was found by Y.Sugahara during debugging XM6i emulator
(and it will be fixed in the next release).
FDC behavior during DMA is confirmed by uPD72068 hardware application note.
XXX: There is no proper MI API to specify DMA address for DMA controller
(like MC68450) to access devices mapped to memory space by bus_space(9).
- use <sys/bus.h> rather than <machine/bus.h>
- no need to include uvm_extern.h
- include "ioconf.h" for struct cfdriver foo_cd
KNF and cosmetics. No binary change.
- check bus_space_map(9) return value
- use BUS_SPACE_MAP_SHIFTED_ODD for clarify
- define and use proper macro instead of magic
To abort DMA in dmac_abort_xfer(), set DMAC_CCR_SAB (software abort)
rather than DMAC_CCR_HLT (halt operation).
DMAC_CCR_HLT doesn't abort DMA xfers but only suspends DMA ops
(i.e. clearing HLT bit will resume DMA xfers), so previously
DMAC error always occurs on the next DMA xfer ops after
dmac_abort_xfer() is called.
Also suppress DMAC error messages in dmac_error() if it's caused
by software abort command because it can happen during normal
audio play/record DMA ops in vs(4) driver.
Before probing floppy drives, call NE7CMD_SENSEI and fdcresult()
to drain possible pending FDC interrupts. Taken from sys/dev/isa/fd.c.
Hopefully might fix occasional fd drive probe failure (but not confirmed).
Terminate DMAC and call bus_dmamap_unload(9) properly in all FDC xfer
error paths, as sys/dev/isa/fd.c does. Fixes unexpected DMAC errors
(and possible VM panic due to un-unloaded dmamap) on the first floppy
access after read/write errors.
Add floppy format support. Mostly taken from sys/dev/isa/fd.c.
Tested both fdNa (1232KB, 1024bytes/sector, 8sectors/track) and
fdNc (1200KB, 512bytes/sector, 15sectors/track) format on X68030
Finally we can prepare NetBSD/x68k install floppies without Human68k
(except actual initial bootstrap).
KNF and space nits
To generate a diff of this commit:
cvs rdiff -u -r126.96.36.199 -r188.8.131.52 src/sys/arch/x68k/dev/fd.c
cvs rdiff -u -r1.4 -r184.108.40.206 src/sys/arch/x68k/dev/fdreg.h
cvs rdiff -u -r1.33 -r220.127.116.11 src/sys/arch/x68k/dev/intio_dmac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |