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_irq_get_status(u8 group, u32 *irq_status);
25 int imx_scu_soc_init(struct device *dev);
26 #else
imx_scu_soc_init(struct device * dev)27 static inline int imx_scu_soc_init(struct device *dev)
28 {
29 	return -EOPNOTSUPP;
30 }
31 
imx_scu_enable_general_irq_channel(struct device * dev)32 static inline int imx_scu_enable_general_irq_channel(struct device *dev)
33 {
34 	return -EOPNOTSUPP;
35 }
36 
imx_scu_irq_register_notifier(struct notifier_block * nb)37 static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
38 {
39 	return -EOPNOTSUPP;
40 }
41 
imx_scu_irq_unregister_notifier(struct notifier_block * nb)42 static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
43 {
44 	return -EOPNOTSUPP;
45 }
46 
imx_scu_irq_group_enable(u8 group,u32 mask,u8 enable)47 static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
48 {
49 	return -EOPNOTSUPP;
50 }
51 
imx_scu_irq_get_status(u8 group,u32 * irq_status)52 static inline int imx_scu_irq_get_status(u8 group, u32 *irq_status)
53 {
54 	return -EOPNOTSUPP;
55 }
56 #endif
57 #endif /* _SC_SCI_H */
58