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> |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 9 | |
10 | #define xil_printf(...) | ||||
11 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 12 | static void Xil_Out32(unsigned long addr, unsigned long val) |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 13 | { |
14 | writel(val, addr); | ||||
15 | } | ||||
16 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 17 | static int Xil_In32(unsigned long addr) |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 18 | { |
19 | return readl(addr); | ||||
20 | } | ||||
21 | |||||
Luca Ceresoli | be28528 | 2019-05-24 15:40:01 +0200 | [diff] [blame] | 22 | static void __maybe_unused usleep(u32 sleep) |
Michal Simek | f5727ec | 2016-07-14 11:13:04 +0200 | [diff] [blame] | 23 | { |
24 | udelay(sleep); | ||||
25 | } | ||||
Michal Simek | f5727ec | 2016-07-14 11:13:04 +0200 | [diff] [blame] | 26 | |
Michal Simek | 72536fd | 2015-11-20 13:17:22 +0100 | [diff] [blame] | 27 | #endif /* XIL_IO_H */ |