renamed spidma.[ch] to dma.[ch]
This commit is contained in:
@@ -72,7 +72,7 @@ CSRCS= \
|
|||||||
$(SRCDIR)/wait.c \
|
$(SRCDIR)/wait.c \
|
||||||
$(SRCDIR)/s19reader.c \
|
$(SRCDIR)/s19reader.c \
|
||||||
$(SRCDIR)/flash.c \
|
$(SRCDIR)/flash.c \
|
||||||
$(SRCDIR)/spidma.c \
|
$(SRCDIR)/dma.c \
|
||||||
$(SRCDIR)/xhdi_sd.c \
|
$(SRCDIR)/xhdi_sd.c \
|
||||||
$(SRCDIR)/xhdi_interface.c
|
$(SRCDIR)/xhdi_interface.c
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ SECTIONS
|
|||||||
objs/supervisor.o(.text)
|
objs/supervisor.o(.text)
|
||||||
objs/illegal_instruction.o(.text)
|
objs/illegal_instruction.o(.text)
|
||||||
objs/exceptions.o(.text)
|
objs/exceptions.o(.text)
|
||||||
objs/spidma.o(.text)
|
objs/dma.o(.text)
|
||||||
mcdapi/MCD_dmaApi.o(.text)
|
mcdapi/MCD_dmaApi.o(.text)
|
||||||
mcdapi/MCD_tasks.o(.text)
|
mcdapi/MCD_tasks.o(.text)
|
||||||
mcdapi/MCD_tasksInit.o(.text)
|
mcdapi/MCD_tasksInit.o(.text)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
#include "ff.h"
|
#include "ff.h"
|
||||||
#include "s19reader.h"
|
#include "s19reader.h"
|
||||||
#include "spidma.h"
|
#include "dma.h"
|
||||||
|
|
||||||
/* imported routines */
|
/* imported routines */
|
||||||
extern int mmu_init();
|
extern int mmu_init();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* spidma.c
|
* dma.c
|
||||||
*
|
*
|
||||||
* Created on: 27.07.2013
|
* Created on: 27.07.2013
|
||||||
* Author: mfro
|
* Author: mfro
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "spidma.h"
|
#include "dma.h"
|
||||||
#include <MCD_dma.h>
|
#include <MCD_dma.h>
|
||||||
#include "mcd_initiators.h"
|
#include "mcd_initiators.h"
|
||||||
#include "bas_printf.h"
|
#include "bas_printf.h"
|
||||||
@@ -34,6 +34,7 @@ void *dma_memcpy(void *dst, void *src, size_t n)
|
|||||||
{
|
{
|
||||||
case MCD_NO_DMA:
|
case MCD_NO_DMA:
|
||||||
xprintf("MCD_NO_DMA: no DMA active on this channel\r\n");
|
xprintf("MCD_NO_DMA: no DMA active on this channel\r\n");
|
||||||
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case MCD_IDLE:
|
case MCD_IDLE:
|
||||||
xprintf("MCD_IDLE: DMA defined but not active (initiator not ready)\r\n");
|
xprintf("MCD_IDLE: DMA defined but not active (initiator not ready)\r\n");
|
||||||
@@ -46,12 +47,14 @@ void *dma_memcpy(void *dst, void *src, size_t n)
|
|||||||
break;
|
break;
|
||||||
case MCD_HALTED:
|
case MCD_HALTED:
|
||||||
xprintf("MCD_HALTED: DMA killed\r\n");
|
xprintf("MCD_HALTED: DMA killed\r\n");
|
||||||
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case MCD_DONE:
|
case MCD_DONE:
|
||||||
xprintf("MCD_DONE: DMA finished\r\n");
|
xprintf("MCD_DONE: DMA finished\r\n");
|
||||||
break;
|
break;
|
||||||
case MCD_CHANNEL_INVALID:
|
case MCD_CHANNEL_INVALID:
|
||||||
xprintf("MCD_CHANNEL_INVALID: invalid DMA channel\r\n");
|
xprintf("MCD_CHANNEL_INVALID: invalid DMA channel\r\n");
|
||||||
|
return NULL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xprintf("unknown DMA status %d\r\n", ret);
|
xprintf("unknown DMA status %d\r\n", ret);
|
||||||
@@ -62,7 +65,7 @@ void *dma_memcpy(void *dst, void *src, size_t n)
|
|||||||
|
|
||||||
end = MCF_SLT_SCNT(0);
|
end = MCF_SLT_SCNT(0);
|
||||||
|
|
||||||
xprintf("took %d seconds (1 Mbyte)\r\n", (end - start) / 132 / 1000);
|
xprintf("took %d ms (1 Mbyte)\r\n", (end - start) / 132);
|
||||||
#ifdef _NOT_USED_
|
#ifdef _NOT_USED_
|
||||||
__asm__ __volatile__("move.w sr,d0\n\t"
|
__asm__ __volatile__("move.w sr,d0\n\t"
|
||||||
"stop #0x270\n\t"
|
"stop #0x270\n\t"
|
||||||
Reference in New Issue
Block a user