Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 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.
 
 
 
 
 
12 */
13
14#ifndef __ASM_OPENRISC_IO_H
15#define __ASM_OPENRISC_IO_H
16
17#include <linux/types.h>
18#include <asm/pgalloc.h>
19#include <asm/pgtable.h>
20
21/*
22 * PCI: We do not use IO ports in OpenRISC
23 */
24#define IO_SPACE_LIMIT		0
25
26/* OpenRISC has no port IO */
27#define HAVE_ARCH_PIO_SIZE	1
28#define PIO_RESERVED		0X0UL
29#define PIO_OFFSET		0
30#define PIO_MASK		0
31
32/*
33 * I/O memory mapping functions.
34 */
35#define _PAGE_IOREMAP (pgprot_val(PAGE_KERNEL) | _PAGE_CI)
36
37#include <asm-generic/io.h>
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39#endif
v3.5.6
 
 1/*
 2 * OpenRISC Linux
 3 *
 4 * Linux architectural port borrowing liberally from similar works of
 5 * others.  All original copyrights apply as per the original source
 6 * declaration.
 7 *
 8 * OpenRISC implementation:
 9 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
10 * et al.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 */
17
18#ifndef __ASM_OPENRISC_IO_H
19#define __ASM_OPENRISC_IO_H
20
 
 
 
 
21/*
22 * PCI: can we really do 0 here if we have no port IO?
23 */
24#define IO_SPACE_LIMIT		0
25
26/* OpenRISC has no port IO */
27#define HAVE_ARCH_PIO_SIZE	1
28#define PIO_RESERVED		0X0UL
29#define PIO_OFFSET		0
30#define PIO_MASK		0
31
 
 
 
 
 
32#include <asm-generic/io.h>
33
34extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
35				pgprot_t prot);
36
37static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
38{
39	return __ioremap(offset, size, PAGE_KERNEL);
40}
41
42/* #define _PAGE_CI       0x002 */
43static inline void __iomem *ioremap_nocache(phys_addr_t offset,
44					     unsigned long size)
45{
46	return __ioremap(offset, size,
47			 __pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
48}
49
50extern void iounmap(void *addr);
51#endif