]> git.sur5r.net Git - u-boot/blobdiff - api_examples/glue.h
MPC512x: add support for ARIA board
[u-boot] / api_examples / glue.h
index a82f783cbe08163566dfa7803ad81b7f7c1be76b..6bf47d07c8f5484dffee1ed7e4d8b790d310807a 100644 (file)
 #ifndef _API_GLUE_H_
 #define _API_GLUE_H_
 
-#define API_SEARCH_START       (255 * 1024 * 1024)     /* start at 1MB below top RAM */
-#define API_SEARCH_END         (256 * 1024 * 1024 - 1) /* ...and search to the end */
+#define API_SEARCH_LEN         (3 * 1024 * 1024)       /* 3MB search range */
 
-int    syscall(int, int *, ...);
-void * syscall_ptr;
+#define UB_MAX_MR      5       /* max mem regions number */
+#define UB_MAX_DEV     6       /* max devices number */
+
+extern void *syscall_ptr;
+extern uint32_t search_hint;
 
+int    syscall(int, int *, ...);
 int    api_search_sig(struct api_signature **sig);
 
 /*
- * ub_ library calls are part of the application, not U-Boot code!  They are
- * front-end wrappers that are used by the consumer application: they prepare
- * arguments for particular syscall and jump to the low level syscall()
+ * The ub_ library calls are part of the application, not U-Boot code!  They
+ * are front-end wrappers that are used by the consumer application: they
+ * prepare arguments for particular syscall and jump to the low level
+ * syscall()
  */
 
 /* console */
@@ -67,10 +71,10 @@ const char *        ub_env_enum(const char *last);
 int                    ub_dev_enum(void);
 int                    ub_dev_open(int handle);
 int                    ub_dev_close(int handle);
-int                    ub_dev_read(int handle, void *buf,
-                               lbasize_t len, lbastart_t start);
+int                    ub_dev_read(int handle, void *buf, lbasize_t len,
+                               lbastart_t start, lbasize_t *rlen);
 int                    ub_dev_send(int handle, void *buf, int len);
-int                    ub_dev_recv(int handle, void *buf, int len);
+int                    ub_dev_recv(int handle, void *buf, int len, int *rlen);
 struct device_info *   ub_dev_get(int);
 
 #endif /* _API_GLUE_H_ */