URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 1490 to Rev 1491
- ↔ Reverse comparison
Rev 1490 → Rev 1491
/trunk/or1ksim/peripheral/dma.c
42,6 → 42,8
#include "sched.h" |
#include "debug.h" |
|
DEFAULT_DEBUG_CHANNEL(dma); |
|
/* We keep a copy of all our controllers because we have to export an interface |
* to other peripherals eg. ethernet */ |
static struct dma_controller *dmas = NULL; |
243,7 → 245,7
|
/* Do we need to abort? */ |
if ( TEST_FLAG( channel->regs.csr, DMA_CH_CSR, STOP ) ) { |
debug( 3, "DMA: STOP requested\n" ); |
TRACE( "DMA: STOP requested\n" ); |
CLEAR_FLAG( channel->regs.csr, DMA_CH_CSR, CH_EN ); |
CLEAR_FLAG( channel->regs.csr, DMA_CH_CSR, BUSY ); |
SET_FLAG( channel->regs.csr, DMA_CH_CSR, ERR ); |
267,7 → 269,7
|
/* If this is the first cycle of the transfer, initialize our state */ |
if ( !TEST_FLAG( channel->regs.csr, DMA_CH_CSR, BUSY ) ) { |
debug( 4, "DMA: Starting new transfer\n" ); |
TRACE( "DMA: Starting new transfer\n" ); |
|
CLEAR_FLAG( channel->regs.csr, DMA_CH_CSR, DONE ); |
CLEAR_FLAG( channel->regs.csr, DMA_CH_CSR, ERR ); |
284,7 → 286,7
|
/* Might need to skip descriptor */ |
if ( CHANNEL_ND_I( channel ) ) { |
debug( 3, "DMA: dma_nd_i asserted before dma_req_i, skipping descriptor\n" ); |
TRACE( "DMA: dma_nd_i asserted before dma_req_i, skipping descriptor\n" ); |
dma_channel_terminate_transfer( channel, 0 ); |
return; |
} |
304,7 → 306,7
|
/* When done with a chunk, check for dma_nd_i */ |
if ( CHANNEL_ND_I( channel ) ) { |
debug( 3, "DMA: dma_nd_i asserted\n" ); |
TRACE( "DMA: dma_nd_i asserted\n" ); |
dma_channel_terminate_transfer( channel, 0 ); |
return; |
} |
360,7 → 362,7
/* Take care of transfer termination */ |
void dma_channel_terminate_transfer( struct dma_channel *channel, int generate_interrupt ) |
{ |
debug( 4, "DMA: Terminating transfer\n" ); |
TRACE( "DMA: Terminating transfer\n" ); |
|
/* Might be working in a linked list */ |
if ( channel->load_next_descriptor_when_done ) { |
/trunk/or1ksim/support/dbchs.h
30,3 → 30,4
DECLARE_DEBUG_CHANNEL(ata) |
DECLARE_DEBUG_CHANNEL(gpio) |
DECLARE_DEBUG_CHANNEL(mc) |
DECLARE_DEBUG_CHANNEL(dma) |