idle.c 595 B

12345678910111213141516171819202122232425262728293031
  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. * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #include <asm/sn/leds.h>
  9. void snidle(int state)
  10. {
  11. if (state) {
  12. if (pda->idle_flag == 0) {
  13. /*
  14. * Turn the activity LED off.
  15. */
  16. set_led_bits(0, LED_CPU_ACTIVITY);
  17. }
  18. pda->idle_flag = 1;
  19. } else {
  20. /*
  21. * Turn the activity LED on.
  22. */
  23. set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
  24. pda->idle_flag = 0;
  25. }
  26. }