OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-tbox/] [io.h] - Blame information for rev 1276

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-tbox/io.h
3
 *
4
 * Copyright (C) 1996-1999 Russell King
5
 * Copyright (C) 1998, 1999 Philip Blundell
6
 *
7
 */
8
#ifndef __ASM_ARM_ARCH_IO_H
9
#define __ASM_ARM_ARCH_IO_H
10
 
11
#define IO_SPACE_LIMIT 0xffffffff
12
 
13
#define __io(_x)                ((_x) << 2)
14
 
15
/*
16
 * Generic virtual read/write
17
 */
18
static inline unsigned int __arch_getw(unsigned long a)
19
{
20
        unsigned int value;
21
        __asm__ __volatile__("ldr%?h    %0, [%1, #0]    @ getw"
22
                : "=&r" (value)
23
                : "r" (a));
24
        return value;
25
}
26
 
27
static inline void __arch_putw(unsigned int value, unsigned long a)
28
{
29
        __asm__ __volatile__("str%?h    %0, [%1, #0]    @ putw"
30
                : : "r" (value), "r" (a));
31
}
32
 
33
/* Idem, for devices on the upper byte lanes */
34
#define inb_u(p)                __arch_getb(__io_pc(p) + 2)
35
#define inw_u(p)                __arch_getw(__io_pc(p) + 2)
36
 
37
#define outb_u(v,p)             __arch_putb(v,__io_pc(p) + 2)
38
#define outw_u(v,p)             __arch_putw(v,__io_pc(p) + 2)
39
 
40
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.