mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-27 20:38:52 +09:00
![Luca Ceresoli](/assets/img/avatar_default.png)
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>
28 lines
461 B
C
28 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 */
|