arm64: dts: rk3399: Sync v5.7-rc1 from Linux
[oweals/u-boot.git] / arch / arm / mach-davinci / misc.c
index 461ff778c28bf21a8798dd7f97286bedf8c2e35c..3e5185261c7611e753024d1203ef1afe4786c824 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Miscelaneous DaVinci functions.
  *
@@ -5,12 +6,12 @@
  * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  * Copyright (C) 2008 Lyrtech <www.lyrtech.com>
  * Copyright (C) 2004 Texas Instruments.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
@@ -68,7 +69,6 @@ err:
 /*
  * Set the mii mode as MII or RMII
  */
-#if defined(CONFIG_SOC_DA8XX)
 void davinci_emac_mii_mode_sel(int mode_sel)
 {
        int val;
@@ -80,7 +80,7 @@ void davinci_emac_mii_mode_sel(int mode_sel)
                val |= (1 << 8);
        writel(val, &davinci_syscfg_regs->cfgchip3);
 }
-#endif
+
 /*
  * If there is no MAC address in the environment, then it will be initialized
  * (silently) from the value in the EEPROM.
@@ -106,7 +106,6 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr)
 }
 #endif /* CONFIG_DRIVER_TI_EMAC */
 
-#if defined(CONFIG_SOC_DA8XX)
 void irq_init(void)
 {
        /*
@@ -135,4 +134,3 @@ int da8xx_configure_lpsc_items(const struct lpsc_resource *item,
 
        return 0;
 }
-#endif