]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: zynq: Add support for EMIT_WRITE operation
authorMichal Simek <michal.simek@xilinx.com>
Fri, 10 Nov 2017 10:03:47 +0000 (11:03 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 29 Nov 2017 07:02:39 +0000 (08:02 +0100)
Add proper support for EMIT_WRITE operation which is write only.
Do not use EMIT_MASKWRITE which is read-modify-write.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/include/mach/ps7_init_gpl.h
arch/arm/mach-zynq/ps7_spl_init.c

index fa5d486afb0c92dfc78118690ca97c59c208ed70..0af4165a3ef1c17fa150d781f114bf9e48bc6fec 100644 (file)
@@ -13,6 +13,7 @@
 #define OPCODE_MASKWRITE       0U
 #define OPCODE_MASKPOLL                1U
 #define OPCODE_MASKDELAY       2U
+#define OPCODE_WRITE           3U
 #define OPCODE_ADDRESS_MASK    (~3U)
 
 /* Sentinel */
@@ -21,6 +22,7 @@
 #define EMIT_MASKWRITE(addr, mask, val)        OPCODE_MASKWRITE | addr, mask, val
 #define EMIT_MASKPOLL(addr, mask)      OPCODE_MASKPOLL | addr, mask
 #define EMIT_MASKDELAY(addr, mask)     OPCODE_MASKDELAY | addr, mask
+#define EMIT_WRITE(addr, val)          OPCODE_WRITE | addr, val
 
 /* Returns codes of ps7_init* */
 #define PS7_INIT_SUCCESS               (0)
index 069827880d102fc66620e0cbe83ff23c85a38005..6dc4e0364d8b25f38dfb7ba3097d80e50e542233 100644 (file)
@@ -108,6 +108,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];