blob: 2ce3e0130ada47437b1b7aa25bcce2505d34ee8c [file] [log] [blame]
Thomas Gleixner16216332019-05-19 15:51:31 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Peter Hortoncdc3f102010-12-06 11:37:38 +00002/*
3 * Copyright (C) BitBox Ltd 2010
Peter Hortoncdc3f102010-12-06 11:37:38 +00004 */
5
6#include <linux/module.h>
7#include <linux/irq.h>
Fabio Estevambaa25592013-05-24 16:55:41 -03008#include <linux/platform_data/asoc-imx-ssi.h>
Peter Hortoncdc3f102010-12-06 11:37:38 +00009
10#include "irq-common.h"
11
Peter Hortoncdc3f102010-12-06 11:37:38 +000012int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
13{
Shawn Guo8b6c44f2011-06-07 13:59:14 +080014 struct irq_chip_generic *gc;
Hui Wang3439a392011-09-22 17:40:08 +080015 struct mxc_extra_irq *exirq;
Peter Hortoncdc3f102010-12-06 11:37:38 +000016 int ret;
17
18 ret = -ENOSYS;
19
Shawn Guo8b6c44f2011-06-07 13:59:14 +080020 gc = irq_get_chip_data(irq);
21 if (gc && gc->private) {
Hui Wang3439a392011-09-22 17:40:08 +080022 exirq = gc->private;
Alexander Shiyand1e1c312016-06-19 09:55:53 +030023 if (exirq->set_irq_fiq) {
24 struct irq_data *d = irq_get_irq_data(irq);
25 ret = exirq->set_irq_fiq(irqd_to_hwirq(d), type);
26 }
Peter Hortoncdc3f102010-12-06 11:37:38 +000027 }
28
29 return ret;
30}
31EXPORT_SYMBOL(mxc_set_irq_fiq);