blob: dd823d6f62a5fd0146b89141924c0bd15b1d6b84 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michal Simek72536fd2015-11-20 13:17:22 +01002
3#ifndef XIL_IO_H /* prevent circular inclusions */
4#define XIL_IO_H
5
6/* FIXME remove this when vivado is fixed */
7#include <asm/io.h>
Simon Glassdbd79542020-05-10 11:40:11 -06008#include <linux/delay.h>
Michal Simek72536fd2015-11-20 13:17:22 +01009
10#define xil_printf(...)
11
Luca Ceresolibe285282019-05-24 15:40:01 +020012static void Xil_Out32(unsigned long addr, unsigned long val)
Michal Simek72536fd2015-11-20 13:17:22 +010013{
14 writel(val, addr);
15}
16
Luca Ceresolibe285282019-05-24 15:40:01 +020017static int Xil_In32(unsigned long addr)
Michal Simek72536fd2015-11-20 13:17:22 +010018{
19 return readl(addr);
20}
21
Luca Ceresolibe285282019-05-24 15:40:01 +020022static void __maybe_unused usleep(u32 sleep)
Michal Simekf5727ec2016-07-14 11:13:04 +020023{
24 udelay(sleep);
25}
Michal Simekf5727ec2016-07-14 11:13:04 +020026
Michal Simek72536fd2015-11-20 13:17:22 +010027#endif /* XIL_IO_H */