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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [lib/] [io-trio.c] - Blame information for rev 1622

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

Line No. Rev Author Line
1 1622 jcastillo
#include <asm/hardware.h>
2
#include <asm/io.h>
3
 
4
static __inline__ void do_outw(unsigned int reg, const void* buf, unsigned int count)
5
{
6
        register const unsigned short* wbuf = (const unsigned short*) buf;
7
        while(count--)
8
                outw(*wbuf++, reg);
9
}
10
 
11
static __inline__ void do_inw(unsigned int reg, void* buf, unsigned int count)
12
{
13
        register unsigned short* wbuf = (unsigned short*) buf;
14
        while(count--)
15
                *wbuf++  = inw(reg);
16
}
17
 
18
 
19
void outsw(unsigned to_reg, const void *from, int len_in_words)
20
{
21
        do_outw(to_reg, from, len_in_words);
22
}
23
 
24
void outswb(unsigned  to_reg, const void *from, int len_in_bytes)
25
{
26
        do_outw(to_reg, from, len_in_bytes/2);
27
}
28
 
29
 
30
 
31
void insw(unsigned from_port, void *to, int len_in_words)
32
{
33
        do_inw(from_port, to, len_in_words);
34
}
35
 
36
void  inswb(unsigned from_port, void *to, int len_in_bytes)
37
{
38
        do_inw(from_port, to, len_in_bytes/2);
39
}
40
 

powered by: WebSVN 2.1.0

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