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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [cpu/] [sh/] [rtems/] [score/] [sh_io.h] - Blame information for rev 593

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

Line No. Rev Author Line
1 30 unneback
/*
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.
18
 *  On-Line Applications Research Corporation (OAR).
19
 *  Copyright assigned to U.S. Government, 1994.
20
 *
21
 *  The license and distribution terms for this file may be
22
 *  found in the file LICENSE in this distribution or at
23
 *  http://www.OARcorp.com/rtems/license.html.
24
 *
25
 *  $Id: sh_io.h,v 1.2 2001-09-27 11:59:30 chris Exp $
26
 */
27
 
28
#ifndef _asm_io_h
29
#define _asm_io_h
30
 
31
#define readb(addr)     (*(volatile unsigned char *) (addr))
32
#define readw(addr)     (*(volatile unsigned short *) (addr))
33
#define readl(addr)     (*(volatile unsigned int *) (addr))
34
#define read8(addr)     (*(volatile unsigned8 *) (addr))
35
#define read16(addr)    (*(volatile unsigned16 *) (addr))
36
#define read32(addr)    (*(volatile unsigned32 *) (addr))
37
 
38
#define writeb(b,addr)  ((*(volatile unsigned char *) (addr)) = (b))
39
#define writew(b,addr)  ((*(volatile unsigned short *) (addr)) = (b))
40
#define writel(b,addr)  ((*(volatile unsigned int *) (addr)) = (b))
41
#define write8(b,addr)  ((*(volatile unsigned8  *) (addr)) = (b))
42
#define write16(b,addr) ((*(volatile unsigned16 *) (addr)) = (b))
43
#define write32(b,addr) ((*(volatile unsigned32 *) (addr)) = (b))
44
 
45
#define inb(addr)       readb(addr)
46
#define outb(b,addr)    writeb(b,addr)
47
 
48
#endif

powered by: WebSVN 2.1.0

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