| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
|  | 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. Mattock | 79add62 | 2011-04-04 14:15:29 -0700 | [diff] [blame] | 8 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) | 
|  | 10 | * Copyright (C) 1999 Silicon Graphics, Inc. | 
|  | 11 | */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/init.h> | 
|  | 13 | #include <linux/kernel.h> | 
|  | 14 |  | 
|  | 15 | #include <asm/bcache.h> | 
|  | 16 |  | 
| Aurelien Jarno | 2f56cfd | 2007-09-05 08:59:34 +0200 | [diff] [blame] | 17 | #include <asm/fw/arc/types.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <asm/sgialib.h> | 
|  | 19 | #include <asm/bootinfo.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | VOID | 
|  | 22 | ArcHalt(VOID) | 
|  | 23 | { | 
|  | 24 | bc_disable(); | 
|  | 25 | local_irq_disable(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | ARC_CALL0(halt); | 
|  | 27 | never:	goto never; | 
|  | 28 | } | 
|  | 29 |  | 
|  | 30 | VOID | 
|  | 31 | ArcPowerDown(VOID) | 
|  | 32 | { | 
|  | 33 | bc_disable(); | 
|  | 34 | local_irq_disable(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | ARC_CALL0(pdown); | 
|  | 36 | never:	goto never; | 
|  | 37 | } | 
|  | 38 |  | 
|  | 39 | /* XXX is this a soft reset basically? XXX */ | 
|  | 40 | VOID | 
|  | 41 | ArcRestart(VOID) | 
|  | 42 | { | 
|  | 43 | bc_disable(); | 
|  | 44 | local_irq_disable(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | ARC_CALL0(restart); | 
|  | 46 | never:	goto never; | 
|  | 47 | } | 
|  | 48 |  | 
|  | 49 | VOID | 
|  | 50 | ArcReboot(VOID) | 
|  | 51 | { | 
|  | 52 | bc_disable(); | 
|  | 53 | local_irq_disable(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | ARC_CALL0(reboot); | 
|  | 55 | never:	goto never; | 
|  | 56 | } | 
|  | 57 |  | 
|  | 58 | VOID | 
|  | 59 | ArcEnterInteractiveMode(VOID) | 
|  | 60 | { | 
|  | 61 | bc_disable(); | 
|  | 62 | local_irq_disable(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | ARC_CALL0(imode); | 
|  | 64 | never:	goto never; | 
|  | 65 | } | 
|  | 66 |  | 
|  | 67 | LONG | 
|  | 68 | ArcSaveConfiguration(VOID) | 
|  | 69 | { | 
|  | 70 | return ARC_CALL0(cfg_save); | 
|  | 71 | } | 
|  | 72 |  | 
|  | 73 | struct linux_sysid * | 
|  | 74 | ArcGetSystemId(VOID) | 
|  | 75 | { | 
|  | 76 | return (struct linux_sysid *) ARC_CALL0(get_sysid); | 
|  | 77 | } | 
|  | 78 |  | 
|  | 79 | VOID __init | 
|  | 80 | ArcFlushAllCaches(VOID) | 
|  | 81 | { | 
|  | 82 | ARC_CALL0(cache_flush); | 
|  | 83 | } | 
|  | 84 |  | 
|  | 85 | DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID) | 
|  | 86 | { | 
|  | 87 | return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID); | 
|  | 88 | } |