blob: 03baeceb3e351f1ad5cbd2420e5652ff2ca24ac6 [file] [log] [blame]
Sergey Ryazanov43cc7392014-10-29 03:18:38 +04001/*
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 Ryazanov3b12308f2014-10-29 03:18:39 +040019#include "devices.h"
20#include "ar5312.h"
21
Sergey Ryazanov43cc7392014-10-29 03:18:38 +040022static void ath25_halt(void)
23{
24 local_irq_disable();
25 unreachable();
26}
27
28void __init plat_mem_setup(void)
29{
30 _machine_halt = ath25_halt;
31 pm_power_off = ath25_halt;
32
Sergey Ryazanov3b12308f2014-10-29 03:18:39 +040033 if (is_ar5312())
34 ar5312_plat_mem_setup();
35
Sergey Ryazanov43cc7392014-10-29 03:18:38 +040036 /* Disable data watchpoints */
37 write_c0_watchlo0(0);
38}
39
40asmlinkage void plat_irq_dispatch(void)
41{
42}
43
44void __init plat_time_init(void)
45{
Sergey Ryazanov3b12308f2014-10-29 03:18:39 +040046 if (is_ar5312())
47 ar5312_plat_time_init();
Sergey Ryazanov43cc7392014-10-29 03:18:38 +040048}
49
50unsigned int __cpuinit get_c0_compare_int(void)
51{
52 return CP0_LEGACY_COMPARE_IRQ;
53}
54
55void __init arch_init_irq(void)
56{
57 clear_c0_status(ST0_IM);
58 mips_cpu_irq_init();
59}