]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - api/api.c
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
[karo-tx-uboot.git] / api / api.c
index 1ee7c68f7afc64b74263e51c611e2604f91b291f..385a7e3cdc507ea302d4607a8ea75a35c552e07b 100644 (file)
--- a/api/api.c
+++ b/api/api.c
  */
 
 #include <config.h>
-
-#if defined(CONFIG_API)
-
 #include <command.h>
 #include <common.h>
 #include <malloc.h>
+#include <environment.h>
 #include <linux/types.h>
 #include <api_public.h>
 
@@ -40,8 +38,6 @@
 
 /* U-Boot routines needed */
 extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-extern uchar (*env_get_char)(int);
-extern uchar *env_get_addr(int);
 
 /*****************************************************************************
  *
@@ -535,7 +531,7 @@ static int API_env_enum(va_list ap)
 
                for (i = 0; env_get_char(i) != '\0'; i = n + 1) {
                        for (n = i; env_get_char(n) != '\0'; ++n) {
-                               if (n >= CFG_ENV_SIZE) {
+                               if (n >= CONFIG_ENV_SIZE) {
                                        /* XXX shouldn't we set *next = NULL?? */
                                        return 0;
                                }
@@ -666,5 +662,3 @@ void platform_set_mr(struct sys_info *si, unsigned long start, unsigned long siz
                        return;
                }
 }
-
-#endif /* CONFIG_API */