]> git.sur5r.net Git - u-boot/blobdiff - arch/m68k/cpu/mcf52x2/cpu.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / m68k / cpu / mcf52x2 / cpu.c
index 7c6100c5287763c7dfb1c9545f5d69bf19ba3ed8..29a17c57fcea0f382415eb3cc7f2023cc6becec5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2003
  * Josef Baumgartner <josef.baumgartner@telex.de>
  * Copyright (C) 2008 Arthur Shipkowski (art@videon-central.com)
  *
  * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
  */
 
 #include <common.h>
@@ -53,7 +36,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return 0;
 };
 
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        char buf1[32], buf2[32];
 
@@ -63,6 +47,7 @@ int checkcpu(void)
               strmhz(buf2, gd->bus_clk));
        return 0;
 };
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 #if defined(CONFIG_WATCHDOG)
 /* Called by macro WATCHDOG_RESET */
@@ -110,12 +95,13 @@ int watchdog_init(void)
 #endif                         /* #ifdef CONFIG_M5208 */
 
 #ifdef  CONFIG_M5271
+#if defined(CONFIG_DISPLAY_CPUINFO)
 /*
  * Both MCF5270 and MCF5271 are members of the MPC5271 family. Try to
  * determine which one we are running on, based on the Chip Identification
  * Register (CIR).
  */
-int checkcpu(void)
+int print_cpuinfo(void)
 {
        char buf[32];
        unsigned short cir;     /* Chip Identification Register */
@@ -149,6 +135,7 @@ int checkcpu(void)
 
        return 0;
 }
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -200,7 +187,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return 0;
 };
 
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        sysctrl_t *sysctrl = (sysctrl_t *) (MMAP_CFG);
        uchar msk;
@@ -225,6 +213,7 @@ int checkcpu(void)
                printf("Freescale MCF5272 %s\n", suf);
        return 0;
 };
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 #if defined(CONFIG_WATCHDOG)
 /* Called by macro WATCHDOG_RESET */
@@ -284,7 +273,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return 0;
 };
 
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        char buf[32];
 
@@ -292,7 +282,7 @@ int checkcpu(void)
                        strmhz(buf, CONFIG_SYS_CLK));
        return 0;
 };
-
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 #if defined(CONFIG_WATCHDOG)
 /* Called by macro WATCHDOG_RESET */
@@ -342,7 +332,8 @@ int watchdog_init(void)
 #endif                         /* #ifdef CONFIG_M5275 */
 
 #ifdef CONFIG_M5282
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        unsigned char resetsource = MCFRESET_RSR;
 
@@ -358,6 +349,7 @@ int checkcpu(void)
               (resetsource & MCFRESET_RSR_LVD) ? " Low Voltage" : "");
        return 0;
 }
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -367,7 +359,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
 #ifdef CONFIG_M5249
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        char buf[32];
 
@@ -375,6 +368,7 @@ int checkcpu(void)
               strmhz(buf, CONFIG_SYS_CLK));
        return 0;
 }
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
@@ -388,7 +382,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
 #ifdef CONFIG_M5253
-int checkcpu(void)
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
 {
        char buf[32];
 
@@ -405,6 +400,7 @@ int checkcpu(void)
        }
        return 0;
 }
+#endif /* CONFIG_DISPLAY_CPUINFO */
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {