board: stm32mp1: enable simple framebuffer node for splashscreen
[platform/kernel/u-boot.git] / board / st / stm32mp1 / stm32mp1.c
index 032f08d..45f2ca8 100644 (file)
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
+#include <fdt_simplefb.h>
 #include <fdt_support.h>
 #include <g_dnl.h>
 #include <generic-phy.h>
@@ -37,6 +38,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
+#include <dm/ofnode.h>
 #include <jffs2/load_kernel.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
@@ -235,10 +237,10 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 
 static int get_led(struct udevice **dev, char *led_string)
 {
-       char *led_name;
+       const char *led_name;
        int ret;
 
-       led_name = fdtdec_get_config_string(gd->fdt_blob, led_string);
+       led_name = ofnode_conf_read_str(led_string);
        if (!led_name) {
                log_debug("could not find %s config string\n", led_string);
                return -ENOENT;
@@ -646,12 +648,6 @@ static void board_ev1_init(void)
 /* board dependent setup after realloc */
 int board_init(void)
 {
-       /* address of boot parameters */
-       gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
-
-       if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
-               gpio_hog_probe_all();
-
        board_key_check();
 
        if (board_is_ev1())
@@ -663,7 +659,11 @@ int board_init(void)
        if (IS_ENABLED(CONFIG_DM_REGULATOR))
                regulators_enable_boot_on(_DEBUG);
 
-       if (!IS_ENABLED(CONFIG_TFABOOT))
+       /*
+        * sysconf initialisation done only when U-Boot is running in secure
+        * done in TF-A for TFABOOT.
+        */
+       if (IS_ENABLED(CONFIG_ARMV7_NONSEC))
                sysconf_init();
 
        if (CONFIG_IS_ENABLED(LED))
@@ -915,6 +915,9 @@ int ft_board_setup(void *blob, struct bd_info *bd)
                if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
                        fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
 
+       if (CONFIG_IS_ENABLED(FDT_SIMPLEFB))
+               fdt_simplefb_enable_and_mem_rsv(blob);
+
        return 0;
 }
 #endif