]> Git Repo - J-u-boot.git/blobdiff - common/board_r.c
Merge patch series "Fix device removal order for Apple dart iommu"
[J-u-boot.git] / common / board_r.c
index e88b7ea4d8aa77c01c7498326db89946fbb06392..62228a723e12f8742437acae380e82f79903a8f5 100644 (file)
@@ -22,6 +22,7 @@
 #include <hang.h>
 #include <image.h>
 #include <irq_func.h>
+#include <lmb.h>
 #include <log.h>
 #include <net.h>
 #include <asm/cache.h>
@@ -31,6 +32,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <efi_loader.h>
 #include <env.h>
 #include <env_internal.h>
 #include <fdtdec.h>
@@ -39,6 +41,7 @@
 #include <initcall.h>
 #include <kgdb.h>
 #include <irq_func.h>
+#include <led.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <miiphy.h>
 #include <dm/ofnode.h>
 #include <linux/compiler.h>
 #include <linux/err.h>
-#include <efi_loader.h>
 #include <wdt.h>
 #include <asm-generic/gpio.h>
-#include <efi_loader.h>
 #include <relocate.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -202,8 +203,7 @@ static int initr_malloc(void)
         */
        start = gd->relocaddr - TOTAL_MALLOC_LEN;
        gd_set_malloc_start(start);
-       mem_malloc_init((ulong)map_sysmem(start, TOTAL_MALLOC_LEN),
-                       TOTAL_MALLOC_LEN);
+       mem_malloc_init(start, TOTAL_MALLOC_LEN);
        return 0;
 }
 
@@ -459,19 +459,30 @@ static int initr_malloc_bootparams(void)
 }
 #endif
 
-#if defined(CONFIG_LED_STATUS)
 static int initr_status_led(void)
 {
-#if defined(CONFIG_LED_STATUS_BOOT)
-       status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
-#else
        status_led_init();
-#endif
+
+       return 0;
+}
+
+static int initr_boot_led_blink(void)
+{
+       status_led_boot_blink();
+
+       led_boot_blink();
+
        return 0;
 }
-#endif
 
-#ifdef CONFIG_CMD_NET
+static int initr_boot_led_on(void)
+{
+       led_boot_on();
+
+       return 0;
+}
+
+#if defined(CONFIG_CMD_NET)
 static int initr_net(void)
 {
        puts("Net:   ");
@@ -510,6 +521,14 @@ int initr_mem(void)
 }
 #endif
 
+static int initr_lmb(void)
+{
+       if (CONFIG_IS_ENABLED(LMB))
+               return lmb_init();
+       else
+               return 0;
+}
+
 static int dm_announce(void)
 {
        int device_count;
@@ -612,6 +631,7 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_CLOCKS
        set_cpu_clk_info, /* Setup clock information */
 #endif
+       initr_lmb,
 #ifdef CONFIG_EFI_LOADER
        efi_memory_init,
 #endif
@@ -715,9 +735,8 @@ static init_fnc_t init_sequence_r[] = {
 #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_M68K)
        timer_init,             /* initialize timer */
 #endif
-#if defined(CONFIG_LED_STATUS)
        initr_status_led,
-#endif
+       initr_boot_led_blink,
        /* PPC has a udelay(20) here dating from 2002. Why? */
 #ifdef CONFIG_BOARD_LATE_INIT
        board_late_init,
@@ -728,7 +747,7 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_PCI_ENDPOINT
        pci_ep_init,
 #endif
-#ifdef CONFIG_CMD_NET
+#if defined(CONFIG_CMD_NET)
        INIT_FUNC_WATCHDOG_RESET
        initr_net,
 #endif
@@ -740,6 +759,7 @@ static init_fnc_t init_sequence_r[] = {
 #if defined(CFG_PRAM)
        initr_mem,
 #endif
+       initr_boot_led_on,
        run_main_loop,
 };
 
This page took 0.028911 seconds and 4 git commands to generate.