Added boot process information to help someone find out what really happens.
[bootos.git] / stage2 / device.h
blob0cb31e86c514464fdb195945a634bcb7a1991b61
1 /* device.h - lv1 device functions
3 Copyright (C) 2010-2011 Hector Martin "marcan" <hector@marcansoft.com>
5 This code is licensed to you under the terms of the GNU GPL, version 2;
6 see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
7 */
9 #ifndef DEVICE_H
10 #define DEVICE_H
12 #include "types.h"
14 enum {
15 BUS_TYPE_SB = 4,
16 BUS_TYPE_STOR = 5,
19 enum {
20 DEV_TYPE_STOR_DISK = 0,
21 DEV_TYPE_ETH = 3,
22 DEV_TYPE_USB = 4,
23 DEV_TYPE_STOR_ROM = 5,
24 DEV_TYPE_SB_GPIO = 6,
25 DEV_TYPE_STOR_FLASH = 14,
28 int map_dma_mem(int bus_id, int dev_id, void *start, size_t len, u64 *bus_addr);
29 int unmap_dma_mem(int bus_id, int dev_id, u64 bus_addr, size_t len);
31 int find_device_by_type(int bustype, int type, int index, int *bus_id, int *dev_id, int *irq);
32 int close_all_devs(void);
34 #endif