common: Drop net.h from common header
[platform/kernel/u-boot.git] / arch / powerpc / cpu / mpc85xx / cpu_init.c
index ea46e49..1c2d8ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2007-2011 Freescale Semiconductor, Inc.
  *
@@ -6,11 +7,12 @@
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <env.h>
+#include <init.h>
+#include <net.h>
 #include <watchdog.h>
 #include <asm/processor.h>
 #include <ioports.h>
@@ -26,6 +28,7 @@
 #ifdef CONFIG_FSL_CORENET
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
+#include <fsl_qbman.h>
 #endif
 #include <fsl_usb.h>
 #include <hwconfig.h>
@@ -37,7 +40,7 @@
 #ifdef CONFIG_FSL_CAAM
 #include <fsl_sec.h>
 #endif
-#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_FSL_CORENET)
+#if defined(CONFIG_NXP_ESBC) && defined(CONFIG_FSL_CORENET)
 #include <asm/fsl_pamu.h>
 #include <fsl_secboot_err.h>
 #endif
@@ -53,8 +56,6 @@
 #include <fsl_qe.h>
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
 /*
  * For deriving usb clock from 100MHz sysclk, reference divisor is set
@@ -441,7 +442,7 @@ ulong cpu_init_f(void)
 #ifdef CONFIG_SYS_DCSRBAR_PHYS
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 #endif
-#if defined(CONFIG_SECURE_BOOT) && !defined(CONFIG_SYS_RAMBOOT)
+#if defined(CONFIG_NXP_ESBC) && !defined(CONFIG_SYS_RAMBOOT)
        struct law_entry law;
 #endif
 #ifdef CONFIG_ARCH_MPC8548
@@ -461,7 +462,7 @@ ulong cpu_init_f(void)
        disable_tlb(14);
        disable_tlb(15);
 
-#if defined(CONFIG_SECURE_BOOT) && !defined(CONFIG_SYS_RAMBOOT)
+#if defined(CONFIG_NXP_ESBC) && !defined(CONFIG_SYS_RAMBOOT)
        /* Disable the LAW created for NOR flash by the PBI commands */
        law = find_law(CONFIG_SYS_PBI_FLASH_BASE);
        if (law.index != -1)
@@ -804,7 +805,7 @@ int cpu_init_r(void)
 #ifdef CONFIG_FSL_CORENET
        set_liodns();
 #ifdef CONFIG_SYS_DPAA_QBMAN
-       setup_portals();
+       setup_qbman_portals();
 #endif
 #endif
 
@@ -964,7 +965,7 @@ int cpu_init_r(void)
        fman_enet_init();
 #endif
 
-#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_FSL_CORENET)
+#if defined(CONFIG_NXP_ESBC) && defined(CONFIG_FSL_CORENET)
        if (pamu_init() < 0)
                fsl_secboot_handle_error(ERROR_ESBC_PAMU_INIT);
 #endif
@@ -1024,16 +1025,6 @@ void arch_preboot_os(void)
        mtmsr(msr);
 }
 
-#if defined(CONFIG_SATA) && defined(CONFIG_FSL_SATA)
-int sata_initialize(void)
-{
-       if (is_serdes_configured(SATA1) || is_serdes_configured(SATA2))
-               return __sata_initialize();
-
-       return 1;
-}
-#endif
-
 void cpu_secondary_init_r(void)
 {
 #ifdef CONFIG_U_QE