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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [cpu/] [sh/] [rtems/] [score/] [sh_io.h] - Blame information for rev 1026

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

Line No. Rev Author Line
1 1026 ivang
/*
2
 * These are some macros to access memory mapped devices
3
 * on the SH7000-architecture.
4
 *
5
 * Inspired from the linux kernel's include/asm/io.h
6
 *
7
 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
8
 *           Bernd Becker (becker@faw.uni-ulm.de)
9
 *
10
 *  COPYRIGHT (c) 1996-1998, FAW Ulm, Germany
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
 *
16
 *
17
 *  COPYRIGHT (c) 1998-2001.
18
 *  On-Line Applications Research Corporation (OAR).
19
 *
20
 *  The license and distribution terms for this file may be
21
 *  found in the file LICENSE in this distribution or at
22
 *  http://www.OARcorp.com/rtems/license.html.
23
 *
24
 *  sh_io.h,v 1.2 2001/10/12 17:46:47 joel Exp
25
 */
26
 
27
#ifndef _asm_io_h
28
#define _asm_io_h
29
 
30
#define readb(addr)     (*(volatile unsigned char *) (addr))
31
#define readw(addr)     (*(volatile unsigned short *) (addr))
32
#define readl(addr)     (*(volatile unsigned int *) (addr))
33
#define read8(addr)     (*(volatile unsigned8 *) (addr))
34
#define read16(addr)    (*(volatile unsigned16 *) (addr))
35
#define read32(addr)    (*(volatile unsigned32 *) (addr))
36
 
37
#define writeb(b,addr)  ((*(volatile unsigned char *) (addr)) = (b))
38
#define writew(b,addr)  ((*(volatile unsigned short *) (addr)) = (b))
39
#define writel(b,addr)  ((*(volatile unsigned int *) (addr)) = (b))
40
#define write8(b,addr)  ((*(volatile unsigned8  *) (addr)) = (b))
41
#define write16(b,addr) ((*(volatile unsigned16 *) (addr)) = (b))
42
#define write32(b,addr) ((*(volatile unsigned32 *) (addr)) = (b))
43
 
44
#define inb(addr)       readb(addr)
45
#define outb(b,addr)    writeb(b,addr)
46
 
47
#endif

powered by: WebSVN 2.1.0

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