diff options
Diffstat (limited to 'firmware/target/arm/rk27xx')
-rw-r--r-- | firmware/target/arm/rk27xx/kernel-rk27xx.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/pcm-rk27xx.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/sd-rk27xx.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/timer-rk27xx.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/usb-drv-rk27xx.c | 4 |
5 files changed, 16 insertions, 12 deletions
diff --git a/firmware/target/arm/rk27xx/kernel-rk27xx.c b/firmware/target/arm/rk27xx/kernel-rk27xx.c index 26911c0ad6..012cc9acc7 100644 --- a/firmware/target/arm/rk27xx/kernel-rk27xx.c +++ b/firmware/target/arm/rk27xx/kernel-rk27xx.c @@ -46,9 +46,9 @@ void tick_start(unsigned int interval_in_ms) TMR0CON = (1<<8) | (1<<7) | (1<<1); /* periodic, 1/1, interrupt enable */ /* unmask timer0 interrupt */ - INTC_IMR |= 0x04; + INTC_IMR |= IRQ_ARM_TIMER0; /* enable timer0 interrupt */ - INTC_IECR |= 0x04; + INTC_IECR |= IRQ_ARM_TIMER0; } diff --git a/firmware/target/arm/rk27xx/pcm-rk27xx.c b/firmware/target/arm/rk27xx/pcm-rk27xx.c index 56c191a0d6..a4ce568a83 100644 --- a/firmware/target/arm/rk27xx/pcm-rk27xx.c +++ b/firmware/target/arm/rk27xx/pcm-rk27xx.c @@ -35,7 +35,7 @@ void pcm_play_lock(void) if (++locked == 1) { int old = disable_irq_save(); - INTC_IMR &= ~(1<<12); /* mask HDMA interrupt */ + INTC_IMR &= ~IRQ_ARM_HDMA; /* mask HDMA interrupt */ restore_irq(old); } } @@ -46,7 +46,7 @@ void pcm_play_unlock(void) if(--locked == 0) { int old = disable_irq_save(); - INTC_IMR |= (1<<12); /* unmask HDMA interrupt */ + INTC_IMR |= IRQ_ARM_HDMA; /* unmask HDMA interrupt */ restore_irq(old); } } @@ -241,8 +241,8 @@ static void set_codec_freq(unsigned int freq) void pcm_play_dma_init(void) { /* unmask HDMA interrupt in INTC */ - INTC_IMR |= (1<<12); - INTC_IECR |= (1<<12); + INTC_IMR |= IRQ_ARM_HDMA; + INTC_IECR |= IRQ_ARM_HDMA; audiohw_preinit(); diff --git a/firmware/target/arm/rk27xx/sd-rk27xx.c b/firmware/target/arm/rk27xx/sd-rk27xx.c index cb5c02e0b6..d6a3b11a50 100644 --- a/firmware/target/arm/rk27xx/sd-rk27xx.c +++ b/firmware/target/arm/rk27xx/sd-rk27xx.c @@ -402,8 +402,8 @@ static void init_controller(void) /* enable and unmask SD interrupts in interrupt controller */ SCU_CLKCFG &= ~CLKCFG_SD; - INTC_IMR |= (1<<10); - INTC_IECR |= (1<<10); + INTC_IMR |= IRQ_ARM_SD; + INTC_IECR |= IRQ_ARM_SD; SD_CTRL = SD_PWR_CPU | SD_DETECT_MECH | SD_CLOCK_EN | 0x7D; SD_INT = CMD_RES_INT_EN | DATA_XFER_INT_EN; diff --git a/firmware/target/arm/rk27xx/timer-rk27xx.c b/firmware/target/arm/rk27xx/timer-rk27xx.c index 4493ccdfa9..116f169e2d 100644 --- a/firmware/target/arm/rk27xx/timer-rk27xx.c +++ b/firmware/target/arm/rk27xx/timer-rk27xx.c @@ -52,10 +52,10 @@ bool timer_set(long cycles, bool start) TMR1CON = (1<<7) | (1<<1); /* periodic, 1/1 */ /* unmask timer1 interrupt */ - INTC_IMR |= (1<<3); + INTC_IMR |= IRQ_ARM_TIMER1; /* enable timer1 interrupt */ - INTC_IECR |= (1<<3); + INTC_IECR |= IRQ_ARM_TIMER1; return true; } @@ -70,5 +70,9 @@ bool timer_start(void) void timer_stop(void) { TMR1CON &= ~(1 << 8); /* timer1 disable */ + + /* disable timer1 interrupt */ + INTC_IMR &= ~IRQ_ARM_TIMER1; + INTC_IECR &= ~IRQ_ARM_TIMER1; } diff --git a/firmware/target/arm/rk27xx/usb-drv-rk27xx.c b/firmware/target/arm/rk27xx/usb-drv-rk27xx.c index 9fdfe64f62..e60bef584f 100644 --- a/firmware/target/arm/rk27xx/usb-drv-rk27xx.c +++ b/firmware/target/arm/rk27xx/usb-drv-rk27xx.c @@ -715,8 +715,8 @@ void usb_drv_exit(void) DEV_CTL = DEV_SELF_PWR; /* disable USB interrupts in interrupt controller */ - INTC_IMR &= ~(1<<16); - INTC_IECR &= ~(1<<16); + INTC_IMR &= ~IRQ_ARM_UDC; + INTC_IECR &= ~IRQ_ARM_UDC; /* we cannot disable UDC clock since this causes data abort * when reading DEV_INFO in order to check usb connect event |