powerpc: mpc83xx: fdt: Use get_serial_clock()
[oweals/u-boot.git] / arch / powerpc / cpu / mpc83xx / fdt.c
index 450a9704e5be684e1c07cc802fbdf4b085b16957..b487e31cc0f75fe9deff81da11d792763efbe370 100644 (file)
@@ -1,14 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2007 Freescale Semiconductor, Inc.
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
 
@@ -17,8 +16,8 @@ extern void ft_qe_setup(void *blob);
 DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(CONFIG_BOOTCOUNT_LIMIT) && \
-       (defined(CONFIG_QE) && !defined(CONFIG_MPC831x))
-#include <asm/immap_qe.h>
+       (defined(CONFIG_QE) && !defined(CONFIG_ARCH_MPC831X))
+#include <linux/immap_qe.h>
 
 void fdt_fixup_muram (void *blob)
 {
@@ -53,8 +52,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
     defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) ||\
     defined(CONFIG_HAS_ETH4) || defined(CONFIG_HAS_ETH5)
-       fdt_fixup_ethernet(blob);
-#ifdef CONFIG_MPC8313
+#ifdef CONFIG_ARCH_MPC8313
        /*
        * mpc8313e erratum IPIC1 swapped TSEC interrupt ID numbers on rev. 1
        * h/w (see AN3545).  The base device tree in use has rev. 1 ID numbers,
@@ -118,14 +116,14 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #endif
 
 #ifdef CONFIG_SYS_NS16550
-       do_fixup_by_compat_u32(blob, "ns16550",
-               "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
+        do_fixup_by_compat_u32(blob, "ns16550",
+                "clock-frequency", get_serial_clock(), 1);
 #endif
 
        fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
 
 #if defined(CONFIG_BOOTCOUNT_LIMIT) && \
-       (defined(CONFIG_QE) && !defined(CONFIG_MPC831x))
+       (defined(CONFIG_QE) && !defined(CONFIG_ARCH_MPC831X))
        fdt_fixup_muram (blob);
 #endif
 }