Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp329258pxu; Wed, 14 Oct 2020 02:24:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtOMbi50faQU1bL6kxz/YheiGQW69RDKrDIb/bp4GZXSYSJI97yF+szMy21FQH+lnm2BPn X-Received: by 2002:a17:907:1010:: with SMTP id ox16mr4345075ejb.379.1602667485720; Wed, 14 Oct 2020 02:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602667485; cv=none; d=google.com; s=arc-20160816; b=h3o7B/uqXqzR7SpAx8tdnXH/gwJ6EgxuSxpvyPUT0dnLAOt9DwSAXgRn9W1k5Uki7g +xsb4vvSe1Ws8/1TA2Rq36nmu7KXahZHxX9Epk93u5eIiIYj9ivdSHrLrkyagsDBtRD1 0k/b+xK/ftBsrpNXTGz3ceI5AKMrALmc0Zc6HEGKP03pMFoos1PXm9kcd+zjZDkd2JFd nOPximZo156cC9a/QDtrEAvWGqUsiq68dvj24d7l2UhQhBete16aU/lXG39HbFoqmnK5 qv3GKInGYyqX+F07SPgVG+Yg5ZEcTa3KLTIUV3ObmlbrftGhIkFd2E0QfL0pQ9t5zCQk 7cjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=4sc9DSC7GZRndLMZIzbV6IZ02HOhCKNYvU3raIdk/0E=; b=0KUGug7FehvjSsPKyo05HDkdXw5wknubRW3i+KricVyQU/vYSyyn63qS2Cv+degH7Q rvvI9JsiFfaTj/I84jjXzvDt1fMCn1lGxviN5EvjEc1sUU2+I6/6DDgMD0d1Uf/tny/R 4bD+8q1C6mpsLUXJn7IanPE4XXnYRmrdIY+Xx861W3ARZP4j5foisoWl2lt2P8B8KvpD oDC5/eqpNEK9yRbGIEOOfT5gTRcWw1ClfCQu5dbOyO2oBsL7fQyR/RLx3aQIiqmx6vor TieepiVKbCQFxorq+TlrWfMjImvZde86HTzjErlj9rP91ouHi+YyVXtDEtgOtCv11oZ6 lTxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw5si1761791edb.108.2020.10.14.02.24.23; Wed, 14 Oct 2020 02:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgJNJCP (ORCPT + 99 others); Wed, 14 Oct 2020 05:02:15 -0400 Received: from inva021.nxp.com ([92.121.34.21]:37084 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbgJNJCP (ORCPT ); Wed, 14 Oct 2020 05:02:15 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DFCBA20034F; Wed, 14 Oct 2020 11:02:12 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D1C74200271; Wed, 14 Oct 2020 11:02:08 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8873240249; Wed, 14 Oct 2020 11:02:03 +0200 (CEST) From: Joakim Zhang To: shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Liu Ying , Peng Fan , Joakim Zhang Subject: [PATCH] firmware: imx: always export scu symbols Date: Wed, 14 Oct 2020 16:57:14 +0800 Message-Id: <1602665834-29902-1-git-send-email-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liu Ying Always export scu symbols for both SCU SoCs and non-SCU SoCs to avoid build error. Signed-off-by: Liu Ying Signed-off-by: Peng Fan Signed-off-by: Joakim Zhang --- 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