summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/icoll-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-02 04:20:41 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:24 +0100
commit0ba4c3b0787eb349458b0187623bc260d3789ebc (patch)
treee39d75cd87da2921423bd1c3f15c619ff5af07f1 /firmware/target/arm/imx233/icoll-imx233.c
parentab5dfd55aaa37da65a4168d0dc46f9a3a7d8844a (diff)
downloadrockbox-0ba4c3b0787eb349458b0187623bc260d3789ebc.tar.gz
rockbox-0ba4c3b0787eb349458b0187623bc260d3789ebc.tar.bz2
rockbox-0ba4c3b0787eb349458b0187623bc260d3789ebc.zip
imx233: enhance icoll with priority and soft IRQ
Change-Id: If9568ab6e11bf933b2cc607e5a86866a975886bc
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)
#else
info.enabled = BF_RDn(ICOLL_INTERRUPTn, src, ENABLE);
#endif
+#if IMX233_SUBTARGET < 3780
+ info.priority = BF_RDn(ICOLL_PRIORITYn, src / 4, PRIORITYx(src % 4));
+#else
+ info.priority = BF_RDn(ICOLL_INTERRUPTn, src, PRIORITY);
+#endif
info.freq = irq_count_old[src];
return info;
}
@@ -165,6 +170,21 @@ void fiq_handler(void)
{
}
+void imx233_icoll_force_irq(unsigned src, bool enable)
+{
+#if IMX233_SUBTARGET < 3780
+ if(enable)
+ BF_SETn(ICOLL_PRIORITYn, src / 4, SOFTIRQx(src % 4));
+ else
+ BF_CLRn(ICOLL_PRIORITYn, src / 4, SOFTIRQx(src % 4));
+#else
+ if(enable)
+ BF_SETn(ICOLL_INTERRUPTn, src, SOFTIRQ);
+ else
+ BF_CLRn(ICOLL_INTERRUPTn, src, SOFTIRQ);
+#endif
+}
+
void imx233_icoll_enable_interrupt(int src, bool enable)
{
#if IMX233_SUBTARGET < 3780
@@ -180,6 +200,15 @@ void imx233_icoll_enable_interrupt(int src, bool enable)
#endif
}
+void imx233_icoll_set_priority(int src, unsigned prio)
+{
+#if IMX233_SUBTARGET < 3780
+ BF_WRn(ICOLL_PRIORITYn, src / 4, PRIORITYx(src % 4), prio);
+#else
+ BF_WRn(ICOLL_INTERRUPTn, src, PRIORITY, prio);
+#endif
+}
+
void imx233_icoll_init(void)
{
imx233_reset_block(&HW_ICOLL_CTRL);