blob: 19f710117d974bf2a0da97764e7bc3ec428b3fc8 [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 */
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010012#include <linux/compiler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/init.h>
14#include <linux/kernel.h>
David Rientjes18f694272012-11-16 14:14:52 -080015#include <linux/irqflags.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17#include <asm/bcache.h>
18
Aurelien Jarno2f56cfd2007-09-05 08:59:34 +020019#include <asm/fw/arc/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/sgialib.h>
21#include <asm/bootinfo.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010023VOID __noreturn
Linus Torvalds1da177e2005-04-16 15:20:36 -070024ArcHalt(VOID)
25{
26 bc_disable();
27 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 ARC_CALL0(halt);
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010029
30 unreachable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070031}
32
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010033VOID __noreturn
Linus Torvalds1da177e2005-04-16 15:20:36 -070034ArcPowerDown(VOID)
35{
36 bc_disable();
37 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070038 ARC_CALL0(pdown);
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010039
40 unreachable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070041}
42
43/* XXX is this a soft reset basically? XXX */
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010044VOID __noreturn
Linus Torvalds1da177e2005-04-16 15:20:36 -070045ArcRestart(VOID)
46{
47 bc_disable();
48 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070049 ARC_CALL0(restart);
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010050
51 unreachable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070052}
53
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010054VOID __noreturn
Linus Torvalds1da177e2005-04-16 15:20:36 -070055ArcReboot(VOID)
56{
57 bc_disable();
58 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 ARC_CALL0(reboot);
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010060
61 unreachable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070062}
63
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010064VOID __noreturn
Linus Torvalds1da177e2005-04-16 15:20:36 -070065ArcEnterInteractiveMode(VOID)
66{
67 bc_disable();
68 local_irq_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070069 ARC_CALL0(imode);
Ralf Baechle7f84c0a2015-01-02 17:16:24 +010070
71 unreachable();
Linus Torvalds1da177e2005-04-16 15:20:36 -070072}
73
74LONG
75ArcSaveConfiguration(VOID)
76{
77 return ARC_CALL0(cfg_save);
78}
79
80struct linux_sysid *
81ArcGetSystemId(VOID)
82{
83 return (struct linux_sysid *) ARC_CALL0(get_sysid);
84}
85
86VOID __init
87ArcFlushAllCaches(VOID)
88{
89 ARC_CALL0(cache_flush);
90}
91
92DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID)
93{
94 return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID);
95}