1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2010-2015, Intel Corporation.
5 */
6
7 #include "sp.h"
8
9 #ifndef __INLINE_SP__
10 #include "sp_private.h"
11 #endif /* __INLINE_SP__ */
12
13 #include "assert_support.h"
14
cnd_sp_irq_enable(const sp_ID_t ID,const bool cnd)15 void cnd_sp_irq_enable(
16 const sp_ID_t ID,
17 const bool cnd)
18 {
19 if (cnd) {
20 sp_ctrl_setbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
21 /* Enabling the IRQ immediately triggers an interrupt, clear it */
22 sp_ctrl_setbit(ID, SP_IRQ_CLEAR_REG, SP_IRQ_CLEAR_BIT);
23 } else {
24 sp_ctrl_clearbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
25 }
26 }
27