summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/pcm-as3525.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-07-02 06:00:00 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-07-02 06:00:00 +0000
commit0f47ffe0e429c1457e16fddb5f27abc9bf802535 (patch)
tree6dc6c22865f35b43b7fc0e1dab168ac2f170f965 /firmware/target/arm/as3525/pcm-as3525.c
parent9d6851688e018b50e296756beffc9ced97b72df0 (diff)
AMS SoC's: Some register bit changes need interrupt protection: timer API and CGU_PERI.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27236 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/pcm-as3525.c')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index 8c5bb67076..720f615ba9 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -103,7 +103,7 @@ void pcm_play_dma_start(const void *addr, size_t size)
dma_size = size;
dma_start_addr = (unsigned char*)addr;
- CGU_PERI |= CGU_I2SOUT_APB_CLOCK_ENABLE;
+ bitset32(&CGU_PERI, CGU_I2SOUT_APB_CLOCK_ENABLE);
CGU_AUDIO |= (1<<11);
dma_retain();
@@ -121,7 +121,7 @@ void pcm_play_dma_stop(void)
dma_release();
- CGU_PERI &= ~CGU_I2SOUT_APB_CLOCK_ENABLE;
+ bitclr32(&CGU_PERI, CGU_I2SOUT_APB_CLOCK_ENABLE);
CGU_AUDIO &= ~(1<<11);
}
@@ -137,7 +137,7 @@ void pcm_play_dma_pause(bool pause)
void pcm_play_dma_init(void)
{
- CGU_PERI |= CGU_I2SOUT_APB_CLOCK_ENABLE;
+ bitset32(&CGU_PERI, CGU_I2SOUT_APB_CLOCK_ENABLE);
I2SOUT_CONTROL = (1<<6)|(1<<3) /* enable dma, stereo */;
@@ -339,7 +339,8 @@ void pcm_rec_dma_stop(void)
I2SIN_CONTROL &= ~(1<<11); /* disable dma */
CGU_AUDIO &= ~((1<<23)|(1<<11));
- CGU_PERI &= ~(CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE);
+ bitclr32(&CGU_PERI, CGU_I2SIN_APB_CLOCK_ENABLE |
+ CGU_I2SOUT_APB_CLOCK_ENABLE);
}
@@ -354,7 +355,8 @@ void pcm_rec_dma_start(void *addr, size_t size)
dma_retain();
- CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE;
+ bitset32(&CGU_PERI, CGU_I2SIN_APB_CLOCK_ENABLE |
+ CGU_I2SOUT_APB_CLOCK_ENABLE);
CGU_AUDIO |= ((1<<23)|(1<<11));
I2SIN_CONTROL |= (1<<11)|(1<<5); /* enable dma, 14bits samples */