Skip to content

Commit 2661bc2

Browse files
TomoYamanakaadbridge
authored andcommitted
Add GIC_SetConfigration function to satisfy Cortex-A interrupt spec
By updating to the codes of CMSIS5/RTX5, GIC_SetConfigration() function was added for Cortex-A, this function is set the interrupt configuration using GIC's ICFGR register. Therefore, I added this function to satisfy Cortex-A interrupt spec in the below files. "can_api.c", "ethernet_api.c", "gpio_irq_api.c", "i2c_api.c", "spi_api.c" and "us_ticker.c"
1 parent c30e107 commit 2661bc2

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ void can_irq_set(can_t *obj, CanIrqType type, uint32_t enable) {
340340
}
341341
InterruptHandlerRegister(can_int_info[obj->ch][type].int_num, can_int_info[obj->ch][type].handler);
342342
GIC_SetPriority(can_int_info[obj->ch][type].int_num, 5);
343+
GIC_SetConfiguration(can_int_info[obj->ch][type].int_num, 1);
343344
GIC_EnableIRQ(can_int_info[obj->ch][type].int_num);
344345
} else {
345346
GIC_DisableIRQ(can_int_info[obj->ch][type].int_num);

targets/TARGET_RENESAS/TARGET_RZ_A1H/ethernet_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ static void lan_reg_set(int32_t link) {
582582
ETHERECSIPR0 &= ~0x00000011; /* PFROIP Disable, ICDIP Disable */
583583
InterruptHandlerRegister(ETHERI_IRQn, INT_Ether); /* Ethernet interrupt handler registration */
584584
GIC_SetPriority(ETHERI_IRQn, Interrupt_priority); /* Ethernet interrupt priority */
585+
GIC_SetConfiguration(ETHERI_IRQn, 1);
585586
GIC_EnableIRQ(ETHERI_IRQn); /* Enables the E-DMAC interrupt */
586587
}
587588

targets/TARGET_RENESAS/TARGET_RZ_A1H/gpio_irq_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32
166166
InterruptHandlerRegister((IRQn_Type)(nIRQn_h+obj->ch), (void (*)(uint32_t))irq_tbl[obj->ch]);
167167
INTCICR1 &= ~(0x3 << shift);
168168
GIC_SetPriority((IRQn_Type)(nIRQn_h+obj->ch), 5);
169+
GIC_SetConfiguration((IRQn_Type)(nIRQn_h + obj->ch), 1);
169170
obj->int_enable = 1;
170171
__enable_irq();
171172

targets/TARGET_RENESAS/TARGET_RZ_A1H/i2c_api.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,11 @@ static void i2c_irqs_set(i2c_t *obj, uint32_t enable)
10621062
if (enable) {
10631063
InterruptHandlerRegister(irqTable[i], handlerTable[i]);
10641064
GIC_SetPriority(irqTable[i], 5);
1065+
if (i == 1) {
1066+
GIC_SetConfiguration(irqTable[i], 3);
1067+
} else {
1068+
GIC_SetConfiguration(irqTable[i], 1);
1069+
}
10651070
GIC_EnableIRQ(irqTable[i]);
10661071
} else {
10671072
GIC_DisableIRQ(irqTable[i]);

targets/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ static void spi_irqs_set(spi_t *obj, uint32_t enable)
447447
if (enable) {
448448
InterruptHandlerRegister(irqTable[i], handlerTable[i]);
449449
GIC_SetPriority(irqTable[i], 5);
450+
GIC_SetConfiguration(irqTable[i], 1);
450451
GIC_EnableIRQ(irqTable[i]);
451452
} else {
452453
GIC_DisableIRQ(irqTable[i]);

targets/TARGET_RENESAS/TARGET_RZ_A1H/us_ticker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ void us_ticker_init(void) {
6262
// INTC settings
6363
InterruptHandlerRegister(US_TICKER_TIMER_IRQn, (void (*)(uint32_t))us_ticker_interrupt);
6464
GIC_SetPriority(US_TICKER_TIMER_IRQn, 5);
65+
GIC_SetConfiguration(US_TICKER_TIMER_IRQn, 3);
6566
GIC_EnableIRQ(US_TICKER_TIMER_IRQn);
6667
}
6768

0 commit comments

Comments
 (0)