|
Message
From: György 'nog' Jeney<nog@s...>
Date: Fri May 20 21:28:33 CEST 2005
Subject: [openrisc] [or1ksim #92] Make the dma peripheral use the new
debugging functions
Hi,Changelog says it all. ChangeLog: * Make the dma peripheral use the new debugging functions.
nog. -------------- next part -------------- --- peripheral/dma.c 2005-05-20 18:18:25.000000000 +0200 +++ ../or1ksim-ac/peripheral/dma.c 2005-05-20 21:09:50.000000000 +0200 @@ -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 @@ void dma_channel_clock( void *dat ) /* 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 @@ void dma_channel_clock( void *dat ) /* 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 @@ void dma_channel_clock( void *dat ) /* 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 @@ void dma_channel_clock( void *dat ) /* 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 @@ void dma_init_transfer( struct dma_chann /* 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 ) { --- support/dbchs.h 2005-05-20 21:08:56.000000000 +0200 +++ ../or1ksim-ac/support/dbchs.h 2005-05-20 21:10:01.000000000 +0200 @@ -30,3 +30,4 @@ DECLARE_DEBUG_CHANNEL(config) DECLARE_DEBUG_CHANNEL(ata) DECLARE_DEBUG_CHANNEL(gpio) DECLARE_DEBUG_CHANNEL(mc) +DECLARE_DEBUG_CHANNEL(dma)
|
 |