xref: /openbmc/linux/arch/mips/include/asm/sgialib.h (revision 7b16831d)
1384740dcSRalf Baechle /*
2384740dcSRalf Baechle  * This file is subject to the terms and conditions of the GNU General Public
3384740dcSRalf Baechle  * License.  See the file "COPYING" in the main directory of this archive
4384740dcSRalf Baechle  * for more details.
5384740dcSRalf Baechle  *
6384740dcSRalf Baechle  * SGI ARCS firmware interface library for the Linux kernel.
7384740dcSRalf Baechle  *
879add627SJustin P. Mattock  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
9384740dcSRalf Baechle  * Copyright (C) 2001, 2002 Ralf Baechle (ralf@gnu.org)
10384740dcSRalf Baechle  */
11384740dcSRalf Baechle #ifndef _ASM_SGIALIB_H
12384740dcSRalf Baechle #define _ASM_SGIALIB_H
13384740dcSRalf Baechle 
14bb03006eSRalf Baechle #include <linux/compiler.h>
15384740dcSRalf Baechle #include <asm/sgiarcs.h>
16384740dcSRalf Baechle 
17384740dcSRalf Baechle extern struct linux_romvec *romvec;
18384740dcSRalf Baechle 
19384740dcSRalf Baechle extern int prom_flags;
20384740dcSRalf Baechle 
21384740dcSRalf Baechle #define PROM_FLAG_ARCS			1
22384740dcSRalf Baechle #define PROM_FLAG_USE_AS_CONSOLE	2
23384740dcSRalf Baechle #define PROM_FLAG_DONT_FREE_TEMP	4
24384740dcSRalf Baechle 
25384740dcSRalf Baechle /* Simple char-by-char console I/O. */
26384740dcSRalf Baechle extern char prom_getchar(void);
27384740dcSRalf Baechle 
28384740dcSRalf Baechle /* Get next memory descriptor after CURR, returns first descriptor
29384740dcSRalf Baechle  * in chain is CURR is NULL.
30384740dcSRalf Baechle  */
31384740dcSRalf Baechle extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr);
32384740dcSRalf Baechle #define PROM_NULL_MDESC	  ((struct linux_mdesc *) 0)
33384740dcSRalf Baechle 
34384740dcSRalf Baechle /* Called by prom_init to setup the physical memory pmemblock
35384740dcSRalf Baechle  * array.
36384740dcSRalf Baechle  */
37384740dcSRalf Baechle extern void prom_meminit(void);
38384740dcSRalf Baechle 
39384740dcSRalf Baechle /* PROM device tree library routines. */
40384740dcSRalf Baechle #define PROM_NULL_COMPONENT ((pcomponent *) 0)
41384740dcSRalf Baechle 
42384740dcSRalf Baechle /* This is called at prom_init time to identify the
43384740dcSRalf Baechle  * ARC architecture we are running on
44384740dcSRalf Baechle  */
45384740dcSRalf Baechle extern void prom_identify_arch(void);
46384740dcSRalf Baechle 
47384740dcSRalf Baechle /* Environment variable routines. */
48384740dcSRalf Baechle extern PCHAR ArcGetEnvironmentVariable(PCHAR name);
49384740dcSRalf Baechle 
50cb6edd45SDmitri Vorobiev /* ARCS command line parsing. */
517b16831dSThomas Bogendoerfer extern void prom_init_cmdline(int argc, LONG *argv);
52384740dcSRalf Baechle 
53384740dcSRalf Baechle /* File operations. */
54384740dcSRalf Baechle extern LONG ArcRead(ULONG fd, PVOID buf, ULONG num, PULONG cnt);
55384740dcSRalf Baechle extern LONG ArcWrite(ULONG fd, PVOID buf, ULONG num, PULONG cnt);
56384740dcSRalf Baechle 
57384740dcSRalf Baechle /* Misc. routines. */
58bb03006eSRalf Baechle extern VOID ArcEnterInteractiveMode(VOID) __noreturn;
59384740dcSRalf Baechle extern DISPLAY_STATUS *ArcGetDisplayStatus(ULONG FileID);
60384740dcSRalf Baechle 
61384740dcSRalf Baechle #endif /* _ASM_SGIALIB_H */
62