linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case
@ 2020-03-09  0:38 Anson Huang
  2020-03-09  0:38 ` [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support Anson Huang
                   ` (7 more replies)
  0 siblings, 8 replies; 37+ messages in thread
From: Anson Huang @ 2020-03-09  0:38 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, gregkh, linux, tglx, m.felsch,
	andriy.shevchenko, arnd, ronald, krzk, robh, leonard.crestez,
	aisheng.dong, linux-arm-kernel, linux-kernel, linux-input,
	linux-rtc, linux-pm, linux-watchdog
  Cc: Linux-imx

Add stubs for those i.MX SCU APIs to make those modules depending
on IMX_SCU can pass build when COMPILE_TEST is enabled.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V2:
	- return error for stubs.
---
 include/linux/firmware/imx/ipc.h | 11 +++++++++++
 include/linux/firmware/imx/sci.h | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/include/linux/firmware/imx/ipc.h b/include/linux/firmware/imx/ipc.h
index 8910574..9e3d808 100644
--- a/include/linux/firmware/imx/ipc.h
+++ b/include/linux/firmware/imx/ipc.h
@@ -34,6 +34,7 @@ struct imx_sc_rpc_msg {
 	uint8_t func;
 };
 
+#ifdef CONFIG_IMX_SCU
 /*
  * This is an function to send an RPC message over an IPC channel.
  * It is called by client-side SCFW API function shims.
@@ -55,4 +56,14 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp);
  * @return Returns an error code (0 = success, failed if < 0)
  */
 int imx_scu_get_handle(struct imx_sc_ipc **ipc);
+#else
+static inline int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc)
+{
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_IPC_H */
diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h
index 17ba4e4..022129b 100644
--- a/include/linux/firmware/imx/sci.h
+++ b/include/linux/firmware/imx/sci.h
@@ -16,8 +16,27 @@
 #include <linux/firmware/imx/svc/misc.h>
 #include <linux/firmware/imx/svc/pm.h>
 
+#ifdef CONFIG_IMX_SCU
 int imx_scu_enable_general_irq_channel(struct device *dev);
 int imx_scu_irq_register_notifier(struct notifier_block *nb);
 int imx_scu_irq_unregister_notifier(struct notifier_block *nb);
 int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);
+#else
+static inline int imx_scu_enable_general_irq_channel(struct device *dev)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
+{
+	return -ENOENT;
+}
+static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
+{
+	return -ENOENT;
+}
+#endif
 #endif /* _SC_SCI_H */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2020-03-17  2:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09  0:38 [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case Anson Huang
2020-03-09  0:38 ` [PATCH V3 2/7] firmware: imx: add COMPILE_TEST support Anson Huang
2020-03-16  0:53   ` Shawn Guo
2020-03-16  3:37   ` Shawn Guo
2020-03-09  0:38 ` [PATCH V3 3/7] rtc: add COMPILE_TEST support for i.MX SC RTC Anson Huang
2020-03-09  0:38 ` [PATCH V3 4/7] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Anson Huang
2020-03-09  0:38 ` [PATCH V3 5/7] input: keyboard: imx_sc_key: Fix build warning for !CONFIG_IMX_SCU case Anson Huang
2020-03-09  0:38 ` [PATCH V3 6/7] watchdog: add COMPILE_TEST support for IMX_SC_WDT Anson Huang
2020-03-09  0:38 ` [PATCH V3 7/7] thermal: add COMPILE_TEST support for IMX_SC_THERMAL Anson Huang
2020-03-09 11:06 ` [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case Alexandre Belloni
2020-03-09 12:20   ` Anson Huang
2020-03-09 13:27   ` Guenter Roeck
2020-03-09 13:37     ` Anson Huang
2020-03-09 16:47     ` Alexandre Belloni
2020-03-09 17:10       ` Guenter Roeck
2020-03-09 17:30         ` Alexandre Belloni
2020-03-09 18:19           ` Guenter Roeck
2020-03-09 13:40 ` Peng Fan
2020-03-09 14:09   ` Anson Huang
2020-03-16  0:52   ` Shawn Guo
2020-03-16  2:51     ` Peng Fan
2020-03-16  3:07       ` Shawn Guo
2020-03-16  3:18         ` Peng Fan
2020-03-16  3:34           ` Shawn Guo
2020-03-16  8:04             ` Anson Huang
2020-03-16  8:40               ` Alexandre Belloni
2020-03-16  8:44                 ` Anson Huang
2020-03-16  9:00                   ` Alexandre Belloni
2020-03-16  9:08                     ` Anson Huang
2020-03-16  9:15                       ` Alexandre Belloni
2020-03-16  9:40                         ` Anson Huang
2020-03-16 10:00                           ` Alexandre Belloni
2020-03-16 10:18                             ` Anson Huang
2020-03-17  2:18                           ` Peng Fan
2020-03-17  2:29                             ` Anson Huang
2020-03-17  2:32                             ` Guenter Roeck
2020-03-17  2:35                               ` Anson Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).