misc.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 (dm@engr.sgi.com)
  9. * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
  10. * Copyright (C) 1999 Silicon Graphics, Inc.
  11. */
  12. #include <linux/config.h>
  13. #include <linux/init.h>
  14. #include <linux/kernel.h>
  15. #include <asm/bcache.h>
  16. #include <asm/arc/types.h>
  17. #include <asm/sgialib.h>
  18. #include <asm/bootinfo.h>
  19. #include <asm/system.h>
  20. extern void *sgiwd93_host;
  21. extern void reset_wd33c93(void *instance);
  22. VOID
  23. ArcHalt(VOID)
  24. {
  25. bc_disable();
  26. local_irq_disable();
  27. #ifdef CONFIG_SCSI_SGIWD93
  28. reset_wd33c93(sgiwd93_host);
  29. #endif
  30. ARC_CALL0(halt);
  31. never: goto never;
  32. }
  33. VOID
  34. ArcPowerDown(VOID)
  35. {
  36. bc_disable();
  37. local_irq_disable();
  38. #ifdef CONFIG_SCSI_SGIWD93
  39. reset_wd33c93(sgiwd93_host);
  40. #endif
  41. ARC_CALL0(pdown);
  42. never: goto never;
  43. }
  44. /* XXX is this a soft reset basically? XXX */
  45. VOID
  46. ArcRestart(VOID)
  47. {
  48. bc_disable();
  49. local_irq_disable();
  50. #ifdef CONFIG_SCSI_SGIWD93
  51. reset_wd33c93(sgiwd93_host);
  52. #endif
  53. ARC_CALL0(restart);
  54. never: goto never;
  55. }
  56. VOID
  57. ArcReboot(VOID)
  58. {
  59. bc_disable();
  60. local_irq_disable();
  61. #ifdef CONFIG_SCSI_SGIWD93
  62. reset_wd33c93(sgiwd93_host);
  63. #endif
  64. ARC_CALL0(reboot);
  65. never: goto never;
  66. }
  67. VOID
  68. ArcEnterInteractiveMode(VOID)
  69. {
  70. bc_disable();
  71. local_irq_disable();
  72. #ifdef CONFIG_SCSI_SGIWD93
  73. reset_wd33c93(sgiwd93_host);
  74. #endif
  75. ARC_CALL0(imode);
  76. never: goto never;
  77. }
  78. LONG
  79. ArcSaveConfiguration(VOID)
  80. {
  81. return ARC_CALL0(cfg_save);
  82. }
  83. struct linux_sysid *
  84. ArcGetSystemId(VOID)
  85. {
  86. return (struct linux_sysid *) ARC_CALL0(get_sysid);
  87. }
  88. VOID __init
  89. ArcFlushAllCaches(VOID)
  90. {
  91. ARC_CALL0(cache_flush);
  92. }
  93. DISPLAY_STATUS * __init ArcGetDisplayStatus(ULONG FileID)
  94. {
  95. return (DISPLAY_STATUS *) ARC_CALL1(GetDisplayStatus, FileID);
  96. }