summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-07-18 11:54:01 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-07-18 11:54:01 +0000
commit17b8805b49e1f3c096b885982b6e81a6742f6662 (patch)
treef3bcd7af34873617081c86ed40ff5056852ada96 /firmware
parent9be28179e467274e97b809bd45ca1ef34104a98d (diff)
downloadrockbox-17b8805b49e1f3c096b885982b6e81a6742f6662.tar.gz
rockbox-17b8805b49e1f3c096b885982b6e81a6742f6662.tar.bz2
rockbox-17b8805b49e1f3c096b885982b6e81a6742f6662.zip
S5L8700: fix off-by-one error in kernel timer and fix incorrect interrupt mask in pcm driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21950 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/s5l8700/kernel-s5l8700.c4
-rw-r--r--firmware/target/arm/s5l8700/pcm-s5l8700.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/s5l8700/kernel-s5l8700.c b/firmware/target/arm/s5l8700/kernel-s5l8700.c
index cfa13aab2c..6f131d93f8 100644
--- a/firmware/target/arm/s5l8700/kernel-s5l8700.c
+++ b/firmware/target/arm/s5l8700/kernel-s5l8700.c
@@ -44,13 +44,13 @@ void tick_start(unsigned int interval_in_ms)
/* configure timer for 10 kHz */
TBCMD = (1 << 1); /* TB_CLR */
- TBPRE = 624; /* prescaler */
+ TBPRE = 625 - 1; /* prescaler */
TBCON = (0 << 13) | /* TB_INT1_EN */
(1 << 12) | /* TB_INT0_EN */
(0 << 11) | /* TB_START */
(2 << 8) | /* TB_CS = PCLK / 16 */
(0 << 4); /* TB_MODE_SEL = interval mode */
- TBDATA0 = cycles-1; /* set interval period */
+ TBDATA0 = cycles; /* set interval period */
TBCMD = (1 << 0); /* TB_EN */
/* enable timer interrupt */
diff --git a/firmware/target/arm/s5l8700/pcm-s5l8700.c b/firmware/target/arm/s5l8700/pcm-s5l8700.c
index 38b581b80c..7a4bdeb174 100644
--- a/firmware/target/arm/s5l8700/pcm-s5l8700.c
+++ b/firmware/target/arm/s5l8700/pcm-s5l8700.c
@@ -75,7 +75,7 @@ void pcm_play_lock(void)
void pcm_play_unlock(void)
{
if (--locked == 0) {
- INTMSK |= ~(1 << 10);
+ INTMSK |= (1 << 10);
}
}