@@ -22,6 +22,13 @@
struct fiq_chip {
void (*fiq_enable)(struct irq_data *data);
void (*fiq_disable)(struct irq_data *data);
+
+ /* .fiq_ack() and .fiq_eoi() will be called from the FIQ
+ * handler. For this reason they must not use spin locks (or any
+ * other locks).
+ */
+ int (*fiq_ack)(struct irq_data *data);
+ void (*fiq_eoi)(struct irq_data *data);
};
struct fiq_handler {
@@ -44,6 +51,8 @@ extern void release_fiq(struct fiq_handler *f);
extern void set_fiq_handler(void *start, unsigned int length);
extern void enable_fiq(int fiq);
extern void disable_fiq(int fiq);
+extern int ack_fiq(int fiq);
+extern void eoi_fiq(int fiq);
extern bool has_fiq(int fiq);
extern void fiq_register_mapping(int irq, struct fiq_chip *chip);
@@ -183,6 +183,25 @@ void disable_fiq(int fiq)
disable_irq(fiq + fiq_start);
}
+int ack_fiq(int fiq)
+{
+ struct fiq_data *data = lookup_fiq_data(fiq);
+
+ if (data && data->fiq_chip->fiq_ack)
+ return data->fiq_chip->fiq_ack(data->irq_data);
+
+ return fiq;
+}
+
+void eoi_fiq(int fiq)
+{
+ struct fiq_data *data = lookup_fiq_data(fiq);
+
+ if (data && data->fiq_chip->fiq_eoi)
+ data->fiq_chip->fiq_eoi(data->irq_data);
+}
+EXPORT_SYMBOL(eoi_fiq);
+
bool has_fiq(int fiq)
{
struct fiq_data *data = lookup_fiq_data(fiq);