blob: e6caa7c850330dcf5dd335f7861403ae2c43479c [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>
Michal Simekf5727ec2016-07-14 11:13:04 +02008#include <common.h>
Simon Glassdbd79542020-05-10 11:40:11 -06009#include <linux/delay.h>
Michal Simek72536fd2015-11-20 13:17:22 +010010
11#define xil_printf(...)
12
Luca Ceresolibe285282019-05-24 15:40:01 +020013static void Xil_Out32(unsigned long addr, unsigned long val)
Michal Simek72536fd2015-11-20 13:17:22 +010014{
15 writel(val, addr);
16}
17
Luca Ceresolibe285282019-05-24 15:40:01 +020018static int Xil_In32(unsigned long addr)
Michal Simek72536fd2015-11-20 13:17:22 +010019{
20 return readl(addr);
21}
22
Luca Ceresolibe285282019-05-24 15:40:01 +020023static void __maybe_unused usleep(u32 sleep)
Michal Simekf5727ec2016-07-14 11:13:04 +020024{
25 udelay(sleep);
26}
Michal Simekf5727ec2016-07-14 11:13:04 +020027
Michal Simek72536fd2015-11-20 13:17:22 +010028#endif /* XIL_IO_H */