]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dde/ddekit/src/resources.c
Some minor fixes.
[l4.git] / l4 / pkg / dde / ddekit / src / resources.c
1 /*
2  * This file is part of DDEKit.
3  *
4  * (c) 2006-2012 Bjoern Doebel <doebel@os.inf.tu-dresden.de>
5  *               Christian Helmuth <ch12@os.inf.tu-dresden.de>
6  *               Thomas Friebel <tf13@os.inf.tu-dresden.de>
7  *     economic rights: Technische Universitaet Dresden (Germany)
8  *
9  * This file is part of TUD:OS and distributed under the terms of the
10  * GNU General Public License 2.
11  * Please see the COPYING-GPL-2 file for details.
12  */
13
14 #include <l4/dde/ddekit/resources.h>
15
16 #include <l4/io/io.h>
17
18 #include "config.h"
19
20 int ddekit_request_dma(int nr __attribute__((unused))) {
21         return -1;
22 }
23
24 int ddekit_release_dma(int nr __attribute__((unused))) {
25         return -1;
26 }
27
28 /** Request an IO region
29  *
30  * \return 0    success
31  * \return -1   error
32  */
33 int ddekit_request_io(ddekit_addr_t start, ddekit_addr_t count) {
34         return l4io_request_ioport(start, count);
35 }
36
37 /** Release an IO region.
38  *
39  * \return 0    success
40  * \return <0   error
41  */
42 int ddekit_release_io(ddekit_addr_t start, ddekit_addr_t count) {
43         return l4io_release_ioport(start, count);
44 }
45
46 /** Request a memory region.
47  *
48  * \return vaddr virtual address of memory region
49  * \return 0     success
50  * \return -1    error
51  */
52 int ddekit_request_mem(ddekit_addr_t start, ddekit_addr_t count, ddekit_addr_t *vaddr) {
53
54         return l4io_request_iomem(start, count, 0, vaddr);
55 }
56
57 /** Release memory region.
58  *
59  * \return 0 success
60  * \return <0 error
61  */
62 int ddekit_release_mem(ddekit_addr_t start, ddekit_addr_t count) {
63         return l4io_release_iomem(start, count);
64 }