OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [arch/] [arm/] [v5/] [irq.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#ifndef __ARM_V5_IRQ_H__
2
#define __ARM_V5_IRQ_H__
3
 
4
static inline void enable_irqs()
5
{
6
        __asm__ __volatile__(
7
                "mrs    r0, cpsr_fc\n"
8
                "bic    r0, r0, #0x80\n" /* ARM_IRQ_BIT */
9
                "msr    cpsr_fc, r0\n"
10
        );
11
}
12
 
13
static inline void disable_irqs()
14
{
15
        __asm__ __volatile__(
16
                "mrs    r0, cpsr_fc\n"
17
                "orr    r0, r0, #0x80\n" /* ARM_IRQ_BIT */
18
                "msr    cpsr_fc, r0\n"
19
        );
20
}
21
 
22
/* Disable the irqs unconditionally, but also keep the previous state such that
23
 * if it was already disabled before the call, the restore call would retain
24
 * this state. */
25
void irq_local_disable_save(unsigned long *state);
26
void irq_local_restore(unsigned long state);
27
 
28
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.