]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/lib/bootm.c
env: Rename some other getenv()-related functions
[u-boot] / arch / powerpc / lib / bootm.c
index 41fc8f7ff7a355ec3a2cbbd548e63022324489d0..b9ae24dc98b6bc334060fe429586d33eeb5c0678 100644 (file)
@@ -18,6 +18,8 @@
 #include <environment.h>
 #include <asm/byteorder.h>
 #include <asm/mp.h>
+#include <bootm.h>
+#include <vxworks.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
@@ -30,7 +32,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern ulong get_effective_memsize(void);
 static ulong get_sp (void);
 extern void ft_fixup_num_cores(void *blob);
 static void set_clocks_in_mhz (bd_t *kbd);
@@ -39,6 +40,11 @@ static void set_clocks_in_mhz (bd_t *kbd);
 #define CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE       (768*1024*1024)
 #endif
 
+int arch_fixup_fdt(void *blob)
+{
+       return 0;
+}
+
 static void boot_jump_linux(bootm_headers_t *images)
 {
        void    (*kernel)(bd_t *, ulong r4, ulong r5, ulong r6,
@@ -54,6 +60,13 @@ static void boot_jump_linux(bootm_headers_t *images)
 
        bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
+#ifdef CONFIG_BOOTSTAGE_FDT
+       bootstage_fdt_add_report();
+#endif
+#ifdef CONFIG_BOOTSTAGE_REPORT
+       bootstage_report();
+#endif
+
 #if defined(CONFIG_SYS_INIT_RAM_LOCK) && !defined(CONFIG_E500)
        unlock_ram_in_cache();
 #endif
@@ -73,7 +86,7 @@ static void boot_jump_linux(bootm_headers_t *images)
                debug ("   Booting using OF flat tree...\n");
                WATCHDOG_RESET ();
                (*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
-                          getenv_bootm_mapsize(), 0, 0);
+                          env_get_bootm_mapsize(), 0, 0);
                /* does not return */
        } else
 #endif
@@ -108,8 +121,8 @@ void arch_lmb_reserve(struct lmb *lmb)
        phys_size_t bootm_size;
        ulong size, sp, bootmap_base;
 
-       bootmap_base = getenv_bootm_low();
-       bootm_size = getenv_bootm_size();
+       bootmap_base = env_get_bootm_low();
+       bootm_size = env_get_bootm_size();
 
 #ifdef DEBUG
        if (((u64)bootmap_base + bootm_size) >
@@ -120,7 +133,7 @@ void arch_lmb_reserve(struct lmb *lmb)
 #endif
 
        size = min(bootm_size, get_effective_memsize());
-       size = min(size, CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE);
+       size = min(size, (ulong)CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE);
 
        if (size < bootm_size) {
                ulong base = bootmap_base + size;
@@ -262,7 +275,8 @@ static void set_clocks_in_mhz (bd_t *kbd)
 {
        char    *s;
 
-       if ((s = getenv ("clocks_in_mhz")) != NULL) {
+       s = env_get("clocks_in_mhz");
+       if (s) {
                /* convert all clock information to MHz */
                kbd->bi_intfreq /= 1000000L;
                kbd->bi_busfreq /= 1000000L;
@@ -272,10 +286,6 @@ static void set_clocks_in_mhz (bd_t *kbd)
                kbd->bi_sccfreq /= 1000000L;
                kbd->bi_vco     /= 1000000L;
 #endif
-#if defined(CONFIG_MPC5xxx)
-               kbd->bi_ipbfreq /= 1000000L;
-               kbd->bi_pcifreq /= 1000000L;
-#endif /* CONFIG_MPC5xxx */
        }
 }
 
@@ -330,6 +340,6 @@ void boot_jump_vxworks(bootm_headers_t *images)
 
        ((void (*)(void *, ulong, ulong, ulong,
                ulong, ulong, ulong))images->ep)(images->ft_addr,
-               0, 0, EPAPR_MAGIC, getenv_bootm_mapsize(), 0, 0);
+               0, 0, EPAPR_MAGIC, env_get_bootm_mapsize(), 0, 0);
 }
 #endif