File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
drivers/interrupt_controller
include/zephyr/drivers/interrupt_controller Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 22 * Copyright (c) 2018 Marvell
33 * Copyright (c) 2018 Lexmark International, Inc.
44 * Copyright (c) 2019 Stephanos Ioannidis <[email protected] > 5+ * Copyright 2024 NXP
56 *
67 * SPDX-License-Identifier: Apache-2.0
78 */
@@ -79,6 +80,16 @@ bool arm_gic_irq_is_pending(unsigned int irq)
7980 return (enabler & (1 << int_off )) != 0 ;
8081}
8182
83+ void arm_gic_irq_set_pending (unsigned int irq )
84+ {
85+ int int_grp , int_off ;
86+
87+ int_grp = irq / 32 ;
88+ int_off = irq % 32 ;
89+
90+ sys_write32 ((1 << int_off ), (GICD_ISPENDRn + int_grp * 4 ));
91+ }
92+
8293void arm_gic_irq_clear_pending (unsigned int irq )
8394{
8495 int int_grp , int_off ;
Original file line number Diff line number Diff line change 11/*
22 * Copyright 2020 Broadcom
3+ * Copyright 2024 NXP
34 *
45 * SPDX-License-Identifier: Apache-2.0
56 */
@@ -227,6 +228,14 @@ bool arm_gic_irq_is_pending(unsigned int intid)
227228 return (val & mask ) != 0 ;
228229}
229230
231+ void arm_gic_irq_set_pending (unsigned int intid )
232+ {
233+ uint32_t mask = BIT (intid & (GIC_NUM_INTR_PER_REG - 1 ));
234+ uint32_t idx = intid / GIC_NUM_INTR_PER_REG ;
235+
236+ sys_write32 (mask , ISPENDR (GET_DIST_BASE (intid ), idx ));
237+ }
238+
230239void arm_gic_irq_clear_pending (unsigned int intid )
231240{
232241 uint32_t mask = BIT (intid & (GIC_NUM_INTR_PER_REG - 1 ));
Original file line number Diff line number Diff line change @@ -302,6 +302,13 @@ bool arm_gic_irq_is_enabled(unsigned int irq);
302302 */
303303bool arm_gic_irq_is_pending (unsigned int irq );
304304
305+ /**
306+ * @brief Set interrupt as pending
307+ *
308+ * @param irq interrupt ID
309+ */
310+ void arm_gic_irq_set_pending (unsigned int irq );
311+
305312/**
306313 * @brief Clear the pending irq
307314 *
You can’t perform that action at this time.
0 commit comments