mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 15:26:54 +07:00
3b12308f33
Add basic support for Atheros AR5312/AR2312 SoCs: registers definition file and initial setup code. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Linux MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/8238/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved.
|
|
* Copyright (C) 2006 FON Technology, SL.
|
|
* Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
|
|
* Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org>
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/interrupt.h>
|
|
#include <asm/irq_cpu.h>
|
|
#include <asm/reboot.h>
|
|
#include <asm/bootinfo.h>
|
|
#include <asm/time.h>
|
|
|
|
#include "devices.h"
|
|
#include "ar5312.h"
|
|
|
|
static void ath25_halt(void)
|
|
{
|
|
local_irq_disable();
|
|
unreachable();
|
|
}
|
|
|
|
void __init plat_mem_setup(void)
|
|
{
|
|
_machine_halt = ath25_halt;
|
|
pm_power_off = ath25_halt;
|
|
|
|
if (is_ar5312())
|
|
ar5312_plat_mem_setup();
|
|
|
|
/* Disable data watchpoints */
|
|
write_c0_watchlo0(0);
|
|
}
|
|
|
|
asmlinkage void plat_irq_dispatch(void)
|
|
{
|
|
}
|
|
|
|
void __init plat_time_init(void)
|
|
{
|
|
if (is_ar5312())
|
|
ar5312_plat_time_init();
|
|
}
|
|
|
|
unsigned int __cpuinit get_c0_compare_int(void)
|
|
{
|
|
return CP0_LEGACY_COMPARE_IRQ;
|
|
}
|
|
|
|
void __init arch_init_irq(void)
|
|
{
|
|
clear_c0_status(ST0_IM);
|
|
mips_cpu_irq_init();
|
|
}
|