]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - arch/openrisc/include/asm/io.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
[mirror_ubuntu-kernels.git] / arch / openrisc / include / asm / io.h
CommitLineData
2874c5fd 1/* SPDX-License-Identifier: GPL-2.0-or-later */
58e0166a
JB
2/*
3 * OpenRISC Linux
4 *
5 * Linux architectural port borrowing liberally from similar works of
6 * others. All original copyrights apply as per the original source
7 * declaration.
8 *
9 * OpenRISC implementation:
10 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
11 * et al.
58e0166a
JB
12 */
13
14#ifndef __ASM_OPENRISC_IO_H
15#define __ASM_OPENRISC_IO_H
16
17/*
18 * PCI: can we really do 0 here if we have no port IO?
19 */
20#define IO_SPACE_LIMIT 0
21
22/* OpenRISC has no port IO */
23#define HAVE_ARCH_PIO_SIZE 1
24#define PIO_RESERVED 0X0UL
25#define PIO_OFFSET 0
26#define PIO_MASK 0
27
b934e8eb 28#define ioremap_nocache ioremap_nocache
58e0166a 29#include <asm-generic/io.h>
9b04ebd1 30#include <asm/pgtable.h>
58e0166a
JB
31
32extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
33 pgprot_t prot);
34
b934e8eb 35static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
58e0166a
JB
36{
37 return __ioremap(offset, size, PAGE_KERNEL);
38}
39
40/* #define _PAGE_CI 0x002 */
41static inline void __iomem *ioremap_nocache(phys_addr_t offset,
42 unsigned long size)
43{
44 return __ioremap(offset, size,
45 __pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
46}
47
48extern void iounmap(void *addr);
49#endif