xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/sgialib.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
3*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
4*4882a593Smuzhiyun  * for more details.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * SGI ARCS firmware interface library for the Linux kernel.
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
9*4882a593Smuzhiyun  * Copyright (C) 2001, 2002 Ralf Baechle (ralf@gnu.org)
10*4882a593Smuzhiyun  */
11*4882a593Smuzhiyun #ifndef _ASM_SGIALIB_H
12*4882a593Smuzhiyun #define _ASM_SGIALIB_H
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #include <linux/compiler.h>
15*4882a593Smuzhiyun #include <asm/sgiarcs.h>
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun extern struct linux_romvec *romvec;
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun extern int prom_flags;
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #define PROM_FLAG_ARCS			1
22*4882a593Smuzhiyun #define PROM_FLAG_USE_AS_CONSOLE	2
23*4882a593Smuzhiyun #define PROM_FLAG_DONT_FREE_TEMP	4
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun /* Simple char-by-char console I/O. */
26*4882a593Smuzhiyun extern char prom_getchar(void);
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun /* Get next memory descriptor after CURR, returns first descriptor
29*4882a593Smuzhiyun  * in chain is CURR is NULL.
30*4882a593Smuzhiyun  */
31*4882a593Smuzhiyun extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr);
32*4882a593Smuzhiyun #define PROM_NULL_MDESC	  ((struct linux_mdesc *) 0)
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun /* Called by prom_init to setup the physical memory pmemblock
35*4882a593Smuzhiyun  * array.
36*4882a593Smuzhiyun  */
37*4882a593Smuzhiyun extern void prom_meminit(void);
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun /* PROM device tree library routines. */
40*4882a593Smuzhiyun #define PROM_NULL_COMPONENT ((pcomponent *) 0)
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun /* This is called at prom_init time to identify the
43*4882a593Smuzhiyun  * ARC architecture we are running on
44*4882a593Smuzhiyun  */
45*4882a593Smuzhiyun extern void prom_identify_arch(void);
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun /* Environment variable routines. */
48*4882a593Smuzhiyun extern PCHAR ArcGetEnvironmentVariable(PCHAR name);
49*4882a593Smuzhiyun 
50*4882a593Smuzhiyun /* ARCS command line parsing. */
51*4882a593Smuzhiyun extern void prom_init_cmdline(int argc, LONG *argv);
52*4882a593Smuzhiyun 
53*4882a593Smuzhiyun /* File operations. */
54*4882a593Smuzhiyun extern LONG ArcRead(ULONG fd, PVOID buf, ULONG num, PULONG cnt);
55*4882a593Smuzhiyun extern LONG ArcWrite(ULONG fd, PVOID buf, ULONG num, PULONG cnt);
56*4882a593Smuzhiyun 
57*4882a593Smuzhiyun /* Misc. routines. */
58*4882a593Smuzhiyun extern VOID ArcEnterInteractiveMode(VOID) __noreturn;
59*4882a593Smuzhiyun extern DISPLAY_STATUS *ArcGetDisplayStatus(ULONG FileID);
60*4882a593Smuzhiyun 
61*4882a593Smuzhiyun #endif /* _ASM_SGIALIB_H */
62