| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 | /* * This file is subject to the terms and conditions of the GNU General Public * License.  See the file "COPYING" in the main directory of this archive * for more details. * * ARC firmware interface defines. * * Copyright (C) 1996 David S. Miller (davem@davemloft.net) * Copyright (C) 1999, 2001 Ralf Baechle (ralf@gnu.org) * Copyright (C) 1999 Silicon Graphics, Inc. */#ifndef _ASM_SGIARCS_H#define _ASM_SGIARCS_H#include <asm/types.h>#include <asm/fw/arc/types.h>/* Various ARCS error codes. */#define PROM_ESUCCESS                   0x00#define PROM_E2BIG                      0x01#define PROM_EACCESS                    0x02#define PROM_EAGAIN                     0x03#define PROM_EBADF                      0x04#define PROM_EBUSY                      0x05#define PROM_EFAULT                     0x06#define PROM_EINVAL                     0x07#define PROM_EIO                        0x08#define PROM_EISDIR                     0x09#define PROM_EMFILE                     0x0a#define PROM_EMLINK                     0x0b#define PROM_ENAMETOOLONG               0x0c#define PROM_ENODEV                     0x0d#define PROM_ENOENT                     0x0e#define PROM_ENOEXEC                    0x0f#define PROM_ENOMEM                     0x10#define PROM_ENOSPC                     0x11#define PROM_ENOTDIR                    0x12#define PROM_ENOTTY                     0x13#define PROM_ENXIO                      0x14#define PROM_EROFS                      0x15/* SGI ARCS specific errno's. */#define PROM_EADDRNOTAVAIL              0x1f#define PROM_ETIMEDOUT                  0x20#define PROM_ECONNABORTED               0x21#define PROM_ENOCONNECT                 0x22/* Device classes, types, and identifiers for prom * device inventory queries. */enum linux_devclass {	system, processor, cache, adapter, controller, peripheral, memory};enum linux_devtypes {	/* Generic stuff. */	Arc, Cpu, Fpu,	/* Primary insn and data caches. */	picache, pdcache,	/* Secondary insn, data, and combined caches. */	sicache, sdcache, sccache,	memdev, eisa_adapter, tc_adapter, scsi_adapter, dti_adapter,	multifunc_adapter, dsk_controller, tp_controller, cdrom_controller,	worm_controller, serial_controller, net_controller, disp_controller,	parallel_controller, ptr_controller, kbd_controller, audio_controller,	misc_controller, disk_peripheral, flpy_peripheral, tp_peripheral,	modem_peripheral, monitor_peripheral, printer_peripheral,	ptr_peripheral, kbd_peripheral, term_peripheral, line_peripheral,	net_peripheral, misc_peripheral, anon};enum linux_identifier {	bogus, ronly, removable, consin, consout, input, output};/* A prom device tree component. */struct linux_component {	enum linux_devclass     class;	/* node class */	enum linux_devtypes     type;	/* node type */	enum linux_identifier   iflags;	/* node flags */	USHORT 			vers;	/* node version */	USHORT 			rev;	/* node revision */	ULONG 			key;	/* completely magic */	ULONG 			amask;	/* XXX affinity mask??? */	ULONG			cdsize;	/* size of configuration data */	ULONG			ilen;	/* length of string identifier */	_PULONG			iname;	/* string identifier */};typedef struct linux_component pcomponent;struct linux_sysid {	char vend[8], prod[8];};/* ARCS prom memory descriptors. */enum arcs_memtypes {	arcs_eblock,  /* exception block */	arcs_rvpage,  /* ARCS romvec page */	arcs_fcontig, /* Contiguous and free */	arcs_free,    /* Generic free memory */	arcs_bmem,    /* Borken memory, don't use */	arcs_prog,    /* A loaded program resides here */	arcs_atmp,    /* ARCS temporary storage area, wish Sparc OpenBoot told this */	arcs_aperm,   /* ARCS permanent storage... */};/* ARC has slightly different types than ARCS */enum arc_memtypes {	arc_eblock,  /* exception block */	arc_rvpage,  /* romvec page */	arc_free,    /* Generic free memory */	arc_bmem,    /* Borken memory, don't use */	arc_prog,    /* A loaded program resides here */	arc_atmp,    /* temporary storage area */	arc_aperm,   /* permanent storage */	arc_fcontig, /* Contiguous and free */};union linux_memtypes {    enum arcs_memtypes arcs;    enum arc_memtypes arc;};struct linux_mdesc {	union linux_memtypes type;	ULONG base;	ULONG pages;};/* Time of day descriptor. */struct linux_tinfo {	unsigned short yr;	unsigned short mnth;	unsigned short day;	unsigned short hr;	unsigned short min;	unsigned short sec;	unsigned short msec;};/* ARCS virtual dirents. */struct linux_vdirent {	ULONG namelen;	unsigned char attr;	char fname[32]; /* XXX imperical, should be a define */};/* Other stuff for files. */enum linux_omode {	rdonly, wronly, rdwr, wronly_creat, rdwr_creat,	wronly_ssede, rdwr_ssede, dirent, dirent_creat};enum linux_seekmode {	absolute, relative};enum linux_mountops {	media_load, media_unload};/* This prom has a bolixed design. */struct linux_bigint {#ifdef __MIPSEL__	u32 lo;	s32 hi;
 |