]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ARM64: zynqmp: Add prog_reg to xil_io.h
authorMichal Simek <michal.simek@xilinx.com>
Tue, 12 Jul 2016 12:25:45 +0000 (14:25 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 15 Jul 2016 07:04:57 +0000 (09:04 +0200)
Vivado is not putting this function to psu_init.c
file that's why this function is missing is some versions.
Make this function as weak to make sure that compilation is fine.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/xil_io.h

index 57ca4adf11bf42adfbf6911f32de36d1045ec9e2..899b0ea5de588adcf6d3df0eef9c972877ac2d21 100644 (file)
@@ -32,4 +32,15 @@ int Xil_In32(unsigned long addr)
        return readl(addr);
 }
 
+__weak void prog_reg(unsigned long addr, unsigned long mask,
+                    unsigned long shift, unsigned long value)
+{
+       int rdata = 0;
+
+       rdata = Xil_In32(addr);
+       rdata = rdata & (~mask);
+       rdata = rdata | (value << shift);
+       Xil_Out32(addr,rdata);
+}
+
 #endif /* XIL_IO_H */