2019-05-27 14:55:01 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2011-06-05 03:18:56 +08:00
|
|
|
/*
|
|
|
|
* OpenRISC irq.c
|
|
|
|
*
|
|
|
|
* Linux architectural port borrowing liberally from similar works of
|
|
|
|
* others. All original copyrights apply as per the original source
|
|
|
|
* declaration.
|
|
|
|
*
|
|
|
|
* Modifications for the OpenRISC architecture:
|
|
|
|
* Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/ftrace.h>
|
|
|
|
#include <linux/irq.h>
|
2014-05-27 04:31:42 +08:00
|
|
|
#include <linux/irqchip.h>
|
2012-02-15 22:00:32 +08:00
|
|
|
#include <linux/export.h>
|
2011-06-05 03:18:56 +08:00
|
|
|
#include <linux/irqflags.h>
|
|
|
|
|
|
|
|
/* read interrupt enabled status */
|
|
|
|
unsigned long arch_local_save_flags(void)
|
|
|
|
{
|
|
|
|
return mfspr(SPR_SR) & (SPR_SR_IEE|SPR_SR_TEE);
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(arch_local_save_flags);
|
|
|
|
|
|
|
|
/* set interrupt enabled status */
|
|
|
|
void arch_local_irq_restore(unsigned long flags)
|
|
|
|
{
|
|
|
|
mtspr(SPR_SR, ((mfspr(SPR_SR) & ~(SPR_SR_IEE|SPR_SR_TEE)) | flags));
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(arch_local_irq_restore);
|
|
|
|
|
2014-05-27 04:31:42 +08:00
|
|
|
void __init init_IRQ(void)
|
2011-06-05 03:18:56 +08:00
|
|
|
{
|
2014-05-27 04:31:42 +08:00
|
|
|
irqchip_init();
|
2012-04-06 18:52:54 +08:00
|
|
|
}
|
2011-06-05 03:18:56 +08:00
|
|
|
|
2014-05-27 04:31:42 +08:00
|
|
|
void __irq_entry do_IRQ(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
handle_arch_irq(regs);
|
|
|
|
}
|