]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-zynq/ps7_spl_init.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / mach-zynq / ps7_spl_init.c
index 180099577b04337bf970fc3683febcf444b575c6..4c38724d4d7cf9a26344de73cfa3e6e908f60412 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (c) Copyright 2010-2017 Xilinx, Inc. All rights reserved.
  * (c) Copyright 2016 Topic Embedded Products.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <asm/io.h>
 #include <asm/spl.h>
+#include <asm/arch/sys_proto.h>
 #include <asm/arch/ps7_init_gpl.h>
 
 __weak int ps7_init(void)
@@ -57,7 +57,7 @@ static void perf_start_clock(void)
 }
 
 /* Compute mask for given delay in miliseconds*/
-static int get_number_of_cycles_for_delay(unsigned int delay)
+static unsigned long get_number_of_cycles_for_delay(unsigned long delay)
 {
        return (APU_FREQ / (2 * 1000)) * delay;
 }
@@ -91,7 +91,7 @@ int __weak ps7_config(unsigned long *ps7_config_init)
        unsigned long mask;
        unsigned int numargs;
        int i;
-       int delay;
+       unsigned long delay;
 
        for (;;) {
                opcode = ptr[0];
@@ -107,6 +107,12 @@ int __weak ps7_config(unsigned long *ps7_config_init)
                        iowrite((ioread(addr) & ~mask) | (val & mask), addr);
                        break;
 
+               case OPCODE_WRITE:
+                       numargs = 2;
+                       val = ptr[1];
+                       iowrite(val, addr);
+                       break;
+
                case OPCODE_MASKPOLL:
                        numargs = 2;
                        mask = ptr[1];
@@ -134,3 +140,8 @@ int __weak ps7_config(unsigned long *ps7_config_init)
                ptr += numargs;
        }
 }
+
+unsigned long __weak __maybe_unused ps7GetSiliconVersion(void)
+{
+       return zynq_get_silicon_version();
+}