Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/x68k/dev/intio_dmac.c
RevisionDateAuthorComments
 1.40  07-Jan-2024  isaki TAB/space/indent cleanup.
 1.39  17-Dec-2023  andvar Remove accidentally added i in previous commit..
 1.38  17-Dec-2023  andvar Fix DMAC_ARRAYCHAIN enabled build:
pass dmac->sc_dev instead of undefined self in dmac_start_xfer_offset().
remove unused chan/ch variables in dmac_program_arraychain().
initialize c to zero in dmac_start_xfer_offset() and add check that is bigger
than 0 before calling dma_cachectl() to fix potentially uninitialized error
(seems to be false positive though).
 1.37  11-Aug-2017  isaki Fix a Continue Operation.
Patch from Y.Sugahara.
 1.36  11-Aug-2017  isaki Allow dmac_alloc_channel() to specify DCR and OCR.
FDC uses 'Cycle Steal Mode with Hold' but ADPCM
should use 'Cycle Steal Mode without Hold' on x68k.
From Y.Suhagara and it was found by XM6i.
 1.35  26-Mar-2014  christos branches: 1.35.6; 1.35.22;
kill sprintf, fix unused.
 1.34  14-Oct-2012  tsutsui branches: 1.34.2;
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.
 1.33  06-Jun-2010  mrg branches: 1.33.8; 1.33.14; 1.33.18;
fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
 1.32  29-Nov-2008  isaki branches: 1.32.6; 1.32.8;
Rename variables to avoid confusing. forgotten in previous commit.
 1.31  25-Jun-2008  isaki branches: 1.31.2; 1.31.4;
Split device_t/softc for dmac_*_xfer().
Rename some variables to avoid confusing.
 1.30  25-Jun-2008  isaki Split device_t/softc. Use aprint*() and device_xname().
 1.29  23-Jun-2008  isaki Make intio_intr_establish() use evcnt(9),
instead of dynamic allocation of intrnames/intrcnt.
 1.28  28-Apr-2008  martin branches: 1.28.2; 1.28.4;
Remove clause 3 and 4 from TNF licenses
 1.27  17-Oct-2007  garbled branches: 1.27.16; 1.27.18; 1.27.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.26  12-May-2007  isaki branches: 1.26.10;
Clean up white spaces and tabs.
 1.25  11-Mar-2007  isaki branches: 1.25.2; 1.25.8;
white space, indent and KNF.
 1.24  04-Mar-2007  christos branches: 1.24.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.23  11-Dec-2005  christos branches: 1.23.26;
merge ktrace-lwp.
 1.22  12-Jun-2005  he branches: 1.22.2;
Change the `name' argument of dmac_alloc_channel to const char*, so that
a string constant can be used without generating a warning.
 1.21  18-Jan-2005  chs de-__P, remove register, ansify.
 1.20  13-Dec-2004  chs branches: 1.20.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.19  15-Jul-2003  lukem rcsid
 1.18  13-Oct-2002  isaki branches: 1.18.6;
Clean up debug code.
 1.17  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.16  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.15  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14  04-Aug-2002  isaki Fix printf format in DIAGNOSTIC.
 1.13  03-Aug-2002  isaki Fix compile warnings in debug code.
 1.12  25-Nov-2001  minoura branches: 1.12.8;
Remove unused variables.
Correct printf format strings.
 1.11  27-May-2001  minoura branches: 1.11.2; 1.11.8;
Reset dx_nextoff and dx_nextsize before transfer.
 1.10  22-May-2001  minoura Reset the status register after abort.
 1.9  02-May-2001  minoura Disable array chain mode by default, since it is unused by any of
the current devices.
Add more flexibility in the API.
 1.8  30-Apr-2001  minoura Correct memory leak.
Use single block transfer when appropriate.
 1.7  29-Jun-2000  mrg branches: 1.7.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.6  18-Apr-2000  minoura Explicitly include opt_m680x0.h.
 1.5  08-Jul-1999  thorpej branches: 1.5.2;
Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.4  24-Mar-1999  minoura branches: 1.4.4;
Shut up gcc -Wall.
 1.3  18-Mar-1999  minoura G/C.
 1.2  16-Mar-1999  minoura Merged minoura_x68k_bus_h branch.
 1.1  30-Jan-1999  minoura branches: 1.1.2;
file intio_dmac.c was initially added on branch minoura_x68k_bus_h.
 1.1.2.4  13-Feb-1999  minoura Use the cycle steal with hold mode instead of the cycle steal without hold mode.
Handle INTIOCF_ADDR_DEFAULT case.
 1.1.2.3  10-Feb-1999  minoura Use dma_cachectl.
Add some debugging code.
 1.1.2.2  02-Feb-1999  minoura Arg for Interrupt handlers.
Specify device physical address instead of virtual for dmac_start_xfer.
 1.1.2.1  30-Jan-1999  minoura Added DMAC driver.
 1.4.4.1  02-Aug-1999  thorpej Update from trunk.
 1.5.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.11.8.4  18-Oct-2002  nathanw Catch up to -current.
 1.11.8.3  13-Aug-2002  nathanw Catch up to -current.
 1.11.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.11.8.1  27-May-2001  nathanw file intio_dmac.c was added on branch nathanw_sa on 2002-01-08 00:28:39 +0000
 1.11.2.3  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.11.2.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.11.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.8.1  31-Aug-2002  gehenna catch up with -current.
 1.18.6.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.18.6.5  24-Jan-2005  skrll Sync with HEAD.
 1.18.6.4  18-Dec-2004  skrll Sync with HEAD.
 1.18.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.18.6.1  03-Aug-2004  skrll Sync with HEAD
 1.20.2.1  29-Apr-2005  kent sync with -current
 1.22.2.1  03-Sep-2007  yamt sync with head.
 1.23.26.2  17-May-2007  yamt sync with head.
 1.23.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.24.2.2  27-May-2007  ad Sync with head.
 1.24.2.1  13-Mar-2007  ad Sync with head.
 1.25.8.1  22-May-2007  matt Update to HEAD.
 1.25.2.1  11-Jul-2007  mjf Sync with head.
 1.26.10.1  06-Nov-2007  matt sync with HEAD
 1.27.20.3  11-Aug-2010  yamt sync with head.
 1.27.20.2  04-May-2009  yamt sync with head.
 1.27.20.1  16-May-2008  yamt sync with head.
 1.27.18.1  18-May-2008  yamt sync with head.
 1.27.16.3  17-Jan-2009  mjf Sync with HEAD.
 1.27.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.27.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.28.4.1  27-Jun-2008  simonb Sync with head.
 1.28.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.31.2.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.32.8.1  03-Jul-2010  rmind sync with head
 1.32.6.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.33.18.3  03-Dec-2017  jdolecek update from HEAD
 1.33.18.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.18.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.33.14.1  18-Nov-2012  riz 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
using fdformat(1).
Finally we can prepare NetBSD/x68k install floppies without Human68k
(except actual initial bootstrap).
KNF and space nits
 1.33.8.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.33.8.1  30-Oct-2012  yamt sync with head
 1.34.2.1  18-May-2014  rmind sync with head
 1.35.22.1  23-Sep-2017  snj Pull up following revision(s) (requested by isaki in ticket #290):
sys/arch/x68k/dev/dmacvar.h: revision 1.11-1.12 via patch
sys/arch/x68k/dev/intio_dmac.c: revision 1.36-1.37 via patch
sys/arch/x68k/dev/fd.c: revision 1.120 via patch
sys/arch/x68k/dev/vs.c: revision 1.45-1.46 via patch
Use dmac_prepare_xfer().
From Y.Sugahara.
--
Allow dmac_alloc_channel() to specify DCR and OCR.
FDC uses 'Cycle Steal Mode with Hold' but ADPCM
should use 'Cycle Steal Mode without Hold' on x68k.
From Y.Suhagara and it was found by XM6i.
--
Fix a Continue Operation.
Patch from Y.Sugahara.
 1.35.6.1  28-Aug-2017  skrll Sync with HEAD

RSS XML Feed