summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/jz4740.h4
-rw-r--r--firmware/target/mips/ingenic_jz47xx/system-jz4740.c2
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)
3546#define __tcu_set_pwm_output_shutdown_graceful(n) ( REG_TCU_TCSR((n)) &= ~TCU_TCSR_PWM_SD ) 3546#define __tcu_set_pwm_output_shutdown_graceful(n) ( REG_TCU_TCSR((n)) &= ~TCU_TCSR_PWM_SD )
3547#define __tcu_set_pwm_output_shutdown_abrupt(n) ( REG_TCU_TCSR((n)) |= TCU_TCSR_PWM_SD ) 3547#define __tcu_set_pwm_output_shutdown_abrupt(n) ( REG_TCU_TCSR((n)) |= TCU_TCSR_PWM_SD )
3548 3548
3549#define __tcu_start_counter(n) ( REG_TCU_TESR |= (1 << (n)) ) 3549#define __tcu_start_counter(n) ( REG_TCU_TESR = (1 << (n)) )
3550#define __tcu_stop_counter(n) ( REG_TCU_TECR |= (1 << (n)) ) 3550#define __tcu_stop_counter(n) ( REG_TCU_TECR = (1 << (n)) )
3551 3551
3552#define __tcu_half_match_flag(n) ( REG_TCU_TFR & (1 << ((n) + 16)) ) 3552#define __tcu_half_match_flag(n) ( REG_TCU_TFR & (1 << ((n) + 16)) )
3553#define __tcu_full_match_flag(n) ( REG_TCU_TFR & (1 << (n)) ) 3553#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)
137 if (!gpio_irq_mask[t]) 137 if (!gpio_irq_mask[t])
138 __intc_mask_irq(IRQ_GPIO0 - t); 138 __intc_mask_irq(IRQ_GPIO0 - t);
139 } 139 }
140 else if ((irq >= IRQ_DMA_0) && (irq <= IRQ_DMA_0 + NUM_DMA)) 140 else if ((irq >= IRQ_DMA_0) && (irq < IRQ_DMA_0 + NUM_DMA))
141 { 141 {
142 __dmac_channel_disable_irq(irq - IRQ_DMA_0); 142 __dmac_channel_disable_irq(irq - IRQ_DMA_0);
143 dma_irq_mask &= ~(1 << (irq - IRQ_DMA_0)); 143 dma_irq_mask &= ~(1 << (irq - IRQ_DMA_0));