Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 2 | |
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 Simek | f5727ec | 2016-07-14 11:13:04 +0200 | [diff] [blame] | 8 | #include <common.h> |
Simon Glass | dbd7954 | 2020-05-10 11:40:11 -0600 | [diff] [blame] | 9 | #include <linux/delay.h> |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 10 | |
11 | #define xil_printf(...) | ||||
12 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 13 | static void Xil_Out32(unsigned long addr, unsigned long val) |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 14 | { |
15 | writel(val, addr); | ||||
16 | } | ||||
17 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 18 | static int Xil_In32(unsigned long addr) |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 19 | { |
20 | return readl(addr); | ||||
21 | } | ||||
22 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 23 | static void __maybe_unused usleep(u32 sleep) |
Michal Simek | f5727ec | 2016-07-14 11:13:04 +0200 | [diff] [blame] | 24 | { |
25 | udelay(sleep); | ||||
26 | } | ||||
Michal Simek | f5727ec | 2016-07-14 11:13:04 +0200 | [diff] [blame] | 27 | |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 28 | #endif /* XIL_IO_H */ |