From bf64f87bbae91c7a4b77ecb0b892906335e054ea Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 22 Oct 2012 13:05:22 +0100 Subject: Remove bmm_dma_memcpy() and bmm_dma_sync() --- Makefile.am | 4 +- bmm_lib.c | 32 -------------- bmm_lib.h | 2 - bmm_lib_priv.h | 2 - bmm_test.c | 137 --------------------------------------------------------- configure.ac | 6 ++- 6 files changed, 6 insertions(+), 177 deletions(-) diff --git a/Makefile.am b/Makefile.am index c7f124b..c135cb7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,8 @@ AM_CFLAGS = $(WARN_CFLAGS) libbmm_la_LTLIBRARIES = libbmm.la libbmm_ladir = $(libdir) -libbmm_la_LDFLAGS = -avoid-version -no-undefined -shrext .so.@ABI_VERSION@ \ - -export-symbols-regex "bmm_*" +libbmm_la_LDFLAGS = -no-undefined -export-symbols-regex "bmm_*" \ + -version-info @ABI_VERSION@:@ABI_REVISION@:@ABI_AGE@ libbmm_la_SOURCES = bmm_lib.c bmm_lib_priv.h libbmm_laincludedir = $(includedir) diff --git a/bmm_lib.c b/bmm_lib.c index 433dbef..073b213 100644 --- a/bmm_lib.c +++ b/bmm_lib.c @@ -303,38 +303,6 @@ void bmm_flush_cache(void *vaddr, int dir) ioctl(bmm_fd, BMM_FLUSH_CACHE, &io); } -void *bmm_dma_memcpy(void *dest, const void *src, size_t n) -{ - int ret; - ioctl_arg_t io; - - if(bmm_init() < 0) - return 0; - - io.input = (unsigned long)src; - io.output = (unsigned long)dest; - io.length = (unsigned long)n; - io.arg = 0; - ret = ioctl(bmm_fd, BMM_DMA_MEMCPY, &io); - if(ret < 0) - return 0; - - return dest; -} - -void bmm_dma_sync() -{ - ioctl_arg_t io; - - if(bmm_init() < 0) - return; - - io.input = 0; - io.output = 0; - io.arg = 0; - ioctl(bmm_fd, BMM_DMA_SYNC, &io); -} - void bmm_flush_cache_range(void *start, size_t size, int direction) { ioctl_arg_t io; diff --git a/bmm_lib.h b/bmm_lib.h index 90c8893..6190088 100644 --- a/bmm_lib.h +++ b/bmm_lib.h @@ -54,8 +54,6 @@ unsigned long bmm_get_total_space(); unsigned long bmm_get_free_space(); unsigned long bmm_get_allocated_space(); void bmm_flush_cache(void *vaddr, int dir); -void *bmm_dma_memcpy(void *dest, const void *src, size_t n); /* Obsolete */ -void bmm_dma_sync(); /* Obsolete */ void bmm_flush_cache_range(void *start, size_t size, int direction); void bmm_flush_user(void *start, long size, int direction); void bmm_dump(); /* for debugging */ diff --git a/bmm_lib_priv.h b/bmm_lib_priv.h index ea71ffa..9b92681 100644 --- a/bmm_lib_priv.h +++ b/bmm_lib_priv.h @@ -35,8 +35,6 @@ typedef struct { #define BMM_GET_TOTAL_SPACE _IOWR(BMEM_IOCTL_MAGIC, 7, ioctl_arg_t) #define BMM_GET_FREE_SPACE _IOWR(BMEM_IOCTL_MAGIC, 8, ioctl_arg_t) #define BMM_FLUSH_CACHE _IOWR(BMEM_IOCTL_MAGIC, 9, ioctl_arg_t) -#define BMM_DMA_MEMCPY _IOWR(BMEM_IOCTL_MAGIC, 10, ioctl_arg_t) -#define BMM_DMA_SYNC _IOWR(BMEM_IOCTL_MAGIC, 11, ioctl_arg_t) #define BMM_CONSISTENT_SYNC _IOWR(BMEM_IOCTL_MAGIC, 12, ioctl_arg_t) #define BMM_DUMP _IOWR(BMEM_IOCTL_MAGIC, 13, ioctl_arg_t) #define BMM_GET_ALLOCATED_SPACE _IOWR(BMEM_IOCTL_MAGIC, 14, ioctl_arg_t) diff --git a/bmm_test.c b/bmm_test.c index 27b2dd1..34e4559 100644 --- a/bmm_test.c +++ b/bmm_test.c @@ -110,124 +110,6 @@ int test_bmm_malloc(unsigned long size, int attr) free_size1 != free_size3); } -int test_bmm_dma_memcpy(unsigned long size) -{ - char *src; - char *dst; - unsigned long i; - unsigned long free_size1; - unsigned long free_size2; - unsigned long free_size3; - int ret = 0; - - PRINT_TEST_NAME; - - free_size1 = bmm_get_free_space(); - src = bmm_malloc(size, BMM_ATTR_DEFAULT); - dst = bmm_malloc(size, BMM_ATTR_DEFAULT); - memset(src, 0, size); - memset(dst, 0, size); - free_size2 = bmm_get_free_space(); - if(src == NULL) { - printf("\tno enough memory\n"); - return -1; - } - if(dst == NULL) { - printf("\tno enough memory\n"); - bmm_free(src); - return -2; - } - for(i=0; i