]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc8xx/cpu.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc8xx / cpu.c
index 5cbf9a688eda0c01d2980b0655509f924cc96778..1550045e6c79d3fcd1f1d77e52fa1b344eba8611 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000-2002
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
 #include <netdev.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
+#include <asm/io.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
-#include <libfdt_env.h>
 #include <fdt_support.h>
 #endif
 
@@ -78,7 +62,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
        if ((pvr >> 16) != 0x0050)
                return -1;
 
-       k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+       k = (immr << 16) |
+               immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)];
        m = 0;
        suf = "";
 
@@ -194,7 +179,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
        if ((pvr >> 16) != 0x0050)
                return -1;
 
-       k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+       k = (immr << 16) |
+               immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)];
        m = 0;
 
        switch (k) {
@@ -253,7 +239,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
        if ((pvr >> 16) != 0x0050)
                return -1;
 
-       k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+       k = (immr << 16) |
+               in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]);
        m = 0;
 
        switch (k) {
@@ -312,7 +299,8 @@ static int check_CPU (long clock, uint pvr, uint immr)
        if ((pvr >> 16) != 0x0050)
                return -1;
 
-       k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+       k = (immr << 16) |
+               immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)];
        m = 0;
 
        switch (k) {