blob: ecd24e9207219321e75a3abbf0178cc2ee0b7103 (
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
36
37
|
/*
* Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* Under GPLv2 only
*/
#include <common.h>
#include <driver.h>
#include <init.h>
#include <mach/linux.h>
#include <asm/io.h>
unsigned char __pci_iobase[IO_SPACE_LIMIT];
static LIST_HEAD(sandbox_device_list);
int sandbox_add_device(struct device *dev)
{
list_add(&dev->list, &sandbox_device_list);
return 0;
}
static int sandbox_device_init(void)
{
struct device *dev, *tmp;
list_for_each_entry_safe(dev, tmp, &sandbox_device_list, list) {
/* reset the list_head before registering for real */
dev->list.prev = NULL;
dev->list.next = NULL;
platform_device_register(dev);
}
return 0;
}
postcore_initcall(sandbox_device_init);
|