summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-06-06 16:06:21 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-11 19:51:17 +0000
commitb662af8066a01502429b84879c4e3a885ec10e1b (patch)
tree3b066c18b9ea1402e162de007d367c2018bf598d /include/task.h
parent59d060ebfe68082f4ea87214ffcda976c55176af (diff)
downloadchrome-ec-b662af8066a01502429b84879c4e3a885ec10e1b.tar.gz
minute-ia: move IRQ definitions to common files
By moving the __irq_data extern declaration into link_defs.h, the struct can be used in more than just interrupts.c. In addition, this provides a common struct definiton for IRQ definitions consisting of an IRQ number, the assigned routine, and a handler function, which is a fairly common way to store IRQ definitions. BUG=none BRANCH=none TEST=arcada ISH functions as normal Change-Id: Idbb5780ae965faeade74cfe319364f61dd933d9e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1649375 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/task.h b/include/task.h
index d56a91986e..d68cd74ea2 100644
--- a/include/task.h
+++ b/include/task.h
@@ -329,6 +329,23 @@ struct irq_priority {
};
/*
+ * Some cores may make use of this struct for mapping irqs to handlers
+ * for DECLARE_IRQ in a linker-script defined section.
+ */
+struct irq_def {
+ int irq;
+
+ /* The routine which was declared as an IRQ */
+ void (*routine)(void);
+
+ /*
+ * The routine usually needs wrapped so the core can handle it
+ * as an IRQ.
+ */
+ void (*handler)(void);
+};
+
+/*
* Implement the DECLARE_IRQ(irq, routine, priority) macro which is
* a core specific helper macro to declare an interrupt handler "routine".
*/