]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/common.h
ARM: implement relocation for ARM11
[karo-tx-uboot.git] / include / common.h
index 6a79ec2aad44ffb883cb0e31a5fadc2e2fff8d56..cc966722ead0332142fe457f107a9b431c024884 100644 (file)
@@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *);
 #define MIN(x, y)  min(x, y)
 #define MAX(x, y)  max(x, y)
 
+#if defined(CONFIG_ENV_IS_EMBEDDED)
+#define TOTAL_MALLOC_LEN       CONFIG_SYS_MALLOC_LEN
+#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
+       (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \
+      defined(CONFIG_ENV_IS_IN_NVRAM)
+#define        TOTAL_MALLOC_LEN        (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE)
+#else
+#define        TOTAL_MALLOC_LEN        CONFIG_SYS_MALLOC_LEN
+#endif
 
 /**
  * container_of - cast a member of a structure out to the containing structure
@@ -262,9 +271,6 @@ int saveenv      (void);
 int inline setenv   (char *, char *);
 #else
 int    setenv       (char *, char *);
-#ifdef CONFIG_HAS_UID
-void   forceenv     (char *, char *);
-#endif
 #endif /* CONFIG_PPC */
 #ifdef CONFIG_ARM
 # include <asm/mach-types.h>
@@ -631,6 +637,10 @@ static inline IPaddr_t getenv_IPaddr (char *var)
        return (string_to_ip(getenv(var)));
 }
 
+/* lib/qsort.c */
+void qsort(void *base, size_t nmemb, size_t size,
+          int(*compar)(const void *, const void *));
+
 /* lib/time.c */
 void   udelay        (unsigned long);