diff options
-rw-r--r-- | firmware/export/jz4740.h | 4 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/system-jz4740.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/firmware/export/jz4740.h b/firmware/export/jz4740.h index 820b43f880..379c9f8aaa 100644 --- a/firmware/export/jz4740.h +++ b/firmware/export/jz4740.h @@ -3546,8 +3546,8 @@ static __inline__ void __cpm_select_msc_hs_clk(int sd) #define __tcu_set_pwm_output_shutdown_graceful(n) ( REG_TCU_TCSR((n)) &= ~TCU_TCSR_PWM_SD ) #define __tcu_set_pwm_output_shutdown_abrupt(n) ( REG_TCU_TCSR((n)) |= TCU_TCSR_PWM_SD ) -#define __tcu_start_counter(n) ( REG_TCU_TESR |= (1 << (n)) ) -#define __tcu_stop_counter(n) ( REG_TCU_TECR |= (1 << (n)) ) +#define __tcu_start_counter(n) ( REG_TCU_TESR = (1 << (n)) ) +#define __tcu_stop_counter(n) ( REG_TCU_TECR = (1 << (n)) ) #define __tcu_half_match_flag(n) ( REG_TCU_TFR & (1 << ((n) + 16)) ) #define __tcu_full_match_flag(n) ( REG_TCU_TFR & (1 << (n)) ) diff --git a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c index f7df690dd5..ab232baf65 100644 --- a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c @@ -137,7 +137,7 @@ static void dis_irq(unsigned int irq) if (!gpio_irq_mask[t]) __intc_mask_irq(IRQ_GPIO0 - t); } - else if ((irq >= IRQ_DMA_0) && (irq <= IRQ_DMA_0 + NUM_DMA)) + else if ((irq >= IRQ_DMA_0) && (irq < IRQ_DMA_0 + NUM_DMA)) { __dmac_channel_disable_irq(irq - IRQ_DMA_0); dma_irq_mask &= ~(1 << (irq - IRQ_DMA_0)); |