Merge tag 'video-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-video into...
[platform/kernel/u-boot.git] / board / freescale / b4860qds / b4860qds.c
index c2ceb80..cc8ff11 100644 (file)
@@ -1,16 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2011-2012 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
+#include <init.h>
+#include <irq_func.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
@@ -195,7 +201,7 @@ static int adjust_vdd(ulong vdd_override)
              vid, vdd_target/10);
 
        /* check override variable for overriding VDD */
-       vdd_string = getenv("b4qds_vdd_mv");
+       vdd_string = env_get("b4qds_vdd_mv");
        if (vdd_override == 0 && vdd_string &&
            !strict_strtoul(vdd_string, 10, &vdd_string_override))
                vdd_override = vdd_string_override;
@@ -437,7 +443,7 @@ int configure_vsc3316_3308(void)
                }
                break;
 
-#ifdef CONFIG_PPC_B4420
+#ifdef CONFIG_ARCH_B4420
        case 0x17:
        case 0x18:
                        /*
@@ -496,7 +502,7 @@ int configure_vsc3316_3308(void)
        /* Configure VSC3308 crossbar switch */
        ret = select_i2c_ch_pca(I2C_CH_VSC3308);
        switch (serdes2_prtcl) {
-#ifdef CONFIG_PPC_B4420
+#ifdef CONFIG_ARCH_B4420
        case 0x9d:
 #endif
        case 0x9E:
@@ -542,7 +548,7 @@ int configure_vsc3316_3308(void)
                         * Extract hwconfig from environment since environment
                         * is not setup properly yet
                         */
-                       getenv_f("hwconfig", buffer, sizeof(buffer));
+                       env_get_f("hwconfig", buffer, sizeof(buffer));
                        buf = buffer;
 
                        if (hwconfig_subarg_cmp_f("fsl_b4860_serdes2",
@@ -929,7 +935,7 @@ int config_serdes2_refclks(void)
         * For this SerDes2's Refclk1 need to be set to 100MHz
         */
        switch (serdes2_prtcl) {
-#ifdef CONFIG_PPC_B4420
+#ifdef CONFIG_ARCH_B4420
        case 0x9d:
 #endif
        case 0x9E:
@@ -1197,8 +1203,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
        ft_cpu_setup(blob, bd);
 
-       base = getenv_bootm_low();
-       size = getenv_bootm_size();
+       base = env_get_bootm_low();
+       size = env_get_bootm_size();
 
        fdt_fixup_memory(blob, (u64)base, (u64)size);
 
@@ -1213,7 +1219,9 @@ int ft_board_setup(void *blob, bd_t *bd)
 #endif
 
 #ifdef CONFIG_SYS_DPAA_FMAN
+#ifndef CONFIG_DM_ETH
        fdt_fixup_fman_ethernet(blob);
+#endif
        fdt_fixup_board_enet(blob);
 #endif