blob: b2e10b9e9452229572f8d190188aeeef42ec53fb [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Miscellaneous ARCS PROM routines.
7 *
8 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
9 * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
10 * Copyright (C) 1999 Silicon Graphics, Inc.
11 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/init.h>
13#include <linux/kernel.h>
14
15#include <asm/bcache.h>
16
17#include <asm/arc/types.h>
18#include <asm/sgialib.h>
19#include <asm/bootinfo.h>
20#include <asm/system.h>
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022VOID
23ArcHalt(VOID)
24{
25 bc_disable();
26 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 ARC_CALL0(halt);
28never: goto never;
29}
30
31VOID
32ArcPowerDown(VOID)
33{
34 bc_disable();
35 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 ARC_CALL0(pdown);
37never: goto never;
38}
39
40/* XXX is this a soft reset basically? XXX */
41VOID
42ArcRestart(VOID)
43{
44 bc_disable();
45 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 ARC_CALL0(restart);
47never: goto never;
48}
49
50VOID
51ArcReboot(VOID)
52{
53 bc_disable();
54 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 ARC_CALL0(reboot);
56never: goto never;
57}
58
59VOID
60ArcEnterInteractiveMode(VOID)
61{
62 bc_disable();
63 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 ARC_CALL0(imode);
65never: goto never;
66}
67
68LONG
69ArcSaveConfiguration(VOID)
70{
71 return ARC_CALL0(cfg_save);
72}
73
74struct linux_sysid *
75ArcGetSystemId(VOID)
76{
77 return (struct linux_sysid *) ARC_CALL0(get_sysid);
78}
79
80VOID __init
81ArcFlushAllCaches(VOID)
82{
83 ARC_CALL0(cache_flush);
84}
85
86DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID)
87{
88 return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID);
89}