Browse Source

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.
compat
Lephe 3 months ago
parent
commit
552b9b9a43
Signed by: Lephe <sebastien.michelland@protonmail.com> GPG Key ID: 1BBA026E13FC0495
5 changed files with 7 additions and 14 deletions
  1. +4
    -3
      include/gint/dma.h
  2. +1
    -1
      include/gint/hardware.h
  3. +2
    -2
      make/Makefile
  4. +0
    -4
      src/r61524/r61524.c
  5. +0
    -4
      src/t6k11/t6k11.c

+ 4
- 3
include/gint/dma.h 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 */

+ 1
- 1
include/gint/hardware.h 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

+ 2
- 2
make/Makefile 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)

+ 0
- 4
src/r61524/r61524.c 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 */

+ 0
- 4
src/t6k11/t6k11.c 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 */

Loading…
Cancel
Save