board.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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) 2003 Atheros Communications, Inc., All Rights Reserved.
  7. * Copyright (C) 2006 FON Technology, SL.
  8. * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
  9. * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
  10. */
  11. #include <linux/init.h>
  12. #include <linux/interrupt.h>
  13. #include <asm/irq_cpu.h>
  14. #include <asm/reboot.h>
  15. #include <asm/bootinfo.h>
  16. #include <asm/time.h>
  17. #include "devices.h"
  18. #include "ar5312.h"
  19. static void ath25_halt(void)
  20. {
  21. local_irq_disable();
  22. unreachable();
  23. }
  24. void __init plat_mem_setup(void)
  25. {
  26. _machine_halt = ath25_halt;
  27. pm_power_off = ath25_halt;
  28. if (is_ar5312())
  29. ar5312_plat_mem_setup();
  30. /* Disable data watchpoints */
  31. write_c0_watchlo0(0);
  32. }
  33. asmlinkage void plat_irq_dispatch(void)
  34. {
  35. }
  36. void __init plat_time_init(void)
  37. {
  38. if (is_ar5312())
  39. ar5312_plat_time_init();
  40. }
  41. unsigned int __cpuinit get_c0_compare_int(void)
  42. {
  43. return CP0_LEGACY_COMPARE_IRQ;
  44. }
  45. void __init arch_init_irq(void)
  46. {
  47. clear_c0_status(ST0_IM);
  48. mips_cpu_irq_init();
  49. }