summaryrefslogtreecommitdiffstats
path: root/lib/global.c
blob: 2d7544b8fd91b197e017f668cac926978f296538 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <common.h>
#include <command.h>
#include <init.h>
#include <driver.h>
#include <malloc.h>
#include <errno.h>

static struct device_d global_dev;

int global_add_param(struct param_d *param)
{
        return dev_add_param(&global_dev, param);
}

static struct device_d global_dev = {
        .name  = "global",
	.id    = "env",
        .map_base = 0,
        .size   = 0,
};

static struct driver_d global_driver = {
        .name  = "global",
        .probe = dummy_probe,
};

static int global_init(void)
{
	register_device(&global_dev);
        register_driver(&global_driver);
        return 0;
}

coredevice_initcall(global_init);