ARC: irq: idu: mask IRQ before level setup
Currently we setup irq trigger type (pulse or level) in IDU before we Mask (disable) IRQ line. The IDU is disabled at this moment, however we still may accidentally generate interrupt by trigger setup. To avoid that let's mask (disable) IRQ before trigger type setup. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
1764e52b78
commit
9eb8baeff9
1 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,9 @@ static void arc_shared_intc_init(void)
|
|||
* TODO: don't use z_arc_connect_idu* functions to avoid
|
||||
* locking/unlocking every time.
|
||||
*/
|
||||
|
||||
/* Disable (mask) line */
|
||||
z_arc_connect_idu_set_mask(i, 0x1);
|
||||
z_arc_connect_idu_set_mode(i, ARC_CONNECT_INTRPT_TRIGGER_LEVEL,
|
||||
ARC_CONNECT_DISTRI_MODE_ROUND_ROBIN);
|
||||
|
||||
|
@ -48,9 +51,6 @@ static void arc_shared_intc_init(void)
|
|||
* secondary cores may be not initialized yet.
|
||||
*/
|
||||
z_arc_connect_idu_set_dest(i, BIT(ARC_MP_PRIMARY_CPU_ID));
|
||||
|
||||
/* Disable (mask) line */
|
||||
z_arc_connect_idu_set_mask(i, 0x1);
|
||||
}
|
||||
|
||||
z_arc_connect_idu_enable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue