summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/arc/env.c8
-rw-r--r--include/asm-mips/arc/types.h72
-rw-r--r--include/asm-mips/sgialib.h12
-rw-r--r--include/asm-mips/sgiarcs.h13
4 files changed, 90 insertions, 15 deletions
diff --git a/arch/mips/arc/env.c b/arch/mips/arc/env.c
index 8132442d5..193e9dd08 100644
--- a/arch/mips/arc/env.c
+++ b/arch/mips/arc/env.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id: env.c,v 1.1 1998/10/18 13:32:08 tsbogend Exp $
+ * $Id: env.c,v 1.2 1999/10/09 00:00:57 ralf Exp $
*/
#include <linux/init.h>
#include <linux/kernel.h>
@@ -11,12 +11,14 @@
#include <asm/sgialib.h>
-char * __init prom_getenv(char *name)
+PCHAR __init
+ArcGetEnvironmentVariable(CHAR *name)
{
return romvec->get_evar(name);
}
-long __init prom_setenv(char *name, char *value)
+LONG __init
+ArcSetEnvironmentVariable(PCHAR name, PCHAR value)
{
return romvec->set_evar(name, value);
}
diff --git a/include/asm-mips/arc/types.h b/include/asm-mips/arc/types.h
new file mode 100644
index 000000000..79ca5d9da
--- /dev/null
+++ b/include/asm-mips/arc/types.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ *
+ * Copyright 1999 Ralf Baechle (ralf@gnu.org)
+ * Copyright 1999 Silicon Graphics, Inc.
+ */
+#ifndef _ASM_ARC_TYPES_H
+#define _ASM_ARC_TYPES_H
+
+#include <linux/config.h>
+
+#ifdef CONFIG_ARC32
+
+typedef char CHAR;
+typedef short SHORT;
+typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__)));
+typedef long LONG __attribute__ ((__mode__ (__SI__)));
+typedef unsigned char UCHAR;
+typedef unsigned short USHORT;
+typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__)));
+typedef void VOID;
+
+/* The pointer types. Note that we're using a 64-bit compiler but all
+ pointer in the ARC structures are only 32-bit, so we need some disgusting
+ workarounds. Keep your vomit bag handy. */
+typedef LONG _PCHAR;
+typedef LONG _PSHORT;
+typedef LONG _PLARGE_INTEGER;
+typedef LONG _PLONG;
+typedef LONG _PUCHAR;
+typedef LONG _PUSHORT;
+typedef LONG _PULONG;
+typedef LONG _PVOID;
+
+#endif /* CONFIG_ARC32 */
+
+#ifdef CONFIG_ARC64
+
+typedef char CHAR;
+typedef short SHORT;
+typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__)));
+typedef long LONG __attribute__ ((__mode__ (__DI__)));
+typedef unsigned char UCHAR;
+typedef unsigned short USHORT;
+typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__)));
+typedef void VOID;
+
+/* The pointer types. We're 64-bit and the firmware is also 64-bit, so
+ live is sane ... */
+typedef CHAR *_PCHAR;
+typedef SHORT *_PSHORT;
+typedef LARGE_INTEGER *_PLARGE_INTEGER;
+typedef LONG *_PLONG;
+typedef UCHAR *_PUCHAR;
+typedef USHORT *_PUSHORT;
+typedef ULONG *_PULONG;
+typedef VOID *_PVOID;
+
+#endif /* CONFIG_ARC64 */
+
+typedef CHAR *PCHAR;
+typedef SHORT *PSHORT;
+typedef LARGE_INTEGER *PLARGE_INTEGER;
+typedef LONG *PLONG;
+typedef UCHAR *PUCHAR;
+typedef USHORT *PUSHORT;
+typedef ULONG *PULONG;
+typedef VOID *PVOID;
+
+#endif /* _ASM_ARC_TYPES_H */
diff --git a/include/asm-mips/sgialib.h b/include/asm-mips/sgialib.h
index 42a390e89..8a9e2f49e 100644
--- a/include/asm-mips/sgialib.h
+++ b/include/asm-mips/sgialib.h
@@ -1,11 +1,11 @@
-/* $Id: sgialib.h,v 1.4 1999/02/25 20:55:07 tsbogend Exp $
+/* $Id: sgialib.h,v 1.5 2000/03/19 01:28:58 ralf Exp $
* sgialib.h: SGI ARCS firmware interface library for the Linux kernel.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/
-#ifndef _MIPS_SGIALIB_H
-#define _MIPS_SGIALIB_H
+#ifndef _ASM_SGIALIB_H
+#define _ASM_SGIALIB_H
#include <asm/sgiarcs.h>
@@ -82,8 +82,8 @@ extern pcomponent *prom_componentbypath(char *path);
extern void prom_identify_arch(void);
/* Environemt variable routines. */
-extern char *prom_getenv(char *name);
-extern long prom_setenv(char *name, char *value);
+extern PCHAR ArcGetEnvironmentVariable(CHAR *name);
+extern LONG SetEnvironmentVariable(PCHAR name, PCHAR value);
/* ARCS command line acquisition and parsing. */
extern char *prom_getcmdline(void);
@@ -120,4 +120,4 @@ extern long prom_cfgsave(void);
extern struct linux_sysid *prom_getsysid(void);
extern void prom_cacheflush(void);
-#endif /* !(_MIPS_SGIALIB_H) */
+#endif /* _ASM_SGIALIB_H */
diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h
index e0f735b61..b9faf024f 100644
--- a/include/asm-mips/sgiarcs.h
+++ b/include/asm-mips/sgiarcs.h
@@ -1,12 +1,13 @@
-/* $Id: sgiarcs.h,v 1.2 1998/07/10 01:14:55 ralf Exp $
+/* $Id: sgiarcs.h,v 1.3 1999/02/25 20:55:08 tsbogend Exp $
*
* SGI ARCS firmware interface defines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/
+#ifndef _ASM_SGIARCS_H
+#define _ASM_SGIARCS_H
-#ifndef _MIPS_SGIARCS_H
-#define _MIPS_SGIARCS_H
+#include <asm/arc/types.h>
/* Various ARCS error codes. */
#define PROM_ESUCCESS 0x00
@@ -232,8 +233,8 @@ struct linux_romvec {
long (*mount)(char *file, enum linux_mountops op);
/* Dealing with firmware environment variables. */
- char *(*get_evar)(char *name);
- long (*set_evar)(char *name, char *value);
+ PCHAR (*get_evar)(CHAR *name);
+ LONG (*set_evar)(PCHAR name, PCHAR value);
long (*get_finfo)(unsigned long fd, struct linux_finfo *buf);
long (*set_finfo)(unsigned long fd, unsigned long flags,
@@ -366,4 +367,4 @@ struct linux_smonblock {
int smax; /* Max # of symbols. */
};
-#endif /* !(_MIPS_SGIARCS_H) */
+#endif /* _ASM_SGIARCS_H */