Search
lxdream.org :: lxdream/src/sh4/dmac.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/dmac.c
changeset 502:c4ecae2b1b5e
prev430:467519b050f4
next561:533f6b478071
author nkeynes
date Thu Dec 06 10:43:30 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Add support for the MMIO side of the TLB (and LDTLB)
file annotate diff log raw
1.1 --- a/src/sh4/dmac.c Mon Oct 08 12:09:06 2007 +0000
1.2 +++ b/src/sh4/dmac.c Thu Dec 06 10:43:30 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: dmac.c,v 1.3 2007-10-08 12:06:01 nkeynes Exp $
1.6 + * $Id: dmac.c,v 1.4 2007-11-08 11:54:16 nkeynes Exp $
1.7 *
1.8 * SH4 onboard DMA controller (DMAC) peripheral.
1.9 *
1.10 @@ -170,7 +170,7 @@
1.11 *
1.12 * @return the number of bytes actually transferred.
1.13 */
1.14 -uint32_t DMAC_get_buffer( int channel, unsigned char *buf, uint32_t numBytes )
1.15 +uint32_t DMAC_get_buffer( int channel, sh4ptr_t buf, uint32_t numBytes )
1.16 {
1.17 uint32_t control = DMA_CONTROL(channel);
1.18 uint32_t source, count, run_count, size, i;
1.19 @@ -195,7 +195,7 @@
1.20 run_count = count;
1.21
1.22 /* Do copy - FIXME: doesn't work when crossing regions */
1.23 - char *region = mem_get_region( source );
1.24 + sh4ptr_t region = mem_get_region( source );
1.25 switch( (control >> 12) & 0x03 ) {
1.26 case 0:
1.27 memcpy( tmp, region, size );
1.28 @@ -235,7 +235,7 @@
1.29 return run_count * size;
1.30 }
1.31
1.32 -uint32_t DMAC_put_buffer( int channel, unsigned char *buf, uint32_t numBytes )
1.33 +uint32_t DMAC_put_buffer( int channel, sh4ptr_t buf, uint32_t numBytes )
1.34 {
1.35 uint32_t control = DMA_CONTROL(channel);
1.36 uint32_t dest, count, run_count, size, i;
1.37 @@ -258,7 +258,7 @@
1.38 run_count = count;
1.39
1.40 /* Do copy - FIXME: doesn't work when crossing regions */
1.41 - char *region = mem_get_region( dest );
1.42 + sh4ptr_t region = mem_get_region( dest );
1.43 switch( (control >> 12) & 0x03 ) {
1.44 case 0:
1.45 for( i=0; i<run_count; i++ ) {
.