u-boot/board/xilinx/zynqmp/xil_io.h
Luca Ceresoli 04d2b0c7c2 arm64: zynqmp: xil_io.h: declare functions as static
Fixes sparse warnings when building zynqmp defconfigs:
  ./board/xilinx/zynqmp/xil_io.h:12:6: warning: symbol 'Xil_Out32' was not declared. Should it be static?
  ./board/xilinx/zynqmp/xil_io.h:17:5: warning: symbol 'Xil_In32' was not declared. Should it be static?
  ./board/xilinx/zynqmp/xil_io.h:22:6: warning: symbol 'usleep' was not declared. Should it be static?

Also add __maybe_unused to usleep() since it is not used by minimized
psu_init_gpl.c files, so it would warn as "defined but not used".

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-30 10:20:06 +02:00

27 lines
461 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
#ifndef XIL_IO_H /* prevent circular inclusions */
#define XIL_IO_H
/* FIXME remove this when vivado is fixed */
#include <asm/io.h>
#include <common.h>
#define xil_printf(...)
static void Xil_Out32(unsigned long addr, unsigned long val)
{
writel(val, addr);
}
static int Xil_In32(unsigned long addr)
{
return readl(addr);
}
static void __maybe_unused usleep(u32 sleep)
{
udelay(sleep);
}
#endif /* XIL_IO_H */