]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libvbus/include/vbus_types.h
0902e343215489474c46aaf78b4eb6db43efe95b
[l4.git] / l4 / pkg / libvbus / include / vbus_types.h
1 /*
2  * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3  *          Alexander Warg <warg@os.inf.tu-dresden.de>
4  *     economic rights: Technische Universität Dresden (Germany)
5  *
6  * This file is part of TUD:OS and distributed under the terms of the
7  * GNU General Public License 2.
8  * Please see the COPYING-GPL-2 file for details.
9  */
10 #pragma once
11
12 #include <l4/sys/types.h>
13
14 typedef l4_mword_t l4vbus_device_handle_t;
15 typedef l4_addr_t l4vbus_paddr_t;
16
17 typedef struct {
18   l4_uint16_t    type;            /**< resource type */
19   l4_uint16_t    flags;
20   l4vbus_paddr_t start;           /**< start of res. range */
21   l4vbus_paddr_t end;             /**< (inclusive) end of res. range */
22 } l4vbus_resource_t;
23
24 enum l4vbus_resource_type_t {
25   L4VBUS_RESOURCE_INVALID = 0, /**< Invalid type */
26   L4VBUS_RESOURCE_IRQ,         /**< Interrupt resource */
27   L4VBUS_RESOURCE_MEM,         /**< I/O memory resource */
28   L4VBUS_RESOURCE_PORT,        /**< I/O port resource (x86 only) */
29   L4VBUS_RESOURCE_MAX,         /**< Maximum resource id */
30 };
31
32 enum {
33   L4VBUS_DEV_NAME_LEN = 64,
34   L4VBUS_MAX_DEPTH = 100,
35 };
36
37 typedef struct {
38   int           type;                      /**< type */
39   char          name[L4VBUS_DEV_NAME_LEN]; /**< name */
40   unsigned      num_resources;             /**< resources count */
41   unsigned      flags;
42 } l4vbus_device_t;
43
44 enum
45 {
46   L4VBUS_DEVICE_F_CHILDREN = 0x10,
47 };