misc.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. *
  8. * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  9. * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
  10. * Copyright (C) 1999 Silicon Graphics, Inc.
  11. */
  12. #include <linux/compiler.h>
  13. #include <linux/init.h>
  14. #include <linux/kernel.h>
  15. #include <linux/irqflags.h>
  16. #include <asm/bcache.h>
  17. #include <asm/fw/arc/types.h>
  18. #include <asm/sgialib.h>
  19. #include <asm/bootinfo.h>
  20. VOID __noreturn
  21. ArcHalt(VOID)
  22. {
  23. bc_disable();
  24. local_irq_disable();
  25. ARC_CALL0(halt);
  26. unreachable();
  27. }
  28. VOID __noreturn
  29. ArcPowerDown(VOID)
  30. {
  31. bc_disable();
  32. local_irq_disable();
  33. ARC_CALL0(pdown);
  34. unreachable();
  35. }
  36. /* XXX is this a soft reset basically? XXX */
  37. VOID __noreturn
  38. ArcRestart(VOID)
  39. {
  40. bc_disable();
  41. local_irq_disable();
  42. ARC_CALL0(restart);
  43. unreachable();
  44. }
  45. VOID __noreturn
  46. ArcReboot(VOID)
  47. {
  48. bc_disable();
  49. local_irq_disable();
  50. ARC_CALL0(reboot);
  51. unreachable();
  52. }
  53. VOID __noreturn
  54. ArcEnterInteractiveMode(VOID)
  55. {
  56. bc_disable();
  57. local_irq_disable();
  58. ARC_CALL0(imode);
  59. unreachable();
  60. }
  61. LONG
  62. ArcSaveConfiguration(VOID)
  63. {
  64. return ARC_CALL0(cfg_save);
  65. }
  66. struct linux_sysid *
  67. ArcGetSystemId(VOID)
  68. {
  69. return (struct linux_sysid *) ARC_CALL0(get_sysid);
  70. }
  71. VOID __init
  72. ArcFlushAllCaches(VOID)
  73. {
  74. ARC_CALL0(cache_flush);
  75. }
  76. DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID)
  77. {
  78. return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID);
  79. }