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.
pull/7/head
Lephe 3 years ago
parent 5630814897
commit 552b9b9a43
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
  1. 7
      include/gint/dma.h
  2. 2
      include/gint/hardware.h
  3. 4
      make/Makefile
  4. 4
      src/r61524/r61524.c
  5. 4
      src/t6k11/t6k11.c

@ -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 */

@ -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

@ -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)

@ -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 */

@ -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 */

Loading…
Cancel
Save