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:23:32 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:24 +0100
commitcefaabfe9d284e3eaa049819be0c06ac6c37a29b (patch)
tree2e3d7aa512b25c370be1f818acf399e38ecf81bd /firmware/target/arm/imx233/icoll-imx233.c
parent55877f442a6b2fd29af8f35c64ea59c42442927e (diff)
downloadrockbox-cefaabfe9d284e3eaa049819be0c06ac6c37a29b.tar.gz
rockbox-cefaabfe9d284e3eaa049819be0c06ac6c37a29b.tar.bz2
rockbox-cefaabfe9d284e3eaa049819be0c06ac6c37a29b.zip
imx233: cleanup icoll and add software irq sources
Change-Id: I4cf2b0b74cf391021afaec08329ec7cf5dbd578d
Diffstat (limited to 'firmware/target/arm/imx233/icoll-imx233.c')
-rw-r--r--firmware/target/arm/imx233/icoll-imx233.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/firmware/target/arm/imx233/icoll-imx233.c b/firmware/target/arm/imx233/icoll-imx233.c
index cd96b6fae6..1c8774ad80 100644
--- a/firmware/target/arm/imx233/icoll-imx233.c
+++ b/firmware/target/arm/imx233/icoll-imx233.c
@@ -70,10 +70,14 @@ default_interrupt(INT_LCDIF_ERROR);
/* STMP3780+ specific */
#if IMX233_SUBTARGET >= 3780
#endif
+default_interrupt(INT_SOFTWARE0);
+default_interrupt(INT_SOFTWARE1);
+default_interrupt(INT_SOFTWARE2);
+default_interrupt(INT_SOFTWARE3);
typedef void (*isr_t)(void);
-static isr_t isr_table[INT_SRC_NR_SOURCES] =
+static isr_t isr_table[INT_SRC_COUNT] =
{
[INT_SRC_USB_CTRL] = INT_USB_CTRL,
[INT_SRC_TIMER(0)] = INT_TIMER0,
@@ -111,13 +115,17 @@ static isr_t isr_table[INT_SRC_NR_SOURCES] =
#endif
#if IMX233_SUBTARGET >= 3780
#endif
+ [INT_SRC_SOFTWARE(0)] = INT_SOFTWARE0,
+ [INT_SRC_SOFTWARE(1)] = INT_SOFTWARE1,
+ [INT_SRC_SOFTWARE(2)] = INT_SOFTWARE2,
+ [INT_SRC_SOFTWARE(3)] = INT_SOFTWARE3,
};
#define IRQ_STORM_DELAY 100 /* ms */
#define IRQ_STORM_THRESHOLD 100000 /* allows irq / delay */
-static uint32_t irq_count_old[INT_SRC_NR_SOURCES];
-static uint32_t irq_count[INT_SRC_NR_SOURCES];
+static uint32_t irq_count_old[INT_SRC_COUNT];
+static uint32_t irq_count[INT_SRC_COUNT];
struct imx233_icoll_irq_info_t imx233_icoll_get_irq_info(int src)
{
@@ -215,10 +223,10 @@ void imx233_icoll_init(void)
/* disable all interrupts */
/* priority = 0, disable, disable fiq */
#if IMX233_SUBTARGET >= 3780
- for(int i = 0; i < INT_SRC_NR_SOURCES; i++)
+ for(int i = 0; i < INT_SRC_COUNT; i++)
HW_ICOLL_INTERRUPTn(i) = 0;
#else
- for(int i = 0; i < INT_SRC_NR_SOURCES / 4; i++)
+ for(int i = 0; i < INT_SRC_COUNT / 4; i++)
HW_ICOLL_PRIORITYn(i) = 0;
#endif
/* setup vbase as isr_table */
@@ -226,4 +234,3 @@ void imx233_icoll_init(void)
/* enable final irq bit */
BF_SET(ICOLL_CTRL, IRQ_FINAL_ENABLE);
}
-