blob: 7cf80ca2c1d2117c239ba574406c6814ecb91961 [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 *
Justin P. Mattock79add622011-04-04 14:15:29 -07008 * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * 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
Aurelien Jarno2f56cfd2007-09-05 08:59:34 +020017#include <asm/fw/arc/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#include <asm/sgialib.h>
19#include <asm/bootinfo.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Linus Torvalds1da177e2005-04-16 15:20:36 -070021VOID
22ArcHalt(VOID)
23{
24 bc_disable();
25 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070026 ARC_CALL0(halt);
27never: goto never;
28}
29
30VOID
31ArcPowerDown(VOID)
32{
33 bc_disable();
34 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 ARC_CALL0(pdown);
36never: goto never;
37}
38
39/* XXX is this a soft reset basically? XXX */
40VOID
41ArcRestart(VOID)
42{
43 bc_disable();
44 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070045 ARC_CALL0(restart);
46never: goto never;
47}
48
49VOID
50ArcReboot(VOID)
51{
52 bc_disable();
53 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 ARC_CALL0(reboot);
55never: goto never;
56}
57
58VOID
59ArcEnterInteractiveMode(VOID)
60{
61 bc_disable();
62 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070063 ARC_CALL0(imode);
64never: goto never;
65}
66
67LONG
68ArcSaveConfiguration(VOID)
69{
70 return ARC_CALL0(cfg_save);
71}
72
73struct linux_sysid *
74ArcGetSystemId(VOID)
75{
76 return (struct linux_sysid *) ARC_CALL0(get_sysid);
77}
78
79VOID __init
80ArcFlushAllCaches(VOID)
81{
82 ARC_CALL0(cache_flush);
83}
84
85DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID)
86{
87 return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID);
88}