dma: only expose API on fxcg50

Currently there seems to be no DMA at all on fx9860g. Further
investigation would be required, because this would be the first major
difference between the SH7305's found in fx9860g and fxcg50 models.

An automated peripheral register discovery strategy might help, but
identifying discovered registers would be non trivial.

Also use the pruning ability of the Makefile to avoid troublesome
ifdef's in the code.
This commit is contained in:
Lephe 2019-09-15 10:18:03 +02:00
parent 5630814897
commit 552b9b9a43
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
5 changed files with 7 additions and 14 deletions

View File

@ -1,13 +1,12 @@
//---
// gint:dma - Direct Memory Access for efficient data transfer
//
// Currently this module is used only to transfer data to the display on
// fxcg50, but fast memcpy() is apparently possible as well.
//---
#ifndef GINT_DMA
#define GINT_DMA
#ifdef FXCG50
#include <gint/defs/types.h>
/* dma_size_t - Transfer block size */
@ -94,4 +93,6 @@ void dma_transfer_noint(int channel, dma_size_t size, uint blocks,
@size Sie of destination area (32-aligned) */
void *dma_memset(void *dst, uint32_t pattern, size_t size);
#endif /* FXCG50 */
#endif /* GINT_DMA */

View File

@ -124,7 +124,7 @@ void hw_detect(void);
** Direct Memory Access Controller
*/
/* Nothing other than the HW_LOADED bit yet */
/* Nothing other than the HW_LOADED bit yet. Only valid on fxcg50 */
/*
** Timer Unit

View File

@ -46,8 +46,8 @@ src2obj = $(1:../src/%=src/%).o
src2dep = $(1:../src/%=src/%).d
# Source files
prune-fx := -name render-cg -prune
prune-cg := -name render-fx -prune -o -name gray -prune
prune-fx := -name render-cg -prune -o -name dma -prune -o -name r61524 -prune
prune-cg := -name render-fx -prune -o -name gray -prune -o -name t6k11 -prune
src := $(shell find ../src \
$(prune-$(CONFIG.TARGET)) \
-o -name '*.[csS]' -print)

View File

@ -7,8 +7,6 @@
#include <gint/drivers.h>
#include <gint/dma.h>
#ifdef FXCG50
#define DMA SH7305_DMA
#define POWER SH7305_POWER
@ -309,5 +307,3 @@ gint_driver_t drv_r61524 = {
};
GINT_DECLARE_DRIVER(5, drv_r61524);
#endif /* FXCG50 */

View File

@ -11,8 +11,6 @@
#include <gint/syscalls.h>
#ifdef FX9860G
//---
// Device specification sheet
//---
@ -261,5 +259,3 @@ gint_driver_t drv_t6k11 = {
};
GINT_DECLARE_DRIVER(5, drv_t6k11);
#endif /* FX9860G */