From: Michal Simek Date: Tue, 12 Jul 2016 12:25:45 +0000 (+0200) Subject: ARM64: zynqmp: Add prog_reg to xil_io.h X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcc68028371738247b197c3d73b255cb311a90ec;p=thirdparty%2Fu-boot.git ARM64: zynqmp: Add prog_reg to xil_io.h 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 --- diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h index 57ca4adf11b..899b0ea5de5 100644 --- a/board/xilinx/zynqmp/xil_io.h +++ b/board/xilinx/zynqmp/xil_io.h @@ -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 */