summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s3c2440/gigabeat-fx
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-03-26 01:50:41 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-03-26 01:50:41 +0000
commitaf395f4db6ad7b83f9d9afefb1c0ceeedd140a45 (patch)
treeb631289b4a3b28d3c65b10d272d50298f377c69f /firmware/target/arm/s3c2440/gigabeat-fx
parent74d678fdbcbc427c057e7682ba0a0566e49a8b97 (diff)
Do core interrupt masking in a less general fashion and save some instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx')
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c12
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
index 7f25cb6a15..00be543bb6 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
@@ -66,27 +66,27 @@ static void _pcm_apply_settings(void)
void pcm_apply_settings(void)
{
- int oldstatus = set_fiq_status(FIQ_DISABLED);
+ int status = disable_fiq_save();
_pcm_apply_settings();
- set_fiq_status(oldstatus);
+ restore_fiq(status);
}
/* For the locks, DMA interrupt must be disabled because the handler
manipulates INTMSK and the operation is not atomic */
void pcm_play_lock(void)
{
- int status = set_fiq_status(FIQ_DISABLED);
+ int status = disable_fiq_save();
if (++dma_play_lock.locked == 1)
INTMSK |= (1<<19); /* Mask the DMA interrupt */
- set_fiq_status(status);
+ restore_fiq(status);
}
void pcm_play_unlock(void)
{
- int status = set_fiq_status(FIQ_DISABLED);
+ int status = disable_fiq_save();
if (--dma_play_lock.locked == 0)
INTMSK &= ~dma_play_lock.state; /* Unmask the DMA interrupt if enabled */
- set_fiq_status(status);
+ restore_fiq(status);
}
void pcm_play_dma_init(void)
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
index 7df20f7149..b59e95806d 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/timer-meg-fx.c
@@ -66,7 +66,7 @@ bool __timer_set(long cycles, bool start)
pfn_unregister = NULL;
}
- oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
+ oldlevel = disable_irq_save();
TCMPB0 = 0;
TCNTB0 = (unsigned int)cycles / prescaler;
@@ -77,7 +77,7 @@ bool __timer_set(long cycles, bool start)
TCFG0 = (TCFG0 & ~0xff) | (prescaler - 1);
TCFG1 = (TCFG1 & ~0xf) | divider;
- set_irq_level(oldlevel);
+ restore_irq(oldlevel);
retval = true;
}