|
Message
From: cvs at opencores.org<cvs@o...>
Date: Tue Dec 20 12:27:53 CET 2005
Subject: [cvs-checkins] MODIFIED: or1k ...
Date: 00/05/12 20:12:27 Added: or1k/rc203soc/sw/uClinux/include/asm-armnommu a.out.h arcaudio.h assembler.h atomic.h bitops.h bugs.h byteorder.h checksum.h delay.h dma.h ecard.h elf.h errno.h fcntl.h floppy.h hardware.h io.h ioctl.h ioctls.h irq.h limits.h mman.h mmu_context.h page.h param.h pgtable.h posix_types.h proc-fns.h processor.h procinfo.h ptrace.h resource.h segment.h semaphore.h serial.h setup.h shmparam.h sigcontext.h signal.h socket.h sockios.h stat.h statfs.h string.h system.h termbits.h termios.h types.h unaligned.h unistd.h user.h vt.h Log: First Import of RC20x uClinux Revision Changes Path 1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/a.out.h http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/a.out.h?rev=1.1&content-type=text/x-cvsweb-markup Index: a.out.h =================================================================== #ifndef __ARM_A_OUT_H__ #define __ARM_A_OUT_H__ #include <linux/types.h> struct exec { __u32 a_info; /* Use macros N_MAGIC, etc for access */ __u32 a_text; /* length of text, in bytes */ __u32 a_data; /* length of data, in bytes */ __u32 a_bss; /* length of uninitialized data area for file, in bytes */ __u32 a_syms; /* length of symbol table data in file, in bytes */ __u32 a_entry; /* start address */ __u32 a_trsize; /* length of relocation info for text, in bytes */ __u32 a_drsize; /* length of relocation info for data, in bytes */ }; /* * This is always the same */ #define N_TXTADDR(a) (0x00008000) #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) #define M_ARM 103 #include <asm/arch/a.out.h> #endif /* __A_OUT_GNU_H__ */ 1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/arcaudio.h http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/arcaudio.h?rev=1.1&content-type=text/x-cvsweb-markup Index: arcaudio.h =================================================================== /* * arcaudio.h * */ #ifndef _LINUX_ARCAUDIO_H #define _LINUX_ARCAUDIO_H #define ARCAUDIO_MAXCHANNELS 8 enum ch_type { ARCAUDIO_NONE, /* No sound (muted) */ ARCAUDIO_8BITSIGNED, /* signed 8 bits per samples */ ARCAUDIO_8BITUNSIGNED, /* unsigned 8 bits per samples */ ARCAUDIO_16BITSIGNED, /* signed 16 bits per samples (little endian) */ ARCAUDIO_16BITUNSIGNED, /* unsigned 16 bits per samples (little endian) */ ARCAUDIO_LOG /* Vidc Log */ }; /* * Global information */ struct arcaudio { int sample_rate; /* sample rate (Hz) */ int num_channels; /* number of channels */ int volume; /* overall system volume */ }; /* * Per channel information */ struct arcaudio_channel { int stereo_position; /* Channel position */ int channel_volume; /* Channel volume */ enum ch_type channel_type; /* Type of channel */ int buffer_size; /* Size of channel buffer */ };
/* IOCTLS */
#define ARCAUDIO_GETINFO 0x6101
#define ARCAUDIO_SETINFO 0x6102
#define ARCAUDIO_GETCHANNELINFO 0x6111
#define ARCAUDIO_SETCHANNELINFO 0x6112
#define ARCAUDIO_GETOPTS 0x61f0
#define ARCAUDIO_SETOPTS 0x61f1
#define ARCAUDIO_OPTSPKR 1<<0
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/assembler.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/assembler.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: assembler.h
===================================================================
/*
* linux/asm/assembler.h
*
* This file contains arm architecture specific defines
* for the different processors.
*
* Do not include any C declarations in this file - it is included by
* assembler source.
*/
/*
* LOADREGS: multiple register load (ldm) with pc in register list
* (takes account of ARM6 not using ^)
*
* RETINSTR: return instruction: adds the 's' in at the end of the
* instruction if this is not an ARM6
*
* SAVEIRQS: save IRQ state (not required on ARM2/ARM3 - done
* implicitly
*
* RESTOREIRQS: restore IRQ state (not required on ARM2/ARM3 - done
* implicitly with ldm ... ^ or movs.
*
* These next two need thinking about - can't easily use stack... (see system.S)
* DISABLEIRQS: disable IRQS in SVC mode
*
* ENABLEIRQS: enable IRQS in SVC mode
*
* USERMODE: switch to USER mode
*
* SVCMODE: switch to SVC mode
*/
#include <asm/proc/assembler.h>
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/atomic.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/atomic.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: atomic.h
===================================================================
/*
* linux/include/asm-arm/atomic.h
*
* Copyright (c) 1996 Russell King.
*
* Changelog:
* 27-06-1996 RMK Created
* 13-04-1997 RMK Made functions atomic
*/
#ifndef __ASM_ARM_ATOMIC_H
#define __ASM_ARM_ATOMIC_H
#include <asm/system.h>
typedef int atomic_t;
extern __inline__ void atomic_add(atomic_t i, atomic_t *v)
{
unsigned long flags;
save_flags_cli (flags);
*v += i;
restore_flags (flags);
}
extern __inline__ void atomic_sub(atomic_t i, atomic_t *v)
{
unsigned long flags;
save_flags_cli (flags);
*v -= i;
restore_flags (flags);
}
extern __inline__ void atomic_inc(atomic_t *v)
{
unsigned long flags;
save_flags_cli (flags);
*v += 1;
restore_flags (flags);
}
extern __inline__ void atomic_dec(atomic_t *v)
{
unsigned long flags;
save_flags_cli (flags);
*v -= 1;
restore_flags (flags);
}
extern __inline__ int atomic_dec_and_test(atomic_t *v)
{
unsigned long flags;
int result;
save_flags_cli (flags);
*v -= 1;
result = (*v == 0);
restore_flags (flags);
return result;
}
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/bitops.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/bitops.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: bitops.h
===================================================================
#ifndef __ASM_ARM_BITOPS_H
#define __ASM_ARM_BITOPS_H
/*
* Copyright 1995, Russell King.
* Various bits and pieces copyrights include:
* Linus Torvalds (test_bit).
*/
/*
* These should be done with inline assembly.
* All bit operations return 0 if the bit
* was cleared before the operation and != 0 if it was not.
*
* bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
*/
extern int set_bit(int nr, void * addr);
extern int clear_bit(int nr, void * addr);
extern int change_bit(int nr, void * addr);
/*
* This routine doesn't need to be atomic.
*/
extern __inline__ int test_bit(int nr, const void * addr)
{
return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7));
}
/*
* Find-bit routines..
*/
extern int find_first_zero_bit(void * addr, unsigned size);
extern int find_next_zero_bit (void * addr, int size, int offset);
/*
* ffz = Find First Zero in word. Undefined if no zero exists.
*/
extern __inline__ unsigned long ffz(unsigned long word)
{
int k;
word = ~word;
k = 31;
if (word & 0x0000ffff) { k -= 16; word <<= 16; }
if (word & 0x00ff0000) { k -= 8; word <<= 8; }
if (word & 0x0f000000) { k -= 4; word <<= 4; }
if (word & 0x30000000) { k -= 2; word <<= 2; }
if (word & 0x40000000) { k -= 1; }
return k;
}
extern __inline__ int __ext2_set_bit(int nr,void * addr) { return set_bit(nr, addr); }
extern __inline__ int __ext2_clear_bit(int nr, void * addr) { return clear_bit(nr, addr); }
extern __inline__ int __ext2_test_bit(int nr, const void * addr) { return test_bit(nr, addr); }
extern __inline__ unsigned long __ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
{
return find_next_zero_bit(addr, size, offset);
}
extern __inline__ unsigned long __ext2_find_first_zero_bit(void *addr, unsigned long size)
{
return find_first_zero_bit(addr, size);
}
#endif /* _ARM_BITOPS_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/bugs.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/bugs.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: bugs.h
===================================================================
/*
* include/asm-arm/bugs.h
*
* Copyright (C) 1995 Russell King
*/
#ifndef __ASM_BUGS_H
#define __ASM_BUGS_H
#include <asm/proc-fns.h>
#define check_bugs() processor._check_bugs()
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/byteorder.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/byteorder.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: byteorder.h
===================================================================
#ifndef __ASM_ARM_BYTEORDER_H
#define __ASM_ARM_BYTEORDER_H
#undef ntohl
#undef ntohs
#undef htonl
#undef htons
#ifndef __LITTLE_ENDIAN
#define __LITTLE_ENDIAN 1234
#endif
#ifndef __LITTLE_ENDIAN_BITFIELD
#define __LITTLE_ENDIAN_BITFIELD
#endif
extern unsigned long int ntohl(unsigned long int);
extern unsigned short int ntohs(unsigned short int);
extern unsigned long int htonl(unsigned long int);
extern unsigned short int htons(unsigned short int);
extern unsigned long int __ntohl(unsigned long int);
extern unsigned short int __ntohs(unsigned short int);
extern unsigned long int __constant_ntohl(unsigned long int);
extern unsigned short int __constant_ntohs(unsigned short int);
extern __inline__ unsigned long int
__ntohl(unsigned long int x)
{
unsigned long xx;
__asm__("eor\t%1, %0, %0, ror #16\n\t"
"bic\t%1, %1, #0xff0000\n\t"
"mov\t%0, %0, ror #8\n\t"
"eor\t%0, %0, %1, lsr #8\n\t"
: "=r" (x), "=&r" (xx)
: "0" (x));
return x;
}
#define __constant_ntohl(x) \
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \
(((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
(((unsigned long int)(x) & 0xff000000U) >> 24)))
extern __inline__ unsigned short int
__ntohs(unsigned short int x)
{
__asm__("eor\t%0, %0, %0, lsr #8\n\t"
"eor\t%0, %0, %0, lsl #8\n\t"
"bic\t%0, %0, #0xff0000\n\t"
"eor\t%0, %0, %0, lsr #8\n\t"
: "=r" (x)
: "0" (x));
return x;
}
#define __constant_ntohs(x) \
((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
(((unsigned short int)(x) & 0xff00) >> 8)))
#define __htonl(x) __ntohl(x)
#define __htons(x) __ntohs(x)
#define __constant_htonl(x) __constant_ntohl(x)
#define __constant_htons(x) __constant_ntohs(x)
#ifdef __OPTIMIZE__
# define ntohl(x) \
(__builtin_constant_p((long)(x)) ? \
__constant_ntohl((x)) : \
__ntohl((x)))
# define ntohs(x) \
(__builtin_constant_p((short)(x)) ? \
__constant_ntohs((x)) : \
__ntohs((x)))
# define htonl(x) \
(__builtin_constant_p((long)(x)) ? \
__constant_htonl((x)) : \
__htonl((x)))
# define htons(x) \
(__builtin_constant_p((short)(x)) ? \
__constant_htons((x)) : \
__htons((x)))
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/checksum.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/checksum.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: checksum.h
===================================================================
#ifndef __ASM_ARM_CHECKSUM_H
#define __ASM_ARM_CHECKSUM_H
#ifndef __ASM_ARM_SEGMENT_H
#include <asm/segment.h>
#endif
/*
* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
*
* returns a 32-bit number suitable for feeding into itself
* or csum_tcpudp_magic
*
* this function must be called with even lengths, except
* for the last fragment, which may be odd
*
* it's best to have buff aligned on a 32-bit boundary
*/
unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
/*
* the same as csum_partial, but copies from src while it
* checksums
*
* here even more important to align src and dst on a 32-bit (or even
* better 64-bit) boundary
*/
unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
/*
* the same as csum_partial_copy, but copies from user space.
*
* here even more important to align src and dst on a 32-bit (or even
* better 64-bit) boundary
*/
static __INLINE__ unsigned int csum_partial_copy_fromuser(const char *src, char *dst, int len, int sum)
{
extern unsigned int __csum_partial_copy_fromuser(const char *src, char *dst, int len, int sum);
if (IS_USER_SEG)
return __csum_partial_copy_fromuser (src, dst, len, sum);
else
return csum_partial_copy (src, dst, len, sum);
}
/*
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
*
* By Jorge Cwik <jorge@l...>, adapted for linux by
* Arnt Gulbrandsen.
*
* Converted to ARM by R.M.King
*/
static inline unsigned short ip_fast_csum(unsigned char * iph,
unsigned int ihl) {
unsigned int sum, tmp1;
__asm__ __volatile__("
sub %2, %2, #5
ldr %0, [%1], #4
ldr %3, [%1], #4
adds %0, %0, %3
ldr %3, [%1], #4
adcs %0, %0, %3
ldr %3, [%1], #4
adcs %0, %0, %3
1: ldr %3, [%1], #4
adcs %0, %0, %3
tst %2, #15
subne %2, %2, #1
bne 1b
adc %0, %0, #0
adds %0, %0, %0, lsl #16
addcs %0, %0, #0x10000
mvn %0, %0
mov %0, %0, lsr #16
"
: "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1)
: "1" (iph), "2" (ihl));
return(sum);
}
/*
* computes the checksum of the TCP/UDP pseudo-header
* returns a 16-bit checksum, already complemented
*/
static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
unsigned long daddr,
unsigned short len,
unsigned short proto,
unsigned int sum) {
__asm__ __volatile__("
adds %0, %0, %1
adcs %0, %0, %4
adcs %0, %0, %5
adc %0, %0, #0
adds %0, %0, %0, lsl #16
addcs %0, %0, #0x10000
mvn %0, %0
mov %0, %0, lsr #16
"
: "=&r" (sum), "=&r" (saddr)
: "0" (daddr), "1"(saddr), "r"((ntohs(len)<<16)+proto*256), "r"(sum));
return((unsigned short)sum);
}
/*
* Fold a partial checksum without adding pseudo headers
*/
static inline unsigned int csum_fold(unsigned int sum)
{
__asm__ __volatile__("
adds %0, %0, %0, lsl #16
addcss %0, %0, #0x10000
addcs %0, %0, #0x10000
mvn %0, %0
mov %0, %0, lsr #16
"
: "=r" (sum)
: "0" (sum));
return sum;
}
/*
* this routine is used for miscellaneous IP-like checksums, mainly
* in icmp.c
*/
static inline unsigned short ip_compute_csum(unsigned char * buff, int len) {
unsigned int sum;
__asm__ __volatile__("
adds %0, %0, %0, lsl #16
addcs %0, %0, #0x10000
mvn %0, %0
mov %0, %0, lsr #16
"
: "=r"(sum)
: "0" (csum_partial(buff, len, 0)));
return(sum);
}
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/delay.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/delay.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: delay.h
===================================================================
#ifndef __ASM_ARM_DELAY_H
#define __ASM_ARM_DELAY_H
/*
* Copyright (C) 1995 Russell King
*
* Delay routines, using a pre-computed "loops_per_second" value.
*/
extern void __delay(int loops);
/*
* division by multiplication: you don't have to worry about
* loss of precision.
*
* Use only for very small delays ( < 1 msec). Should probably use a
* lookup table, really, as the multiplications take much too long with
* short delays. This is a "reasonable" implementation, though (and the
* first constant multiplications gets optimized away if the delay is
* a constant)
*/
extern void udelay(unsigned long usecs);
extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c)
{
return a * b / c;
}
#endif /* defined(_ARM_DELAY_H) */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/dma.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/dma.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: dma.h
===================================================================
#ifndef __ASM_ARM_DMA_H
#define __ASM_ARM_DMA_H
typedef unsigned int dmach_t;
#include <asm/irq.h>
#include <asm/arch/dma.h>
typedef struct {
unsigned long address;
unsigned long length;
} dmasg_t;
extern const char dma_str[];
/* Clear the 'DMA Pointer Flip Flop'.
* Write 0 for LSB/MSB, 1 for MSB/LSB access.
*
* NOTE: This is an architecture specific function, and should
* be hidden from the drivers.
*/
#define clear_dma_ff(channel)
/* Set only the page register bits of the transfer address.
*
* NOTE: This is an architecture specific function, and should
* be hidden from the drivers
*/
static __inline__ void set_dma_page(dmach_t channel, char pagenr)
{
printk(dma_str, "set_dma_page", channel);
}
/* Request a DMA channel
*
* Some architectures may need to do allocate an interrupt
*/
extern int request_dma(dmach_t channel, const char * device_id);
/* Free a DMA channel
*
* Some architectures may need to do free an interrupt
*/
extern void free_dma(dmach_t channel);
/* Enable DMA for this channel
*
* On some architectures, this may have other side effects like
* enabling an interrupt and setting the DMA registers.
*/
extern void enable_dma(dmach_t channel);
/* Disable DMA for this channel
*
* On some architectures, this may have other side effects like
* disabling an interrupt or whatever.
*/
extern void disable_dma(dmach_t channel);
/* Set the DMA scatter gather list for this channel
*
* This should not be called if a DMA channel is enabled,
* especially since some DMA architectures don't update the
* DMA address immediately, but defer it to the enable_dma().
*/
extern void set_dma_sg(dmach_t channel, dmasg_t *sg, int nr_sg);
/* Set the DMA address for this channel
*
* This should not be called if a DMA channel is enabled,
* especially since some DMA architectures don't update the
* DMA address immediately, but defer it to the enable_dma().
*/
extern void set_dma_addr(dmach_t channel, unsigned long physaddr);
/* Set the DMA byte count for this channel
*
* This should not be called if a DMA channel is enabled,
* especially since some DMA architectures don't update the
* DMA count immediately, but defer it to the enable_dma().
*/
extern void set_dma_count(dmach_t channel, unsigned long count);
/* Set the transfer direction for this channel
*
* This should not be called if a DMA channel is enabled,
* especially since some DMA architectures don't update the
* DMA transfer direction immediately, but defer it to the
* enable_dma().
*/
extern void set_dma_mode(dmach_t channel, dmamode_t mode);
/* Get DMA residue count. After a DMA transfer, this
* should return zero. Reading this while a DMA transfer is
* still in progress will return unpredictable results.
* If called before the channel has been used, it may return 1.
* Otherwise, it returns the number of _bytes_ left to transfer.
*/
extern int get_dma_residue(dmach_t channel);
#ifndef NO_DMA
#define NO_DMA 255
#endif
#endif /* _ARM_DMA_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/ecard.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/ecard.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: ecard.h
===================================================================
/*
* linux/include/asm-arm/ecard.h
*
* definitions for expansion cards
*
* Changelog:
* 11-12-1996 RMK Further minor improvements
* 12-09-1997 RMK Added interrupt enable/disable for card level
*
* Reference: Acorns Risc OS 3 Programmers Reference Manuals.
*/
#ifndef __ASM_ECARD_H
#define __ASM_ECARD_H
/*
* Currently understood cards (but not necessarily
* supported):
* Manufacturer Product ID
*/
#define MANU_ACORN 0x0000
#define PROD_ACORN_SCSI 0x0002
#define PROD_ACORN_ETHER1 0x0003
#define PROD_ACORN_MFM 0x000b
#define MANU_ANT2 0x0011
#define PROD_ANT_ETHER3 0x00a4
#define MANU_ATOMWIDE 0x0017
#define PROD_ATOMWIDE_3PSERIAL 0x0090
#define MANU_IRLAM_INSTRUMENTS 0x001f
#define MANU_IRLAM_INSTRUMENTS_ETHERN 0x5678
#define MANU_OAK 0x0021
#define PROD_OAK_SCSI 0x0058
#define MANU_MORLEY 0x002b
#define PROD_MORLEY_SCSI_UNCACHED 0x0067
#define MANU_CUMANA 0x003a
#define PROD_CUMANA_SCSI_1 0x00a0
#define PROD_CUMANA_SCSI_2 0x003a
#define MANU_ICS 0x003c
#define PROD_ICS_IDE 0x00ae
#define MANU_ICS2 0x003d
#define PROD_ICS2_IDE 0x00ae
#define MANU_SERPORT 0x003f
#define PROD_SERPORT_DSPORT 0x00b9
#define MANU_I3 0x0046
#define PROD_I3_ETHERLAN500 0x00d4
#define PROD_I3_ETHERLAN600 0x00ec
#define PROD_I3_ETHERLAN600A 0x011e
#define MANU_ANT 0x0053
#define PROD_ANT_ETHERB 0x00e4
#define MANU_ALSYSTEMS 0x005b
#define PROD_ALSYS_SCSIATAPI 0x0107
#define MANU_MCS 0x0063
#define PROD_MCS_CONNECT32 0x0125
#define MANU_EESOX 0x0064
#define PROD_EESOX_SCSI2 0x008c
#define MANU_YELLOWSTONE 0x0096
#define PROD_YELLOWSTONE_RAPIDE32 0x0120
#ifdef ECARD_C
#define CONST
#else
#define CONST const
#endif
#define MAX_ECARDS 8
typedef enum { /* Cards address space */
ECARD_IOC,
ECARD_MEMC,
ECARD_EASI
} card_type_t;
typedef enum { /* Speed for ECARD_IOC space */
ECARD_SLOW = 0,
ECARD_MEDIUM = 1,
ECARD_FAST = 2,
ECARD_SYNC = 3
} card_speed_t;
typedef struct { /* Card ID structure */
unsigned short manufacturer;
unsigned short product;
} card_ids;
struct in_ecid { /* Packed card ID information */
unsigned short product; /* Product code */
unsigned short manufacturer; /* Manufacturer code */
unsigned char id:4; /* Simple ID */
unsigned char cd:1; /* Chunk dir present */
unsigned char is:1; /* Interrupt status pointers */
unsigned char w:2; /* Width */
unsigned char country; /* Country */
unsigned char irqmask; /* IRQ mask */
unsigned char fiqmask; /* FIQ mask */
unsigned long irqoff; /* IRQ offset */
unsigned long fiqoff; /* FIQ offset */
};
typedef struct expansion_card ecard_t;
typedef unsigned long *loader_t;
typedef struct { /* Card handler routines */
void (*irqenable)(ecard_t *ec, int irqnr);
void (*irqdisable)(ecard_t *ec, int irqnr);
int (*irqpending)(ecard_t *ec);
void (*fiqenable)(ecard_t *ec, int fiqnr);
void (*fiqdisable)(ecard_t *ec, int fiqnr);
int (*fiqpending)(ecard_t *ec);
} expansioncard_ops_t;
/*
* This contains all the info needed on an expansion card
*/
struct expansion_card {
struct expansion_card *next;
/* Public data */
volatile unsigned char *irqaddr; /* address of IRQ register */
volatile unsigned char *fiqaddr; /* address of FIQ register */
unsigned char irqmask; /* IRQ mask */
unsigned char fiqmask; /* FIQ mask */
unsigned char claimed; /* Card claimed? */
void *irq_data; /* Data for use for IRQ by card */
void *fiq_data; /* Data for use for FIQ by card */
expansioncard_ops_t *ops; /* Enable/Disable Ops for card */
CONST unsigned char slot_no; /* Slot number */
CONST unsigned char dma; /* DMA number (for request_dma) */
CONST unsigned char irq; /* IRQ number (for request_irq) */
CONST unsigned char fiq; /* FIQ number (for request_irq) */
CONST card_type_t type; /* Type of card */
CONST struct in_ecid cid; /* Card Identification */
/* Private internal data */
const char *card_desc; /* description of card */
CONST unsigned int podaddr; /* Base Linux address for card */
CONST loader_t loader; /* loader program */
};
struct in_chunk_dir {
unsigned int start_offset;
union {
unsigned char string[256];
unsigned char data[1];
} d;
};
/*
* ecard_claim: claim an expansion card entry
*/
#define ecard_claim(ec) ((ec)->claimed = 1)
/*
* ecard_release: release an expansion card entry
*/
#define ecard_release(ec) ((ec)->claimed = 0)
/*
* Start finding cards from the top of the list
*/
extern void ecard_startfind (void);
/*
* Find an expansion card with the correct cid, product and manufacturer code
*/
extern struct expansion_card *ecard_find (int cid, const card_ids *ids);
/*
* Read a chunk from an expansion card
* cd : where to put read data
* ec : expansion card info struct
* id : id number to find
* num: (n+1)'th id to find.
*/
extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num);
/*
* Obtain the address of a card
*/
extern unsigned int ecard_address (struct expansion_card *ec, card_type_t card_type, card_speed_t speed);
#ifdef ECARD_C
/* Definitions internal to ecard.c - for it's use only!!
*
* External expansion card header as read from the card
*/
struct ex_ecid {
unsigned char r_irq:1;
unsigned char r_zero:1;
unsigned char r_fiq:1;
unsigned char r_id:4;
unsigned char r_a:1;
unsigned char r_cd:1;
unsigned char r_is:1;
unsigned char r_w:2;
unsigned char r_r1:4;
unsigned char r_r2:8;
unsigned char r_prod[2];
unsigned char r_manu[2];
unsigned char r_country;
unsigned char r_irqmask;
unsigned char r_irqoff[3];
unsigned char r_fiqmask;
unsigned char r_fiqoff[3];
};
/*
* Chunk directory entry as read from the card
*/
struct ex_chunk_dir {
unsigned char r_id;
unsigned char r_len[3];
unsigned long r_start;
union {
char string[256];
char data[1];
} d;
#define c_id(x) ((x)->r_id)
#define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
#define c_start(x) ((x)->r_start)
};
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/elf.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/elf.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: elf.h
===================================================================
#ifndef __ASMARM_ELF_H
#define __ASMARM_ELF_H
/*
* ELF register definitions..
*/
#include <asm/ptrace.h>
typedef unsigned long elf_greg_t;
#define EM_ARM 40
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct { void *null; } elf_fpregset_t;
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ( ((x) == EM_ARM) )
/*
* These are used to set parameters in the core dumps.
*/
#define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2LSB;
#define ELF_ARCH EM_ARM
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE /*32768*/4096
#ifdef __KERNEL__
#define SET_PERSONALITY(ex,ibcs2) \
current->personality = PER_LINUX_32BIT
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/errno.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/errno.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: errno.h
===================================================================
#ifndef _ARM_ERRNO_H
#define _ARM_ERRNO_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */
#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* File table overflow */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Not a typewriter */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Math argument out of domain of func */
#define ERANGE 34 /* Math result not representable */
#define EDEADLK 35 /* Resource deadlock would occur */
#define ENAMETOOLONG 36 /* File name too long */
#define ENOLCK 37 /* No record locks available */
#define ENOSYS 38 /* Function not implemented */
#define ENOTEMPTY 39 /* Directory not empty */
#define ELOOP 40 /* Too many symbolic links encountered */
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define ENOMSG 42 /* No message of desired type */
#define EIDRM 43 /* Identifier removed */
#define ECHRNG 44 /* Channel number out of range */
#define EL2NSYNC 45 /* Level 2 not synchronized */
#define EL3HLT 46 /* Level 3 halted */
#define EL3RST 47 /* Level 3 reset */
#define ELNRNG 48 /* Link number out of range */
#define EUNATCH 49 /* Protocol driver not attached */
#define ENOCSI 50 /* No CSI structure available */
#define EL2HLT 51 /* Level 2 halted */
#define EBADE 52 /* Invalid exchange */
#define EBADR 53 /* Invalid request descriptor */
#define EXFULL 54 /* Exchange full */
#define ENOANO 55 /* No anode */
#define EBADRQC 56 /* Invalid request code */
#define EBADSLT 57 /* Invalid slot */
#define EDEADLOCK 58 /* File locking deadlock error */
#define EBFONT 59 /* Bad font file format */
#define ENOSTR 60 /* Device not a stream */
#define ENODATA 61 /* No data available */
#define ETIME 62 /* Timer expired */
#define ENOSR 63 /* Out of streams resources */
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* Object is remote */
#define ENOLINK 67 /* Link has been severed */
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
#define ECOMM 70 /* Communication error on send */
#define EPROTO 71 /* Protocol error */
#define EMULTIHOP 72 /* Multihop attempted */
#define EDOTDOT 73 /* RFS specific error */
#define EBADMSG 74 /* Not a data message */
#define EOVERFLOW 75 /* Value too large for defined data type */
#define ENOTUNIQ 76 /* Name not unique on network */
#define EBADFD 77 /* File descriptor in bad state */
#define EREMCHG 78 /* Remote address changed */
#define ELIBACC 79 /* Can not access a needed shared library */
#define ELIBBAD 80 /* Accessing a corrupted shared library */
#define ELIBSCN 81 /* .lib section in a.out corrupted */
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
#define EILSEQ 84 /* Illegal byte sequence */
#define ERESTART 85 /* Interrupted system call should be restarted */
#define ESTRPIPE 86 /* Streams pipe error */
#define EUSERS 87 /* Too many users */
#define ENOTSOCK 88 /* Socket operation on non-socket */
#define EDESTADDRREQ 89 /* Destination address required */
#define EMSGSIZE 90 /* Message too long */
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
#define ENOPROTOOPT 92 /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
#define EADDRINUSE 98 /* Address already in use */
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
#define ENETDOWN 100 /* Network is down */
#define ENETUNREACH 101 /* Network is unreachable */
#define ENETRESET 102 /* Network dropped connection because of reset */
#define ECONNABORTED 103 /* Software caused connection abort */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
#define EISCONN 106 /* Transport endpoint is already connected */
#define ENOTCONN 107 /* Transport endpoint is not connected */
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
#define ETIMEDOUT 110 /* Connection timed out */
#define ECONNREFUSED 111 /* Connection refused */
#define EHOSTDOWN 112 /* Host is down */
#define EHOSTUNREACH 113 /* No route to host */
#define EALREADY 114 /* Operation already in progress */
#define EINPROGRESS 115 /* Operation now in progress */
#define ESTALE 116 /* Stale NFS file handle */
#define EUCLEAN 117 /* Structure needs cleaning */
#define ENOTNAM 118 /* Not a XENIX named type file */
#define ENAVAIL 119 /* No XENIX semaphores available */
#define EISNAM 120 /* Is a named type file */
#define EREMOTEIO 121 /* Remote I/O error */
#define EDQUOT 122 /* Quota exceeded */
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/fcntl.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/fcntl.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: fcntl.h
===================================================================
#ifndef _ARM_FCNTL_H
#define _ARM_FCNTL_H
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
#define F_SETFD 2 /* set f_flags */
#define F_GETFL 3 /* more flags (cloexec) */
#define F_SETFL 4
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/floppy.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/floppy.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: floppy.h
===================================================================
/*
* linux/include/asm-arm/floppy.h
*
* (C) 1996 Russell King
*/
#ifndef __ASM_ARM_FLOPPY_H
#define __ASM_ARM_FLOPPY_H
#if 0
#include <asm/arch/floppy.h>
#endif
#define fd_outb(val,port) outb((val),(port))
#define fd_inb(port) inb((port))
#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
SA_INTERRUPT|SA_SAMPLE_RANDOM,"floppy",NULL)
#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy")
#define fd_free_dma() free_dma(FLOPPY_DMA)
#define fd_disable_dma() disable_dma(FLOPPY_DMA)
#define fd_enable_dma() enable_dma(FLOPPY_DMA)
#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA)
#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, (mode))
#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA, (addr))
#define fd_set_dma_count(len) set_dma_count(FLOPPY_DMA, (len))
#define fd_cacheflush(addr,sz)
/* Floppy_selects is the list of DOR's to select drive fd
*
* On initialisation, the floppy list is scanned, and the drives allocated
* in the order that they are found. This is done by seeking the drive
* to a non-zero track, and then restoring it to track 0. If an error occurs,
* then there is no floppy drive present. [to be put back in again]
*/
static unsigned char floppy_selects[2][4] =
{
{ 0x10, 0x21, 0x23, 0x33 },
{ 0x10, 0x21, 0x23, 0x33 }
};
#define fd_setdor(dor) \
do { \
int new_dor = (dor); \
if (new_dor & 0xf0) \
fd_outb((new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3], FD_DOR); \
else \
fd_outb((new_dor & 0x0c), FD_DOR); \
} while (0)
/*
* Someday, we'll automatically detect which drives are present...
*/
extern __inline__ void fd_scandrives (void)
{
#if 0
int floppy, drive_count;
fd_disable_irq();
raw_cmd = &default_raw_cmd;
raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_SEEK;
raw_cmd->track = 0;
raw_cmd->rate = ?;
drive_count = 0;
for (floppy = 0; floppy < 4; floppy ++) {
current_drive = drive_count;
/*
* Turn on floppy motor
*/
if (start_motor(redo_fd_request))
continue;
/*
* Set up FDC
*/
fdc_specify();
/*
* Tell FDC to recalibrate
*/
output_byte(FD_RECALIBRATE);
LAST_OUT(UNIT(floppy));
/* wait for command to complete */
if (!successful) {
int i;
for (i = drive_count; i < 3; i--)
floppy_selects[fdc][i] = floppy_selects[fdc][i + 1];
floppy_selects[fdc][3] = 0;
floppy -= 1;
} else
drive_count++;
}
#else
floppy_selects[0][0] = 0x10;
floppy_selects[0][1] = 0x21;
floppy_selects[0][2] = 0x23;
floppy_selects[0][3] = 0x33;
#endif
}
#define FDC1 (0x3f0)
static int FDC2 = -1;
#define FLOPPY0_TYPE 4
#define FLOPPY1_TYPE 4
#define N_FDC 1
#define N_DRIVE 8
#define FLOPPY_MOTOR_MASK 0xf0
#define CROSS_64KB(a,s) (0)
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/hardware.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/hardware.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: hardware.h
===================================================================
/*
* linux/include/asm-arm/hardware.h
*
* Copyright (C) 1996 Russell King
*
* Common hardware definitions
*/
#ifndef __ASM_HARDWARE_H
#define __ASM_HARDWARE_H
#include <asm/arch/hardware.h>
/*
* Use these macros to read/write the IOC. All it does is perform the actual
* read/write.
*/
#ifdef HAS_IOC
#ifndef __ASSEMBLER__
#define __IOC(offset) (IO_IOC_BASE + (offset >> 2))
#else
#define __IOC(offset) offset
#endif
#define IOC_CONTROL __IOC(0x00)
#define IOC_KARTTX __IOC(0x04)
#define IOC_KARTRX __IOC(0x04)
#define IOC_IRQSTATA __IOC(0x10)
#define IOC_IRQREQA __IOC(0x14)
#define IOC_IRQCLRA __IOC(0x14)
#define IOC_IRQMASKA __IOC(0x18)
#define IOC_IRQSTATB __IOC(0x20)
#define IOC_IRQREQB __IOC(0x24)
#define IOC_IRQMASKB __IOC(0x28)
#define IOC_FIQSTAT __IOC(0x30)
#define IOC_FIQREQ __IOC(0x34)
#define IOC_FIQMASK __IOC(0x38)
#define IOC_T0CNTL __IOC(0x40)
#define IOC_T0LTCHL __IOC(0x40)
#define IOC_T0CNTH __IOC(0x44)
#define IOC_T0LTCHH __IOC(0x44)
#define IOC_T0GO __IOC(0x48)
#define IOC_T0LATCH __IOC(0x4c)
#define IOC_T1CNTL __IOC(0x50)
#define IOC_T1LTCHL __IOC(0x50)
#define IOC_T1CNTH __IOC(0x54)
#define IOC_T1LTCHH __IOC(0x54)
#define IOC_T1GO __IOC(0x58)
#define IOC_T1LATCH __IOC(0x5c)
#define IOC_T2CNTL __IOC(0x60)
#define IOC_T2LTCHL __IOC(0x60)
#define IOC_T2CNTH __IOC(0x64)
#define IOC_T2LTCHH __IOC(0x64)
#define IOC_T2GO __IOC(0x68)
#define IOC_T2LATCH __IOC(0x6c)
#define IOC_T3CNTL __IOC(0x70)
#define IOC_T3LTCHL __IOC(0x70)
#define IOC_T3CNTH __IOC(0x74)
#define IOC_T3LTCHH __IOC(0x74)
#define IOC_T3GO __IOC(0x78)
#define IOC_T3LATCH __IOC(0x7c)
#endif
#ifdef HAS_MEMC
#define VDMA_ALIGNMENT PAGE_SIZE
#define VDMA_XFERSIZE 16
#define VDMA_INIT 0
#define VDMA_START 1
#define VDMA_END 2
#define video_set_dma(start,end,offset) \
do { \
memc_write (VDMA_START, (start >> 2)); \
memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2); \
memc_write (VDMA_INIT, (offset >> 2)); \
} while (0)
#endif
#ifdef HAS_IOMD
#ifndef __ASSEMBLER__
#define __IOMD(offset) (IO_IOMD_BASE + (offset >> 2))
#else
#define __IOMD(offset) offset
#endif
#define IOMD_CONTROL __IOMD(0x000)
#define IOMD_KARTTX __IOMD(0x004)
#define IOMD_KARTRX __IOMD(0x004)
#define IOMD_KCTRL __IOMD(0x008)
#define IOMD_IRQSTATA __IOMD(0x010)
#define IOMD_IRQREQA __IOMD(0x014)
#define IOMD_IRQCLRA __IOMD(0x014)
#define IOMD_IRQMASKA __IOMD(0x018)
#define IOMD_IRQSTATB __IOMD(0x020)
#define IOMD_IRQREQB __IOMD(0x024)
#define IOMD_IRQMASKB __IOMD(0x028)
#define IOMD_FIQSTAT __IOMD(0x030)
#define IOMD_FIQREQ __IOMD(0x034)
#define IOMD_FIQMASK __IOMD(0x038)
#define IOMD_T0CNTL __IOMD(0x040)
#define IOMD_T0LTCHL __IOMD(0x040)
#define IOMD_T0CNTH __IOMD(0x044)
#define IOMD_T0LTCHH __IOMD(0x044)
#define IOMD_T0GO __IOMD(0x048)
#define IOMD_T0LATCH __IOMD(0x04c)
#define IOMD_T1CNTL __IOMD(0x050)
#define IOMD_T1LTCHL __IOMD(0x050)
#define IOMD_T1CNTH __IOMD(0x054)
#define IOMD_T1LTCHH __IOMD(0x054)
#define IOMD_T1GO __IOMD(0x058)
#define IOMD_T1LATCH __IOMD(0x05c)
#define IOMD_ROMCR0 __IOMD(0x080)
#define IOMD_ROMCR1 __IOMD(0x084)
#define IOMD_DRAMCR __IOMD(0x088)
#define IOMD_VREFCR __IOMD(0x08C)
#define IOMD_FSIZE __IOMD(0x090)
#define IOMD_ID0 __IOMD(0x094)
#define IOMD_ID1 __IOMD(0x098)
#define IOMD_VERSION __IOMD(0x09C)
#define IOMD_MOUSEX __IOMD(0x0A0)
#define IOMD_MOUSEY __IOMD(0x0A4)
#define IOMD_DMATCR __IOMD(0x0C0)
#define IOMD_IOTCR __IOMD(0x0C4)
#define IOMD_ECTCR __IOMD(0x0C8)
#define IOMD_DMAEXT __IOMD(0x0CC)
#define DMA_EXT_IO0 1
#define DMA_EXT_IO1 2
#define DMA_EXT_IO2 4
#define DMA_EXT_IO3 8
#define IOMD_IO0CURA __IOMD(0x100)
#define IOMD_IO0ENDA __IOMD(0x104)
#define IOMD_IO0CURB __IOMD(0x108)
#define IOMD_IO0ENDB __IOMD(0x10C)
#define IOMD_IO0CR __IOMD(0x110)
#define IOMD_IO0ST __IOMD(0x114)
#define IOMD_IO1CURA __IOMD(0x120)
#define IOMD_IO1ENDA __IOMD(0x124)
#define IOMD_IO1CURB __IOMD(0x128)
#define IOMD_IO1ENDB __IOMD(0x12C)
#define IOMD_IO1CR __IOMD(0x130)
#define IOMD_IO1ST __IOMD(0x134)
#define IOMD_IO2CURA __IOMD(0x140)
#define IOMD_IO2ENDA __IOMD(0x144)
#define IOMD_IO2CURB __IOMD(0x148)
#define IOMD_IO2ENDB __IOMD(0x14C)
#define IOMD_IO2CR __IOMD(0x150)
#define IOMD_IO2ST __IOMD(0x154)
#define IOMD_IO3CURA __IOMD(0x160)
#define IOMD_IO3ENDA __IOMD(0x164)
#define IOMD_IO3CURB __IOMD(0x168)
#define IOMD_IO3ENDB __IOMD(0x16C)
#define IOMD_IO3CR __IOMD(0x170)
#define IOMD_IO3ST __IOMD(0x174)
#define IOMD_SD0CURA __IOMD(0x180)
#define IOMD_SD0ENDA __IOMD(0x184)
#define IOMD_SD0CURB __IOMD(0x188)
#define IOMD_SD0ENDB __IOMD(0x18C)
#define IOMD_SD0CR __IOMD(0x190)
#define IOMD_SD0ST __IOMD(0x194)
#define IOMD_SD1CURA __IOMD(0x1A0)
#define IOMD_SD1ENDA __IOMD(0x1A4)
#define IOMD_SD1CURB __IOMD(0x1A8)
#define IOMD_SD1ENDB __IOMD(0x1AC)
#define IOMD_SD1CR __IOMD(0x1B0)
#define IOMD_SD1ST __IOMD(0x1B4)
#define IOMD_CURSCUR __IOMD(0x1C0)
#define IOMD_CURSINIT __IOMD(0x1C4)
#define IOMD_VIDCUR __IOMD(0x1D0)
#define IOMD_VIDEND __IOMD(0x1D4)
#define IOMD_VIDSTART __IOMD(0x1D8)
#define IOMD_VIDINIT __IOMD(0x1DC)
#define IOMD_VIDCR __IOMD(0x1E0)
#define IOMD_DMASTAT __IOMD(0x1F0)
#define IOMD_DMAREQ __IOMD(0x1F4)
#define IOMD_DMAMASK __IOMD(0x1F8)
#define DMA_END_S (1 << 31)
#define DMA_END_L (1 << 30)
#define DMA_CR_C 0x80
#define DMA_CR_D 0x40
#define DMA_CR_E 0x20
#define DMA_ST_OFL 4
#define DMA_ST_INT 2
#define DMA_ST_AB 1
/*
* IOC compatibility
*/
#define IOC_CONTROL IOMD_CONTROL
#define IOC_IRQSTATA IOMD_IRQSTATA
#define IOC_IRQREQA IOMD_IRQREQA
#define IOC_IRQCLRA IOMD_IRQCLRA
#define IOC_IRQMASKA IOMD_IRQMASKA
#define IOC_IRQSTATB IOMD_IRQSTATB
#define IOC_IRQREQB IOMD_IRQREQB
#define IOC_IRQMASKB IOMD_IRQMASKB
#define IOC_FIQSTAT IOMD_FIQSTAT
#define IOC_FIQREQ IOMD_FIQREQ
#define IOC_FIQMASK IOMD_FIQMASK
#define IOC_T0CNTL IOMD_T0CNTL
#define IOC_T0LTCHL IOMD_T0LTCHL
#define IOC_T0CNTH IOMD_T0CNTH
#define IOC_T0LTCHH IOMD_T0LTCHH
#define IOC_T0GO IOMD_T0GO
#define IOC_T0LATCH IOMD_T0LATCH
#define IOC_T1CNTL IOMD_T1CNTL
#define IOC_T1LTCHL IOMD_T1LTCHL
#define IOC_T1CNTH IOMD_T1CNTH
#define IOC_T1LTCHH IOMD_T1LTCHH
#define IOC_T1GO IOMD_T1GO
#define IOC_T1LATCH IOMD_T1LATCH
/*
* DMA (MEMC) compatibility
*/
#define HALF_SAM vram_half_sam
#define VDMA_ALIGNMENT (HALF_SAM * 2)
#define VDMA_XFERSIZE (HALF_SAM)
#define VDMA_INIT IOMD_VIDINIT
#define VDMA_START IOMD_VIDSTART
#define VDMA_END IOMD_VIDEND
#ifndef __ASSEMBLER__
extern unsigned int vram_half_sam;
#define video_set_dma(start,end,offset) \
do { \
outl (SCREEN_START + start, VDMA_START); \
outl (SCREEN_START + end - VDMA_XFERSIZE, VDMA_END); \
if (offset >= end - VDMA_XFERSIZE) \
offset |= 0x40000000; \
outl (SCREEN_START + offset, VDMA_INIT); \
} while (0)
#endif
#endif
#ifdef HAS_EXPMASK
#ifndef __ASSEMBLER__
#define __EXPMASK(offset) (((volatile unsigned char *)EXPMASK_BASE)[offset])
#else
#define __EXPMASK(offset) offset
#endif
#define EXPMASK_STATUS __EXPMASK(0x00)
#define EXPMASK_ENABLE __EXPMASK(0x04)
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/io.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/io.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: io.h
===================================================================
/*
* linux/include/asm-arm/io.h
*
* Copyright (C) 1996 Russell King
*
* Modifications:
* 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both
* constant addresses and variable addresses.
* 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture
* specific IO header files.
*/
#ifndef __ASM_ARM_IO_H
#define __ASM_ARM_IO_H
#include <asm/hardware.h>
#include <asm/arch/mmu.h>
#include <asm/arch/io.h>
/* unsigned long virt_to_phys(void *x) */
#define virt_to_phys(x) (__virt_to_phys((unsigned long)(x)))
/* void *phys_to_virt(unsigned long x) */
#define phys_to_virt(x) ((void *)(__phys_to_virt((unsigned long)(x))))
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x)))
#define bus_to_virt(x) ((void *)(__bus_to_virt(x)))
/*
* These macros actually build the multi-value IO function prototypes
*/
#define __OUTS(s,i,x) extern void outs##s(unsigned int port, const void *from, int len);
#define __INS(s,i,x) extern void ins##s(unsigned int port, void *to, int len);
#define __IO(s,i,x) \
__OUTS(s,i,x) \
__INS(s,i,x)
__IO(b,"b",char)
__IO(w,"h",short)
__IO(l,"",long)
/*
* Note that due to the way __builtin_constant_t() works, you
* - can't use it inside an inline function (it will never be true)
* - you don't have to worry about side effects withing the __builtin..
*/
#ifdef __outbc
#define outb(val,port) \
(__builtin_constant_p((port)) ? __outbc((val),(port)) : __outb((val),(port)))
#else
#define outb(val,port) __outb((val),(port))
#endif
#ifdef __outwc
#define outw(val,port) \
(__builtin_constant_p((port)) ? __outwc((val),(port)) : __outw((val),(port)))
#else
#define outw(val,port) __outw((val),(port))
#endif
#ifdef __outlc
#define outl(val,port) \
(__builtin_constant_p((port)) ? __outlc((val),(port)) : __outl((val),(port)))
#else
#define outl(val,port) __outl((val),(port))
#endif
#ifdef __inbc
#define inb(port) \
(__builtin_constant_p((port)) ? __inbc((port)) : __inb((port)))
#else
#define inb(port) __inb((port))
#endif
#ifdef __inwc
#define inw(port) \
(__builtin_constant_p((port)) ? __inwc((port)) : __inw((port)))
#else
#define inw(port) __inw((port))
#endif
#ifdef __inlc
#define inl(port) \
(__builtin_constant_p((port)) ? __inlc((port)) : __inl((port)))
#else
#define inl(port) __inl((port))
#endif
/*
* This macro will give you the translated IO address for this particular
* architecture, which can be used with the out_t... functions.
*/
#define ioaddr(port) \
(__builtin_constant_p((port)) ? __ioaddrc((port)) : __ioaddr((port)))
#ifndef ARCH_IO_DELAY
/*
* This architecture does not require any delayed IO.
* It is handled in the hardware.
*/
#define outb_p(val,port) outb((val),(port))
#define outw_p(val,port) outw((val),(port))
#define outl_p(val,port) outl((val),(port))
#define inb_p(port) inb((port))
#define inw_p(port) inw((port))
#define inl_p(port) inl((port))
#define outsb_p(port,from,len) outsb(port,from,len)
#define outsw_p(port,from,len) outsw(port,from,len)
#define outsl_p(port,from,len) outsl(port,from,len)
#define insb_p(port,to,len) insb(port,to,len)
#define insw_p(port,to,len) insw(port,to,len)
#define insl_p(port,to,len) insl(port,to,len)
#else
/*
* We have to delay the IO...
*/
#ifdef __outbc_p
#define outb_p(val,port) \
(__builtin_constant_p((port)) ? __outbc_p((val),(port)) : __outb_p((val),(port)))
#else
#define outb_p(val,port) __outb_p((val),(port))
#endif
#ifdef __outwc_p
#define outw_p(val,port) \
(__builtin_constant_p((port)) ? __outwc_p((val),(port)) : __outw_p((val),(port)))
#else
#define outw_p(val,port) __outw_p((val),(port))
#endif
#ifdef __outlc_p
#define outl_p(val,port) \
(__builtin_constant_p((port)) ? __outlc_p((val),(port)) : __outl_p((val),(port)))
#else
#define outl_p(val,port) __outl_p((val),(port))
#endif
#ifdef __inbc_p
#define inb_p(port) \
(__builtin_constant_p((port)) ? __inbc_p((port)) : __inb_p((port)))
#else
#define inb_p(port) __inb_p((port))
#endif
#ifdef __inwc_p
#define inw_p(port) \
(__builtin_constant_p((port)) ? __inwc_p((port)) : __inw_p((port)))
#else
#define inw_p(port) __inw_p((port))
#endif
#ifdef __inlc_p
#define inl_p(port) \
(__builtin_constant_p((port)) ? __inlc_p((port)) : __inl_p((port)))
#else
#define inl_p(port) __inl_p((port))
#endif
#endif
#undef ARCH_IO_DELAY
#undef ARCH_IO_CONSTANT
/*
* Leftovers...
*/
#if 0
#define __outwc(value,port) \
({ \
if (port < 256) \
__asm__ __volatile__( \
"strh %0, [%1, %2]" \
: : "r" (value), "r" (PCIO_BASE), "J" (port << 2)); \
else if (__PORT_PCIO(port)) \
__asm__ __volatile__( \
"strh %0, [%1, %2]" \
: : "r" (value), "r" (PCIO_BASE), "r" (port << 2)); \
else \
__asm__ __volatile__( \
"strh %0, [%1, %2]" \
: : "r" (value), "r" (IO_BASE), "r" (port << 2)); \
})
#define __inwc(port) \
({ \
unsigned short result; \
if (port < 256) \
__asm__ __volatile__( \
"ldrh %0, [%1, %2]" \
: "=r" (result) : "r" (PCIO_BASE), "J" (port << 2)); \
else \
if (__PORT_PCIO(port)) \
__asm__ __volatile__( \
"ldrh %0, [%1, %2]" \
: "=r" (result) : "r" (PCIO_BASE), "r" (port << 2)); \
else \
__asm__ __volatile__( \
"ldrh %0, [%1, %2]" \
: "=r" (result) : "r" (IO_BASE), "r" (port << 2)); \
result; \
})
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/ioctl.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/ioctl.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: ioctl.h
===================================================================
/* $Id: ioctl.h,v 1.1 2005/12/20 11:27:47 jcastillo Exp $
*
* linux/ioctl.h for Linux by H.H. Bergman.
*/
#ifndef _ASMARM_IOCTL_H
#define _ASMARM_IOCTL_H
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
* size of the parameter structure in the lower 14 bits of the
* upper 16 bits.
* Encoding the size of the parameter structure in the ioctl request
* is useful for catching programs compiled with old versions
* and to avoid overwriting user space outside the user buffer area.
* The highest 2 bits are reserved for indicating the ``access mode''.
* NOTE: This limits the max parameter size to 16kB -1 !
*/
/*
* The following is for compatibility across the various Linux
* platforms. The i386 ioctl numbering scheme doesn't really enforce
* a type field. De facto, however, the top 8 bits of the lower 16
* bits are indeed used as a type field, so we might just as well make
* this explicit here. Please be sure to use the decoding macros
* below from now on.
*/
#define _IOC_NRBITS 8
#define _IOC_TYPEBITS 8
#define _IOC_SIZEBITS 14
#define _IOC_DIRBITS 2
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
#define _IOC_NRSHIFT 0
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
/*
* Direction bits.
*/
#define _IOC_NONE 0U
#define _IOC_WRITE 1U
#define _IOC_READ 2U
#define _IOC(dir,type,nr,size) \
(((dir) << _IOC_DIRSHIFT) | \
((type) << _IOC_TYPESHIFT) | \
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
/* ...and for the drivers/sound files... */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
#endif /* _ASMARM_IOCTL_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/ioctls.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/ioctls.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: ioctls.h
===================================================================
#ifndef __ASM_ARM_IOCTLS_H
#define __ASM_ARM_IOCTLS_H
#include <asm/ioctl.h>
/* 0x54 is just a magic number to make these relatively unique ('T') */
#define TCGETS 0x5401
#define TCSETS 0x5402
#define TCSETSW 0x5403
#define TCSETSF 0x5404
#define TCGETA 0x5405
#define TCSETA 0x5406
#define TCSETAW 0x5407
#define TCSETAF 0x5408
#define TCSBRK 0x5409
#define TCXONC 0x540A
#define TCFLSH 0x540B
#define TIOCEXCL 0x540C
#define TIOCNXCL 0x540D
#define TIOCSCTTY 0x540E
#define TIOCGPGRP 0x540F
#define TIOCSPGRP 0x5410
#define TIOCOUTQ 0x5411
#define TIOCSTI 0x5412
#define TIOCGWINSZ 0x5413
#define TIOCSWINSZ 0x5414
#define TIOCMGET 0x5415
#define TIOCMBIS 0x5416
#define TIOCMBIC 0x5417
#define TIOCMSET 0x5418
#define TIOCGSOFTCAR 0x5419
#define TIOCSSOFTCAR 0x541A
#define FIONREAD 0x541B
#define TIOCINQ FIONREAD
#define TIOCLINUX 0x541C
#define TIOCCONS 0x541D
#define TIOCGSERIAL 0x541E
#define TIOCSSERIAL 0x541F
#define TIOCPKT 0x5420
#define FIONBIO 0x5421
#define TIOCNOTTY 0x5422
#define TIOCSETD 0x5423
#define TIOCGETD 0x5424
#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
#define TIOCSBRK 0x5427 /* BSD compatibility */
#define TIOCCBRK 0x5428 /* BSD compatibility */
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
#define FIOASYNC 0x5452
#define TIOCSERCONFIG 0x5453
#define TIOCSERGWILD 0x5454
#define TIOCSERSWILD 0x5455
#define TIOCGLCKTRMIOS 0x5456
#define TIOCSLCKTRMIOS 0x5457
#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
#define TIOCSERGETLSR 0x5459 /* Get line status register */
#define TIOCSERGETMULTI 0x545A /* Get multiport config */
#define TIOCSERSETMULTI 0x545B /* Set multiport config */
#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
/* Used for packet mode */
#define TIOCPKT_DATA 0
#define TIOCPKT_FLUSHREAD 1
#define TIOCPKT_FLUSHWRITE 2
#define TIOCPKT_STOP 4
#define TIOCPKT_START 8
#define TIOCPKT_NOSTOP 16
#define TIOCPKT_DOSTOP 32
#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/irq.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/irq.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: irq.h
===================================================================
#ifndef __ASM_ARM_IRQ_H
#define __ASM_ARM_IRQ_H
#include <asm/arch/irqs.h>
#ifndef NR_IRQS
#define NR_IRQS 128
#endif
/*
* Use this value to indicate lack of interrupt
* capability
*/
#ifndef NO_IRQ
#define NO_IRQ 255
#endif
extern void disable_irq(unsigned int);
extern void enable_irq(unsigned int);
#define __STR(x) #x
#define STR(x) __STR(x)
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/limits.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/limits.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: limits.h
===================================================================
#ifndef __ASM_PIPE_H
#define __ASM_PIPE_H
#ifndef PAGE_SIZE
#include <asm/page.h>
#endif
#define PIPE_BUF PAGE_SIZE
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/mman.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/mman.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: mman.h
===================================================================
#ifndef __ARM_MMAN_H__
#define __ARM_MMAN_H__
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */
#define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */
#define MAP_TYPE 0x0f /* Mask for type of mapping */
#define MAP_FIXED 0x10 /* Interpret addr exactly */
#define MAP_ANONYMOUS 0x20 /* don't use a file */
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
#define MAP_EXECUTABLE 0x1000 /* mark it as a executable */
#define MAP_LOCKED 0x2000 /* pages are locked */
#define MS_ASYNC 1 /* sync memory asynchronously */
#define MS_INVALIDATE 2 /* invalidate the caches */
#define MS_SYNC 4 /* synchronous memory sync */
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
#endif /* __ARM_MMAN_H__ */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/mmu_context.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/mmu_context.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: mmu_context.h
===================================================================
/*
* linux/include/asm-arm/mmu_context.h
*
* Copyright (c) 1996 Russell King.
*
* Changelog:
* 27-06-1996 RMK Created
*/
#ifndef __ASM_ARM_MMU_CONTEXT_H
#define __ASM_ARM_MMU_CONTEXT_H
#define get_mmu_context(x) do { } while (0)
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/page.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/page.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: page.h
===================================================================
#include <asm/proc/page.h>
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/param.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/param.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: param.h
===================================================================
#include <asm/proc/param.h>
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/pgtable.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/pgtable.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: pgtable.h
===================================================================
#include <asm/proc-fns.h>
#include <asm/proc/pgtable.h>
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/posix_types.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/posix_types.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: posix_types.h
===================================================================
/*
* linux/include/asm-arm/posix_types.h
*
* Copyright (c) 1996 Russell King.
*
* Changelog:
* 27-06-1996 RMK Created
*/
#ifndef __ARCH_ARM_POSIX_TYPES_H
#define __ARCH_ARM_POSIX_TYPES_H
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used.
*/
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
#endif
typedef struct {
int val[2];
} __kernel_fsid_t;
#undef __FD_SET
#define __FD_SET(fd, fdsetp) \
(((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
#undef __FD_CLR
#define __FD_CLR(fd, fdsetp) \
(((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
#undef __FD_ISSET
#define __FD_ISSET(fd, fdsetp) \
((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) \
(memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp)))
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/proc-fns.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/proc-fns.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: proc-fns.h
===================================================================
/*
* linux/include/asm-arm/proc-fns.h
*
* Copyright (C) 1997 Russell King
*/
#ifndef __ASM_PROCFNS_H
#define __ASM_PROCFNS_H
#include <asm/page.h>
#ifdef __KERNEL__
/*
* Don't change this structure
*/
extern struct processor {
const char *name;
/* MISC
*
* flush caches for task switch
*/
void (*_switch_to)(void *prev, void *next);
/*
* get data abort address/flags
*/
void (*_data_abort)(unsigned long pc);
/*
* check for any bugs
*/
void (*_check_bugs)(void);
/*
* Set up any processor specifics
*/
void (*_proc_init)(void);
/*
* Disable any processor specifics
*/
void (*_proc_fin)(void);
/*
* Processor architecture specific
*/
union {
struct {
/* CACHE
*
* flush all caches
*/
void (*_flush_cache_all)(void);
/*
* flush a specific page or pages
*/
void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags);
/*
* flush cache entry for an address
*/
void (*_flush_cache_entry)(unsigned long address);
/*
* flush a virtual address used for a page table
* note D-cache only!
*/
void (*_flush_cache_pte)(unsigned long address);
/*
* flush a page to RAM
*/
void (*_flush_ram_page)(unsigned long page);
/* TLB
*
* flush all TLBs
*/
void (*_flush_tlb_all)(void);
/*
* flush a specific TLB
*/
void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags);
/*
* Set a PMD (handling IMP bit 4)
*/
void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd);
/*
* Special stuff for a reset
*/
unsigned long (*reset)(void);
} armv3v4;
struct {
/* MEMC
*
* remap memc tables
*/
void (*_remap_memc)(void *tsk);
/*
* update task's idea of mmap
*/
void (*_update_map)(void *tsk);
/*
* update task's idea after abort
*/
void (*_update_mmu_cache)(void *vma, unsigned long addr, pte_t pte);
/* XCHG
*/
unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr);
unsigned long (*_xchg_2)(unsigned long x, volatile void *ptr);
unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr);
} armv2;
} u;
} processor;
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/processor.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/processor.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: processor.h
===================================================================
/*
* include/asm-arm/processor.h
*
* Copyright (C) 1995 Russell King
*/
#ifndef __ASM_ARM_PROCESSOR_H
#define __ASM_ARM_PROCESSOR_H
struct fp_hard_struct {
unsigned int save[140/4]; /* as yet undefined */
};
struct fp_soft_struct {
unsigned int save[140/4]; /* undefined information */
};
union fp_state {
struct fp_hard_struct hard;
struct fp_soft_struct soft;
};
#define DECLARE_THREAD_STRUCT \
struct thread_struct { \
unsigned long fs; /* simulated fs */ \
unsigned long address; /* Address of fault */ \
unsigned long trap_no; /* Trap number */ \
unsigned long error_code; /* Error code of trap */ \
union fp_state fpstate; /* FPE save state */ \
EXTRA_THREAD_STRUCT \
}
#include <asm/arch/processor.h>
#include <asm/proc/processor.h>
#define INIT_TSS { \
0, \
0, \
0, \
0, \
{ { { 0, }, }, }, \
EXTRA_THREAD_STRUCT_INIT \
}
#define MAX_USER_ADDR TASK_SIZE
#define MMAP_SEARCH_START (TASK_SIZE/3)
#endif /* __ASM_ARM_PROCESSOR_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/procinfo.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/procinfo.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: procinfo.h
===================================================================
/*
* linux/include/asm-arm/procinfo.h
*
* Copyright (C) 1996 Russell King
*/
#ifndef __ASM_PROCINFO_H
#define __ASM_PROCINFO_H
#include <asm/proc-fns.h>
#define F_MEMC (1<<0)
#define F_MMU (1<<1)
#define F_32BIT (1<<2)
#define F_CACHE (1<<3)
#define F_IOEB (1<<31)
#ifndef __ASSEMBLER__
struct armversions {
unsigned long id;
unsigned long mask;
unsigned long features;
const char *manu;
const char *name;
const struct processor *proc;
};
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/ptrace.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/ptrace.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: ptrace.h
===================================================================
#ifndef __ASM_ARM_PTRACE_H
#define __ASM_ARM_PTRACE_H
#include <asm/proc/ptrace.h>
#ifdef __KERNEL__
extern void show_regs(struct pt_regs *);
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/resource.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/resource.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: resource.h
===================================================================
#ifndef _ARM_RESOURCE_H
#define _ARM_RESOURCE_H
/*
* Resource limits
*/
#define RLIMIT_CPU 0 /* CPU time in ms */
#define RLIMIT_FSIZE 1 /* Maximum filesize */
#define RLIMIT_DATA 2 /* max data size */
#define RLIMIT_STACK 3 /* max stack size */
#define RLIMIT_CORE 4 /* max core file size */
#define RLIMIT_RSS 5 /* max resident set size */
#define RLIMIT_NPROC 6 /* max number of processes */
#define RLIMIT_NOFILE 7 /* max number of open files */
#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space*/
#define RLIMIT_AS 9 /* address space limit */
#define RLIM_NLIMITS 10
#ifdef __KERNEL__
#define INIT_RLIMITS \
{ \
{ LONG_MAX, LONG_MAX }, \
{ LONG_MAX, LONG_MAX }, \
{ LONG_MAX, LONG_MAX }, \
{ _STK_LIM, _STK_LIM }, \
{ 0, LONG_MAX }, \
{ LONG_MAX, LONG_MAX }, \
{ MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \
{ NR_OPEN, NR_OPEN }, \
{ LONG_MAX, LONG_MAX }, \
{ LONG_MAX, LONG_MAX }, \
}
#endif /* __KERNEL__ */
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/segment.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/segment.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: segment.h
===================================================================
#ifndef __ASM_ARM_SEGMENT_H
#define __ASM_ARM_SEGMENT_H
#define KERNEL_CS 0x0
#define KERNEL_DS 0x0
#define USER_CS 0x1
#define USER_DS 0x1
#ifndef __ASSEMBLY__
#ifdef NO_INLINE
#define __INLINE__
#else
#define __INLINE__ inline
#endif
#include <linux/sched.h>
/*
* A better way to do this might be to pass to put/get user a flag
* indicating the possibility of kernel memory accesses... That
* would allow gcc to optimize the following routines a bit better
* than that which is possible at the moment.
*/
#define IS_USER_SEG (current->tss.fs != KERNEL_DS)
/*
* Uh, these should become the main single-value transfer routines..
* They automatically use the right size if we just have the right
* pointer type..
*/
#define put_user(x,ptr) __put_user((unsigned long)(x),(ptr),sizeof(*(ptr)))
#define get_user(ptr) ((__typeof__(*(ptr)))__get_user((ptr),sizeof(*(ptr))))
/*
* This is a silly but good way to make sure that
* the __put_user function is indeed always optimized,
* and that we use the correct sizes..
*/
extern int bad_user_access_length(void);
#ifdef __KERNEL__
#include <asm/proc/segment.h>
/*
* these are depreciated..
*/
static __INLINE__ unsigned char get_user_byte(const char *addr)
{
return __get_user(addr, 1);
}
#define get_fs_byte(addr) get_user_byte((char *)(addr))
static __INLINE__ unsigned short get_user_word(const short *addr)
{
return __get_user(addr, 2);
}
#define get_fs_word(addr) get_user_word((short *)(addr))
static __INLINE__ unsigned long get_user_long(const long *addr)
{
return __get_user(addr, 4);
}
#define get_fs_long(addr) get_user_long((long *)(addr))
static __INLINE__ void put_user_byte(char val,char *addr)
{
__put_user(val, addr, 1);
}
#define put_fs_byte(x,addr) put_user_byte((x),(char *)(addr))
static __INLINE__ void put_user_word(short val,short *addr)
{
__put_user(val, addr, 2);
}
#define put_fs_word(x,addr) put_user_word((x),(short *)(addr))
static __INLINE__ void put_user_long(long val,long *addr)
{
__put_user(val, addr, 4);
}
#define put_fs_long(x,addr) put_user_long((x),(long *)(addr))
extern void memcpy_fromfs(void * to, const void * from, unsigned long n);
extern void __memcpy_tofs(void * to, const void * from, unsigned long n);
static __INLINE__ void memcpy_tofs(void *to, const void *from, unsigned long n)
{
if(IS_USER_SEG)
__memcpy_tofs(to, from, n);
else
memcpy(to, from, n);
}
static inline unsigned long get_fs(void)
{
return current->tss.fs;
}
static inline unsigned long get_ds(void)
{
return KERNEL_DS;
}
static inline void set_fs(unsigned long val)
{
current->tss.fs = val;
}
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* __ASM_ARM_SEGMENT_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/semaphore.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/semaphore.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: semaphore.h
===================================================================
/*
* linux/include/asm-arm/semaphore.h
*
*
*/
#ifndef __ASM_ARM_SEMAPHORE_H
#define __ASM_ARM_SEMAPHORE_H
#include <linux/linkage.h>
struct semaphore {
int count;
int waking;
int lock;
struct wait_queue * wait;
};
#define MUTEX ((struct semaphore) { 1, 0, 0, NULL })
#define MUTEX_LOCKED ((struct semaphore) { 0, 0, 0, NULL })
extern void __down (struct semaphore *sem);
extern void __up (struct semaphore *sem);
extern int __down_interruptible (struct semaphore *sem);
/* Primitives to spin on a lock. Needed only for SMP version.
*/
extern inline void get_buzz_lock (int *lock_ptr)
{
#ifdef __SMP__
while (xchg(lock_ptr,1) != 0);
#endif
}
extern inline void give_buzz_lock (int *lock_ptr)
{
#ifdef __SMP__
*lock_ptr = 0;
#endif
}
#ifdef __arm__
#include <asm/proc/semaphore.h>
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/serial.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/serial.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: serial.h
===================================================================
/*
* linux/include/asm-arm/serial.h
*
* Copyright (c) 1996 Russell King.
*
* Changelog:
* 15-10-1996 RMK Created
*/
#ifndef __ASM_SERIAL_H
#define __ASM_SERIAL_H
#include <asm/arch/serial.h>
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/setup.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/setup.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: setup.h
===================================================================
/*
* include/asm/setup.h
*
* Structure passed to kernel to tell it about the hardware it's running on
*
* Copyright (C) 1997,1998 Russell King
*/
#ifndef __ASMARM_SETUP_H
#define __ASMARM_SETUP_H
struct param_struct {
union {
struct {
unsigned long page_size; /* 0 */
unsigned long nr_pages; /* 4 */
unsigned long ramdisk_size; /* 8 */
unsigned long flags; /* 12 */
#define FLAG_READONLY 1
#define FLAG_RDLOAD 4
#define FLAG_RDPROMPT 8
unsigned long rootdev; /* 16 */
unsigned long video_num_cols; /* 20 */
unsigned long video_num_rows; /* 24 */
unsigned long video_x; /* 28 */
unsigned long video_y; /* 32 */
unsigned long bytes_per_char_h; /* 36 */
unsigned long bytes_per_char_v; /* 40 */
unsigned long initrd_start; /* 44 */
unsigned long initrd_size; /* 48 */
unsigned long rd_start; /* 52 */
} s;
char unused[256];
} u1;
union {
char paths[8][128];
struct {
unsigned long magic;
char n[1024 - sizeof(unsigned long)];
} s;
} u2;
char commandline[256];
};
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/shmparam.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/shmparam.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: shmparam.h
===================================================================
#ifndef _ASMARM_SHMPARAM_H
#define _ASMARM_SHMPARAM_H
/*
* Include the machine specific shm parameters before the processor
* dependent parameters so that the machine parameters can override
* the processor parameters
*/
#include <asm/arch/shmparam.h>
#include <asm/proc/shmparam.h>
/*
* Format of a swap-entry for shared memory pages currently out in
* swap space (see also mm/swap.c).
*
* SWP_TYPE = SHM_SWP_TYPE
* SWP_OFFSET is used as follows:
*
* bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
* bits 7..21: index of page within shared memory segment (SHM_IDX)
* (actually fewer bits get used since SHMMAX is so low)
*/
/*
* Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
* there is a static array of size SHMMNI.
*/
#define _SHM_ID_BITS 7
#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
#define SHM_IDX_SHIFT (_SHM_ID_BITS)
#define _SHM_IDX_BITS 15
#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
/*
* _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
* SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
*/
#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
#define SHMALL /* max shm system wide (pages) */ \
(1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
#define SHMSEG SHMMNI /* max shared segs per process */
#endif /* _ASMARM_SHMPARAM_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/sigcontext.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/sigcontext.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: sigcontext.h
===================================================================
#ifndef _ASMARM_SIGCONTEXT_H
#define _ASMARM_SIGCONTEXT_H
#include <asm/ptrace.h>
struct sigcontext_struct {
unsigned long magic;
struct pt_regs reg;
unsigned long trap_no;
unsigned long error_code;
unsigned long oldmask;
};
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/signal.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/signal.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: signal.h
===================================================================
#ifndef _ASMARM_SIGNAL_H
#define _ASMARM_SIGNAL_H
typedef unsigned long sigset_t; /* at least 32 bits */
#define _NSIG 32
#define NSIG _NSIG
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
#define SIGPOLL SIGIO
/*
#define SIGLOST 29
*/
#define SIGPWR 30
#define SIGUNUSED 31
/*
* sa_flags values: SA_STACK is not currently supported, but will allow the
* usage of signal stacks by using the (now obsolete) sa_restorer field in
* the sigaction structure as a stack pointer. This is now possible due to
* the changes in signal handling. LBT 010493.
* SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
* SA_RESTART flag to get restarting signals (which were the default long ago)
* SA_SHIRQ flag is for shared interrupt.
*/
#define SA_NOCLDSTOP 1
#define SA_SHIRQ 0x04000000
#define SA_STACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_INTERRUPT 0x20000000
#define SA_NOMASK 0x40000000
#define SA_ONESHOT 0x80000000
#ifdef __KERNEL__
/*
* These values of sa_flags are used only by the kernel as part of the
* irq handling routines.
*
* SA_INTERRUPT is also used by the irq handling routines.
*/
#define SA_PROBE SA_ONESHOT
#define SA_SAMPLE_RANDOM SA_RESTART
#endif
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
/* Type of a signal handler. */
typedef void (*__sighandler_t)(int);
#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
struct sigaction {
__sighandler_t sa_handler;
sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#endif
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/socket.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/socket.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: socket.h
===================================================================
#ifndef _ASMARM_SOCKET_H
#define _ASMARM_SOCKET_H
/* Socket-level I/O control calls. */
#define FIOSETOWN 0x8901
#define SIOCSPGRP 0x8902
#define FIOGETOWN 0x8903
#define SIOCGPGRP 0x8904
#define SIOCATMARK 0x8905
#define SIOCGSTAMP 0x8906 /* Get stamp */
/* For setsockoptions(2) */
#define SOL_SOCKET 1
#define SO_DEBUG 1
#define SO_REUSEADDR 2
#define SO_TYPE 3
#define SO_ERROR 4
#define SO_DONTROUTE 5
#define SO_BROADCAST 6
#define SO_SNDBUF 7
#define SO_RCVBUF 8
#define SO_KEEPALIVE 9
#define SO_OOBINLINE 10
#define SO_NO_CHECK 11
#define SO_PRIORITY 12
#define SO_LINGER 13
#define SO_BSDCOMPAT 14
/* To add :#define SO_REUSEPORT 15 */
#define SO_BINDTODEVICE 25
#endif /* _ASM_SOCKET_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/sockios.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/sockios.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: sockios.h
===================================================================
#ifndef __ARCH_ARM_SOCKIOS_H
#define __ARCH_ARM_SOCKIOS_H
/* Socket-level I/O control calls. */
#define FIOSETOWN 0x8901
#define SIOCSPGRP 0x8902
#define FIOGETOWN 0x8903
#define SIOCGPGRP 0x8904
#define SIOCATMARK 0x8905
#define SIOCGSTAMP 0x8906 /* Get stamp */
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/stat.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/stat.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: stat.h
===================================================================
#ifndef _ASMARM_STAT_H
#define _ASMARM_STAT_H
struct old_stat {
unsigned short st_dev;
unsigned short st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned short st_rdev;
unsigned long st_size;
unsigned long st_atime;
unsigned long st_mtime;
unsigned long st_ctime;
};
struct new_stat {
unsigned short st_dev;
unsigned short __pad1;
unsigned long st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned short st_rdev;
unsigned short __pad2;
unsigned long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
unsigned long st_atime;
unsigned long __unused1;
unsigned long st_mtime;
unsigned long __unused2;
unsigned long st_ctime;
unsigned long __unused3;
unsigned long __unused4;
unsigned long __unused5;
};
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/statfs.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/statfs.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: statfs.h
===================================================================
#ifndef _ASMARM_STATFS_H
#define _ASMARM_STATFS_H
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef __kernel_fsid_t fsid_t;
#endif
struct statfs {
long f_type;
long f_bsize;
long f_blocks;
long f_bfree;
long f_bavail;
long f_files;
long f_ffree;
__kernel_fsid_t f_fsid;
long f_namelen;
long f_spare[6];
};
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/string.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/string.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: string.h
===================================================================
#ifndef __ASM_ARM_STRING_H
#define __ASM_ARM_STRING_H
/*
* inline versions, hmm...
*/
#define __HAVE_ARCH_STRRCHR
extern char * strrchr(const char * s, int c);
#define __HAVE_ARCH_MEMCPY
#define __HAVE_ARCH_MEMMOVE
#define __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMZERO
extern void memzero(void *ptr, int n);
extern void memsetl (unsigned long *, unsigned long, int n);
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/system.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/system.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: system.h
===================================================================
#ifndef __ASM_ARM_SYSTEM_H
#define __ASM_ARM_SYSTEM_H
#include <linux/kernel.h>
#include <asm/proc-fns.h>
extern void arm_malalignedptr(const char *, void *, volatile void *);
extern void arm_invalidptr(const char *, int);
#define xchg(ptr,x) \
((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
#define tas(ptr) (xchg((ptr),1))
/*
* switch_to(prev, next) should switch from task `prev' to `next'
* `prev' will never be the same as `next'.
*
* `next' and `prev' should be struct task_struct, but it isn't always defined
*/
#define switch_to(prev,next) processor._switch_to(prev,next)
/*
* Include processor dependent parts
*/
#include <asm/proc/system.h>
#include <asm/arch/system.h>
#define mb() __asm__ __volatile__ ("" : : : "memory")
#define nop() __asm__ __volatile__("mov r0,r0\n\t");
extern asmlinkage void __backtrace(void);
#endif
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/termbits.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/termbits.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: termbits.h
===================================================================
#ifndef __ASM_ARM_TERMBITS_H
#define __ASM_ARM_TERMBITS_H
#include <linux/posix_types.h>
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#define NCCS 19
struct termios {
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
};
/* c_cc characters */
#define VINTR 0
#define VQUIT 1
#define VERASE 2
#define VKILL 3
#define VEOF 4
#define VTIME 5
#define VMIN 6
#define VSWTC 7
#define VSTART 8
#define VSTOP 9
#define VSUSP 10
#define VEOL 11
#define VREPRINT 12
#define VDISCARD 13
#define VWERASE 14
#define VLNEXT 15
#define VEOL2 16
/* c_iflag bits */
#define IGNBRK 0000001
#define BRKINT 0000002
#define IGNPAR 0000004
#define PARMRK 0000010
#define INPCK 0000020
#define ISTRIP 0000040
#define INLCR 0000100
#define IGNCR 0000200
#define ICRNL 0000400
#define IUCLC 0001000
#define IXON 0002000
#define IXANY 0004000
#define IXOFF 0010000
#define IMAXBEL 0020000
/* c_oflag bits */
#define OPOST 0000001
#define OLCUC 0000002
#define ONLCR 0000004
#define OCRNL 0000010
#define ONOCR 0000020
#define ONLRET 0000040
#define OFILL 0000100
#define OFDEL 0000200
#define NLDLY 0000400
#define NL0 0000000
#define NL1 0000400
#define CRDLY 0003000
#define CR0 0000000
#define CR1 0001000
#define CR2 0002000
#define CR3 0003000
#define TABDLY 0014000
#define TAB0 0000000
#define TAB1 0004000
#define TAB2 0010000
#define TAB3 0014000
#define XTABS 0014000
#define BSDLY 0020000
#define BS0 0000000
#define BS1 0020000
#define VTDLY 0040000
#define VT0 0000000
#define VT1 0040000
#define FFDLY 0100000
#define FF0 0000000
#define FF1 0100000
/* c_cflag bit meaning */
#define CBAUD 0010017
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
#define B110 0000003
#define B134 0000004
#define B150 0000005
#define B200 0000006
#define B300 0000007
#define B600 0000010
#define B1200 0000011
#define B1800 0000012
#define B2400 0000013
#define B4800 0000014
#define B9600 0000015
#define B19200 0000016
#define B38400 0000017
#define EXTA B19200
#define EXTB B38400
#define CSIZE 0000060
#define CS5 0000000
#define CS6 0000020
#define CS7 0000040
#define CS8 0000060
#define CSTOPB 0000100
#define CREAD 0000200
#define PARENB 0000400
#define PARODD 0001000
#define HUPCL 0002000
#define CLOCAL 0004000
#define CBAUDEX 0010000
#define B57600 0010001
#define B115200 0010002
#define B230400 0010003
#define B460800 0010004
#define CIBAUD 002003600000 /* input baud rate (not used) */
#define CRTSCTS 020000000000 /* flow control */
/* c_lflag bits */
#define ISIG 0000001
#define ICANON 0000002
#define XCASE 0000004
#define ECHO 0000010
#define ECHOE 0000020
#define ECHOK 0000040
#define ECHONL 0000100
#define NOFLSH 0000200
#define TOSTOP 0000400
#define ECHOCTL 0001000
#define ECHOPRT 0002000
#define ECHOKE 0004000
#define FLUSHO 0010000
#define PENDIN 0040000
#define IEXTEN 0100000
/* tcflow() and TCXONC use these */
#define TCOOFF 0
#define TCOON 1
#define TCIOFF 2
#define TCION 3
/* tcflush() and TCFLSH use these */
#define TCIFLUSH 0
#define TCOFLUSH 1
#define TCIOFLUSH 2
/* tcsetattr uses these */
#define TCSANOW 0
#define TCSADRAIN 1
#define TCSAFLUSH 2
#endif /* __ASM_ARM_TERMBITS_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/termios.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/termios.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: termios.h
===================================================================
#ifndef __ASM_ARM_TERMIOS_H
#define __ASM_ARM_TERMIOS_H
#include <asm/termbits.h>
#include <asm/ioctls.h>
struct winsize {
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel;
unsigned short ws_ypixel;
};
#define NCC 8
struct termio {
unsigned short c_iflag; /* input mode flags */
unsigned short c_oflag; /* output mode flags */
unsigned short c_cflag; /* control mode flags */
unsigned short c_lflag; /* local mode flags */
unsigned char c_line; /* line discipline */
unsigned char c_cc[NCC]; /* control characters */
};
#ifdef __KERNEL__
/* intr=^C quit=^| erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0
start=^Q stop=^S susp=^Z eol=\0
reprint=^R discard=^U werase=^W lnext=^V
eol2=\0
*/
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
#endif
/* modem lines */
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004
#define TIOCM_ST 0x008
#define TIOCM_SR 0x010
#define TIOCM_CTS 0x020
#define TIOCM_CAR 0x040
#define TIOCM_RNG 0x080
#define TIOCM_DSR 0x100
#define TIOCM_CD TIOCM_CAR
#define TIOCM_RI TIOCM_RNG
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
/* line disciplines */
#define N_TTY 0
#define N_SLIP 1
#define N_MOUSE 2
#define N_PPP 3
#define N_STRIP 4
#define N_AX25 5
#ifdef __KERNEL__
#include <linux/string.h>
/*
* Translate a "termio" structure into a "termios". Ugh.
*/
extern inline void trans_from_termio(struct termio * termio,
struct termios * termios)
{
#define SET_LOW_BITS(x,y) (*(unsigned short *)(&x) = (y))
SET_LOW_BITS(termios->c_iflag, termio->c_iflag);
SET_LOW_BITS(termios->c_oflag, termio->c_oflag);
SET_LOW_BITS(termios->c_cflag, termio->c_cflag);
SET_LOW_BITS(termios->c_lflag, termio->c_lflag);
#undef SET_LOW_BITS
memcpy(termios->c_cc, termio->c_cc, NCC);
}
/*
* Translate a "termios" structure into a "termio". Ugh.
*/
extern inline void trans_to_termio(struct termios * termios,
struct termio * termio)
{
termio->c_iflag = termios->c_iflag;
termio->c_oflag = termios->c_oflag;
termio->c_cflag = termios->c_cflag;
termio->c_lflag = termios->c_lflag;
termio->c_line = termios->c_line;
memcpy(termio->c_cc, termios->c_cc, NCC);
}
#endif /* __KERNEL__ */
#endif /* __ASM_ARM_TERMIOS_H */
1.1 or1k/rc203soc/sw/uClinux/include/asm-armnommu/types.h
http://www.opencores.org/cvsweb.shtml/or1k/rc203soc/sw/uClinux/include/asm-armnommu/types.h?rev=1.1&content-type=text/x-cvsweb-markup
Index: types.h
===================================================================
#ifndef __ASM_ARM_TYPES_H
#define __ASM_ARM_TYPES_H
typedef unsigned short umode_t;
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
|