xref: /openbmc/linux/include/linux/firmware/imx/sci.h (revision 75b1a8f9)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2016 Freescale Semiconductor, Inc.
4  * Copyright 2017~2018 NXP
5  *
6  * Header file containing the public System Controller Interface (SCI)
7  * definitions.
8  */
9 
10 #ifndef _SC_SCI_H
11 #define _SC_SCI_H
12 
13 #include <linux/firmware/imx/ipc.h>
14 
15 #include <linux/firmware/imx/svc/misc.h>
16 #include <linux/firmware/imx/svc/pm.h>
17 #include <linux/firmware/imx/svc/rm.h>
18 
19 #if IS_ENABLED(CONFIG_IMX_SCU)
20 int imx_scu_enable_general_irq_channel(struct device *dev);
21 int imx_scu_irq_register_notifier(struct notifier_block *nb);
22 int imx_scu_irq_unregister_notifier(struct notifier_block *nb);
23 int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);
24 int imx_scu_soc_init(struct device *dev);
25 #else
26 static inline int imx_scu_soc_init(struct device *dev)
27 {
28 	return -ENOTSUPP;
29 }
30 
31 static inline int imx_scu_enable_general_irq_channel(struct device *dev)
32 {
33 	return -ENOTSUPP;
34 }
35 
36 static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
37 {
38 	return -ENOTSUPP;
39 }
40 
41 static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
42 {
43 	return -ENOTSUPP;
44 }
45 
46 static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
47 {
48 	return -ENOTSUPP;
49 }
50 #endif
51 #endif /* _SC_SCI_H */
52