Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 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 | |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/interrupt.h> |
| 14 | #include <asm/irq_cpu.h> |
| 15 | #include <asm/reboot.h> |
| 16 | #include <asm/bootinfo.h> |
| 17 | #include <asm/time.h> |
| 18 | |
Sergey Ryazanov | 3b12308f | 2014-10-29 03:18:39 +0400 | [diff] [blame^] | 19 | #include "devices.h" |
| 20 | #include "ar5312.h" |
| 21 | |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 22 | static void ath25_halt(void) |
| 23 | { |
| 24 | local_irq_disable(); |
| 25 | unreachable(); |
| 26 | } |
| 27 | |
| 28 | void __init plat_mem_setup(void) |
| 29 | { |
| 30 | _machine_halt = ath25_halt; |
| 31 | pm_power_off = ath25_halt; |
| 32 | |
Sergey Ryazanov | 3b12308f | 2014-10-29 03:18:39 +0400 | [diff] [blame^] | 33 | if (is_ar5312()) |
| 34 | ar5312_plat_mem_setup(); |
| 35 | |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 36 | /* Disable data watchpoints */ |
| 37 | write_c0_watchlo0(0); |
| 38 | } |
| 39 | |
| 40 | asmlinkage void plat_irq_dispatch(void) |
| 41 | { |
| 42 | } |
| 43 | |
| 44 | void __init plat_time_init(void) |
| 45 | { |
Sergey Ryazanov | 3b12308f | 2014-10-29 03:18:39 +0400 | [diff] [blame^] | 46 | if (is_ar5312()) |
| 47 | ar5312_plat_time_init(); |
Sergey Ryazanov | 43cc739 | 2014-10-29 03:18:38 +0400 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | unsigned int __cpuinit get_c0_compare_int(void) |
| 51 | { |
| 52 | return CP0_LEGACY_COMPARE_IRQ; |
| 53 | } |
| 54 | |
| 55 | void __init arch_init_irq(void) |
| 56 | { |
| 57 | clear_c0_status(ST0_IM); |
| 58 | mips_cpu_irq_init(); |
| 59 | } |