netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de
Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com,
	peng.fan@nxp.com, linux-can@vger.kernel.org,
	pankaj.bansal@nxp.com, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/6] firmware: imx: always export SCU symbols
Date: Fri, 16 Oct 2020 21:43:15 +0800	[thread overview]
Message-ID: <20201016134320.20321-2-qiangqing.zhang@nxp.com> (raw)
In-Reply-To: <20201016134320.20321-1-qiangqing.zhang@nxp.com>

From: Liu Ying <victor.liu@nxp.com>

Always export SCU symbols for both SCU SoCs and non-SCU SoCs to avoid
build error.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 include/linux/firmware/imx/ipc.h      | 15 +++++++++++++++
 include/linux/firmware/imx/svc/misc.h | 23 +++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/include/linux/firmware/imx/ipc.h b/include/linux/firmware/imx/ipc.h
index 891057434858..300fa253fc30 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;
 };
 
+#if IS_ENABLED(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,18 @@ 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 -EIO;
+}
+
+static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc)
+{
+	return -EIO;
+}
+#endif
+
 #endif /* _SC_IPC_H */
diff --git a/include/linux/firmware/imx/svc/misc.h b/include/linux/firmware/imx/svc/misc.h
index 031dd4d3c766..d255048f17de 100644
--- a/include/linux/firmware/imx/svc/misc.h
+++ b/include/linux/firmware/imx/svc/misc.h
@@ -46,6 +46,7 @@ enum imx_misc_func {
  * Control Functions
  */
 
+#if IS_ENABLED(CONFIG_IMX_SCU)
 int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
 			    u8 ctrl, u32 val);
 
@@ -55,4 +56,26 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
 int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
 			bool enable, u64 phys_addr);
 
+#else
+static inline int
+imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
+			u8 ctrl, u32 val)
+{
+	return -EIO;
+}
+
+static inline int
+imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
+			u8 ctrl, u32 *val)
+{
+	return -EIO;
+}
+
+static inline int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
+				      bool enable, u64 phys_addr)
+{
+	return -EIO;
+}
+#endif
+
 #endif /* _SC_MISC_API_H */
-- 
2.17.1


  reply	other threads:[~2020-10-16  5:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 13:43 [PATCH 0/6] can: flexcan: add stop mode support for i.MX8QM Joakim Zhang
2020-10-16 13:43 ` Joakim Zhang [this message]
2020-10-16 13:43 ` [PATCH 2/6] dt-bindings: can: flexcan: fix fsl,clk-source property Joakim Zhang
2020-10-16  6:21   ` Marc Kleine-Budde
2020-10-16  6:52     ` Joakim Zhang
2020-10-16 13:43 ` [PATCH 3/6] dt-bindings: can: flexcan: add fsl,can-index property to indicate a resource Joakim Zhang
2020-10-16  6:20   ` [PATCH 3/6] dt-bindings: can: flexcan: add fsl, can-index " Marc Kleine-Budde
2020-10-16  6:52     ` Joakim Zhang
2020-10-16  7:47       ` Marc Kleine-Budde
2020-10-16 13:43 ` [PATCH 4/6] can: flexcan: rename macro FLEXCAN_QUIRK_SETUP_STOP_MODE -> FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR Joakim Zhang
2020-10-16  6:22   ` Marc Kleine-Budde
2020-10-16 13:43 ` [PATCH 5/6] can: flexcan: add CAN wakeup function for i.MX8QM Joakim Zhang
2020-10-16  5:59   ` Marc Kleine-Budde
2020-10-16  6:46     ` Joakim Zhang
2020-10-16  7:44       ` Marc Kleine-Budde
2020-10-16  6:18   ` Marc Kleine-Budde
2020-10-16  6:51     ` Joakim Zhang
2020-10-16 10:00       ` Joakim Zhang
2020-10-16 10:40         ` Marc Kleine-Budde
2020-10-16 10:57           ` Joakim Zhang
2020-10-16 13:43 ` [PATCH 6/6] can: flexcan: fix ECC function on LS1021A/LX2160A Joakim Zhang
2020-10-16  6:04   ` Marc Kleine-Budde
2020-10-16  6:49     ` Joakim Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201016134320.20321-2-qiangqing.zhang@nxp.com \
    --to=qiangqing.zhang@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=victor.liu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).