4 #define API_EINVAL 1 /* invalid argument(s) */
5 #define API_ENODEV 2 /* no device */
6 #define API_ENOMEM 3 /* no memory */
7 #define API_EBUSY 4 /* busy, occupied etc. */
8 #define API_EIO 5 /* I/O error */
10 typedef int (*scp_t)(int, int *, ...);
12 #define API_SIG_VERSION 1
13 #define API_SIG_MAGIC "UBootAPI"
14 #define API_SIG_MAGLEN 8
16 struct api_signature {
17 char magic[API_SIG_MAGLEN]; /* magic string */
18 uint16_t version; /* API version */
19 uint32_t checksum; /* checksum of this sig struct */
20 scp_t syscall; /* entry point to the API */
44 #define MR_ATTR_FLASH 0x0001
45 #define MR_ATTR_DRAM 0x0002
46 #define MR_ATTR_SRAM 0x0003
55 unsigned long clk_bus;
56 unsigned long clk_cpu;
58 struct mem_region *mr;
59 int mr_no; /* number of memory regions */
64 typedef u_int64_t lbasize_t;
66 typedef unsigned long lbasize_t;
68 typedef unsigned long lbastart_t;
70 #define DEV_TYP_NONE 0x0000
71 #define DEV_TYP_NET 0x0001
73 #define DEV_TYP_STOR 0x0002
74 #define DT_STOR_IDE 0x0010
75 #define DT_STOR_SCSI 0x0020
76 #define DT_STOR_USB 0x0040
77 #define DT_STOR_MMC 0x0080
79 #define DEV_STA_CLOSED 0x0000 /* invalid, closed */
80 #define DEV_STA_OPEN 0x0001 /* open i.e. active */
88 lbasize_t block_count; /* no of blocks */
89 unsigned long block_size; /* size of one block */
93 unsigned char hwaddr[6];
96 #define di_stor info.storage
97 #define di_net info.net
102 #endif /* _API_PUBLIC_H_ */