summaryrefslogblamecommitdiffstats
path: root/arch/sandbox/board/devices.c
blob: f7305a8ead8d07ed2fd205c0509140995abde42d (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                              
                       


                                           

















                                                                        
                                              




                                       
/*
 * 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_d *dev)
{
	list_add(&dev->list, &sandbox_device_list);

	return 0;
}

static int sandbox_device_init(void)
{
	struct device_d *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);