mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 22:20:45 +00:00
sparc: Added function that checks if IRQ is on or off
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
parent
be7357a6cc
commit
f33f888d0e
2 changed files with 10 additions and 0 deletions
|
@ -32,4 +32,7 @@ extern int intLock(void);
|
|||
/* Sets the PIL to oldLevel */
|
||||
extern void intUnlock(int oldLevel);
|
||||
|
||||
/* Return non-zero if interrupts are currently enabled */
|
||||
extern int interrupt_is_enabled(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,6 +47,13 @@ int disable_interrupts(void)
|
|||
return intLock();
|
||||
}
|
||||
|
||||
int interrupt_is_enabled(void)
|
||||
{
|
||||
if (get_pil() == 15)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int interrupt_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Reference in a new issue