diff options
author | Zheng Da <zhengda1936@gmail.com> | 2009-12-03 14:20:42 +0100 |
---|---|---|
committer | Zheng Da <zhengda1936@gmail.com> | 2009-12-03 14:20:42 +0100 |
commit | 0441d40c8f86487734d89d08f9f2023a64410489 (patch) | |
tree | 7d603d30bc4e19716fc47ea417b02ae4b69a9be2 /libddekit | |
parent | d33a9a7e6a46543156a8f07b8e684b171c2ba456 (diff) |
Modify resource.c.
Diffstat (limited to 'libddekit')
-rw-r--r-- | libddekit/include/ddekit/resources.h | 2 | ||||
-rw-r--r-- | libddekit/resources.c | 20 |
2 files changed, 17 insertions, 5 deletions
diff --git a/libddekit/include/ddekit/resources.h b/libddekit/include/ddekit/resources.h index e0fa68f0..dfbb1322 100644 --- a/libddekit/include/ddekit/resources.h +++ b/libddekit/include/ddekit/resources.h @@ -1,7 +1,7 @@ #ifndef _ddekit_resources_h #define _ddekit_resources_h -#include <l4/dde/ddekit/types.h> +#include "ddekit/types.h" int ddekit_request_dma(int nr); int ddekit_release_dma(int nr); diff --git a/libddekit/resources.c b/libddekit/resources.c index d4d421c4..4bbd2db9 100644 --- a/libddekit/resources.c +++ b/libddekit/resources.c @@ -1,15 +1,21 @@ -#include <l4/dde/ddekit/resources.h> +#include <sys/io.h> -#include <l4/generic_io/libio.h> +#include "ddekit/resources.h" #include "config.h" int ddekit_request_dma(int nr) { +#if 0 return l4io_request_dma(nr); +#endif + return -1; } int ddekit_release_dma(int nr) { +#if 0 return l4io_release_dma(nr); +#endif + return -1; } /** Request an IO region @@ -18,7 +24,7 @@ int ddekit_release_dma(int nr) { * \return -1 error */ int ddekit_request_io(ddekit_addr_t start, ddekit_addr_t count) { - return l4io_request_region(start, count); + return ioperm (start, count, 1); } /** Release an IO region. @@ -27,7 +33,7 @@ int ddekit_request_io(ddekit_addr_t start, ddekit_addr_t count) { * \return <0 error */ int ddekit_release_io(ddekit_addr_t start, ddekit_addr_t count) { - return l4io_release_region(start, count); + return ioperm (start, count, 0); } /** Request a memory region. @@ -37,6 +43,7 @@ int ddekit_release_io(ddekit_addr_t start, ddekit_addr_t count) { * \return -1 error */ int ddekit_request_mem(ddekit_addr_t start, ddekit_addr_t count, ddekit_addr_t *vaddr) { +#if 0 ddekit_addr_t v; v = l4io_request_mem_region(start, count, 0); @@ -45,6 +52,8 @@ int ddekit_request_mem(ddekit_addr_t start, ddekit_addr_t count, ddekit_addr_t * return 0; } else return -1; +#endif + return -1; } /** Release memory region. @@ -53,5 +62,8 @@ int ddekit_request_mem(ddekit_addr_t start, ddekit_addr_t count, ddekit_addr_t * * \return <0 error */ int ddekit_release_mem(ddekit_addr_t start, ddekit_addr_t count) { +#if 0 return l4io_release_mem_region(start, count); +#endif + return -1; } |