mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
jz4740: Timer not re-enabled properly
(same fix as g#2703 for the jz4760) Change-Id: Ic6467d9e6085e3057528b6d1a08b7c07e9dceab4
This commit is contained in:
parent
77019c2c3c
commit
4a6d8e91bb
1 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "jz4740.h"
|
#include "jz4740.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
@ -61,7 +61,7 @@ bool timer_set(long cycles, bool start)
|
||||||
{
|
{
|
||||||
__tcu_disable_pwm_output(1);
|
__tcu_disable_pwm_output(1);
|
||||||
|
|
||||||
__tcu_mask_half_match_irq(1);
|
__tcu_mask_half_match_irq(1);
|
||||||
__tcu_unmask_full_match_irq(1);
|
__tcu_unmask_full_match_irq(1);
|
||||||
|
|
||||||
/* EXTAL clock = CFG_EXTAL (12Mhz in most targets) */
|
/* EXTAL clock = CFG_EXTAL (12Mhz in most targets) */
|
||||||
|
|
@ -78,10 +78,10 @@ bool timer_set(long cycles, bool start)
|
||||||
if(start)
|
if(start)
|
||||||
{
|
{
|
||||||
system_enable_irq(IRQ_TCU1);
|
system_enable_irq(IRQ_TCU1);
|
||||||
__tcu_start_counter(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_irq(old_irq);
|
restore_irq(old_irq);
|
||||||
|
__tcu_start_counter(1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue