mn10300-watchdog-low.S 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ###############################################################################
  2. #
  3. # MN10300 Watchdog interrupt handler
  4. #
  5. # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  6. # Written by David Howells (dhowells@redhat.com)
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public Licence
  10. # as published by the Free Software Foundation; either version
  11. # 2 of the Licence, or (at your option) any later version.
  12. #
  13. ###############################################################################
  14. #include <linux/sys.h>
  15. #include <linux/linkage.h>
  16. #include <asm/intctl-regs.h>
  17. #include <asm/timer-regs.h>
  18. #include <asm/frame.inc>
  19. .text
  20. ###############################################################################
  21. #
  22. # Watchdog handler entry point
  23. # - special non-maskable interrupt
  24. #
  25. ###############################################################################
  26. .globl watchdog_handler
  27. .type watchdog_handler,@function
  28. watchdog_handler:
  29. add -4,sp
  30. SAVE_ALL
  31. mov 0xffffffff,d0
  32. mov d0,(REG_ORIG_D0,fp)
  33. mov fp,d0
  34. lsr 2,d1
  35. call watchdog_interrupt[],0 # watchdog_interrupt(regs,irq)
  36. jmp ret_from_intr
  37. .size watchdog_handler,.-watchdog_handler
  38. ###############################################################################
  39. #
  40. # Watchdog touch entry point
  41. # - kept to absolute minimum (unfortunately, it's prototyped in linux/nmi.h so
  42. # we can't inline it)
  43. #
  44. ###############################################################################
  45. .globl touch_nmi_watchdog
  46. .type touch_nmi_watchdog,@function
  47. touch_nmi_watchdog:
  48. clr d0
  49. mov d0,(watchdog_alert_counter)
  50. ret [],0
  51. .size touch_nmi_watchdog,.-touch_nmi_watchdog