forked from len0rd/rockbox
Change the remaining set_interrupt_status usage to the more parsimonious disable/enable/restore.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16897 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2ea0206502
commit
75f2d441e9
8 changed files with 15 additions and 17 deletions
|
|
@ -150,7 +150,7 @@ void main(void)
|
||||||
printf("kernel init done");
|
printf("kernel init done");
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
set_interrupt_status(IRQ_FIQ_ENABLED, IRQ_FIQ_STATUS);
|
disable_interrupt(IRQ_FIQ_STATUS);
|
||||||
|
|
||||||
rc = ata_init();
|
rc = ata_init();
|
||||||
if(rc)
|
if(rc)
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,7 @@ void avic_set_int_priority(enum IMX31_INT_LIST ints,
|
||||||
void avic_enable_int(enum IMX31_INT_LIST ints, enum INT_TYPE intstype,
|
void avic_enable_int(enum IMX31_INT_LIST ints, enum INT_TYPE intstype,
|
||||||
unsigned long ni_priority, void (*handler)(void))
|
unsigned long ni_priority, void (*handler)(void))
|
||||||
{
|
{
|
||||||
int oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED,
|
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||||
IRQ_FIQ_STATUS);
|
|
||||||
|
|
||||||
if (ints != ALL) /* No mass-enable allowed */
|
if (ints != ALL) /* No mass-enable allowed */
|
||||||
{
|
{
|
||||||
|
|
@ -136,7 +135,7 @@ void avic_enable_int(enum IMX31_INT_LIST ints, enum INT_TYPE intstype,
|
||||||
avic_set_int_priority(ints, ni_priority);
|
avic_set_int_priority(ints, ni_priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_interrupt_status(oldstatus, IRQ_FIQ_STATUS);
|
restore_interrupt(oldstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void avic_disable_int(enum IMX31_INT_LIST ints)
|
void avic_disable_int(enum IMX31_INT_LIST ints)
|
||||||
|
|
@ -184,8 +183,7 @@ static void set_int_type(int i, enum INT_TYPE intstype)
|
||||||
|
|
||||||
void avic_set_int_type(enum IMX31_INT_LIST ints, enum INT_TYPE intstype)
|
void avic_set_int_type(enum IMX31_INT_LIST ints, enum INT_TYPE intstype)
|
||||||
{
|
{
|
||||||
int oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED,
|
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||||
IRQ_FIQ_STATUS);
|
|
||||||
|
|
||||||
if (ints == ALL)
|
if (ints == ALL)
|
||||||
{
|
{
|
||||||
|
|
@ -198,5 +196,5 @@ void avic_set_int_type(enum IMX31_INT_LIST ints, enum INT_TYPE intstype)
|
||||||
set_int_type(ints, intstype);
|
set_int_type(ints, intstype);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_interrupt_status(oldstatus, IRQ_FIQ_STATUS);
|
restore_interrupt(oldstatus);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ void system_init(void)
|
||||||
#ifdef BOOTLOADER
|
#ifdef BOOTLOADER
|
||||||
void system_prepare_fw_start(void)
|
void system_prepare_fw_start(void)
|
||||||
{
|
{
|
||||||
set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
disable_interrupt(IRQ_FIQ_STATUS);
|
||||||
avic_disable_int(ALL);
|
avic_disable_int(ALL);
|
||||||
tick_stop();
|
tick_stop();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ bool ide_powered(void)
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
{
|
{
|
||||||
/* Disable interrupts on this core */
|
/* Disable interrupts on this core */
|
||||||
set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
disable_interrupt(IRQ_FIQ_STATUS);
|
||||||
|
|
||||||
/* Mask them on both cores */
|
/* Mask them on both cores */
|
||||||
CPU_INT_CLR = -1;
|
CPU_INT_CLR = -1;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ void power_off(void)
|
||||||
char byte;
|
char byte;
|
||||||
|
|
||||||
/* Disable interrupts on this core */
|
/* Disable interrupts on this core */
|
||||||
set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
disable_interrupt(IRQ_FIQ_STATUS);
|
||||||
|
|
||||||
/* Mask them on both cores */
|
/* Mask them on both cores */
|
||||||
CPU_INT_CLR = -1;
|
CPU_INT_CLR = -1;
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ void scale_suspend_core(bool suspend)
|
||||||
|
|
||||||
if (suspend)
|
if (suspend)
|
||||||
{
|
{
|
||||||
oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||||
IF_COP( PROC_CTL(othercore) = 0x40000000; nop; )
|
IF_COP( PROC_CTL(othercore) = 0x40000000; nop; )
|
||||||
PROC_CTL(core) = 0x48000003; nop;
|
PROC_CTL(core) = 0x48000003; nop;
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +157,7 @@ void scale_suspend_core(bool suspend)
|
||||||
{
|
{
|
||||||
PROC_CTL(core) = 0x4800001f; nop;
|
PROC_CTL(core) = 0x4800001f; nop;
|
||||||
IF_COP( PROC_CTL(othercore) = 0x00000000; nop; )
|
IF_COP( PROC_CTL(othercore) = 0x00000000; nop; )
|
||||||
set_interrupt_status(oldstatus, IRQ_FIQ_STATUS);
|
restore_interrupt(oldstatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ bool ide_powered(void)
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
{
|
{
|
||||||
/* Disable interrupts on this core */
|
/* Disable interrupts on this core */
|
||||||
set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
disable_interrupt(IRQ_FIQ_STATUS);
|
||||||
|
|
||||||
/* Shutdown: stop XIN oscillator */
|
/* Shutdown: stop XIN oscillator */
|
||||||
CLKCTRL &= ~(1 << 31);
|
CLKCTRL &= ~(1 << 31);
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ static void stop_timer(void)
|
||||||
|
|
||||||
bool __timer_register(void)
|
bool __timer_register(void)
|
||||||
{
|
{
|
||||||
int oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||||
|
|
||||||
stop_timer();
|
stop_timer();
|
||||||
|
|
||||||
|
|
@ -85,14 +85,14 @@ bool __timer_register(void)
|
||||||
|
|
||||||
IO_INTC_EINT0 |= 1<<IRQ_TIMER0;
|
IO_INTC_EINT0 |= 1<<IRQ_TIMER0;
|
||||||
|
|
||||||
set_interrupt_status(oldstatus, IRQ_FIQ_STATUS);
|
restore_interrupt(oldstatus);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __timer_unregister(void)
|
void __timer_unregister(void)
|
||||||
{
|
{
|
||||||
int oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS);
|
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||||
stop_timer();
|
stop_timer();
|
||||||
set_interrupt_status(oldstatus, IRQ_FIQ_STATUS);
|
restore_interrupt(oldstatus);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue