summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/icoll-imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/icoll-imx233.c')
-rw-r--r--firmware/target/arm/imx233/icoll-imx233.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/icoll-imx233.c b/firmware/target/arm/imx233/icoll-imx233.c
index b753af8d54..cd96b6fae6 100644
--- a/firmware/target/arm/imx233/icoll-imx233.c
+++ b/firmware/target/arm/imx233/icoll-imx233.c
@@ -127,6 +127,11 @@ struct imx233_icoll_irq_info_t imx233_icoll_get_irq_info(int src)
127#else 127#else
128 info.enabled = BF_RDn(ICOLL_INTERRUPTn, src, ENABLE); 128 info.enabled = BF_RDn(ICOLL_INTERRUPTn, src, ENABLE);
129#endif 129#endif
130#if IMX233_SUBTARGET < 3780
131 info.priority = BF_RDn(ICOLL_PRIORITYn, src / 4, PRIORITYx(src % 4));
132#else
133 info.priority = BF_RDn(ICOLL_INTERRUPTn, src, PRIORITY);
134#endif
130 info.freq = irq_count_old[src]; 135 info.freq = irq_count_old[src];
131 return info; 136 return info;
132} 137}
@@ -165,6 +170,21 @@ void fiq_handler(void)
165{ 170{
166} 171}
167 172
173void imx233_icoll_force_irq(unsigned src, bool enable)
174{
175#if IMX233_SUBTARGET < 3780
176 if(enable)
177 BF_SETn(ICOLL_PRIORITYn, src / 4, SOFTIRQx(src % 4));
178 else
179 BF_CLRn(ICOLL_PRIORITYn, src / 4, SOFTIRQx(src % 4));
180#else
181 if(enable)
182 BF_SETn(ICOLL_INTERRUPTn, src, SOFTIRQ);
183 else
184 BF_CLRn(ICOLL_INTERRUPTn, src, SOFTIRQ);
185#endif
186}
187
168void imx233_icoll_enable_interrupt(int src, bool enable) 188void imx233_icoll_enable_interrupt(int src, bool enable)
169{ 189{
170#if IMX233_SUBTARGET < 3780 190#if IMX233_SUBTARGET < 3780
@@ -180,6 +200,15 @@ void imx233_icoll_enable_interrupt(int src, bool enable)
180#endif 200#endif
181} 201}
182 202
203void imx233_icoll_set_priority(int src, unsigned prio)
204{
205#if IMX233_SUBTARGET < 3780
206 BF_WRn(ICOLL_PRIORITYn, src / 4, PRIORITYx(src % 4), prio);
207#else
208 BF_WRn(ICOLL_INTERRUPTn, src, PRIORITY, prio);
209#endif
210}
211
183void imx233_icoll_init(void) 212void imx233_icoll_init(void)
184{ 213{
185 imx233_reset_block(&HW_ICOLL_CTRL); 214 imx233_reset_block(&HW_ICOLL_CTRL);