Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1947897ybh; Sun, 8 Mar 2020 17:46:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuUcnvyremrEp50wvV3uYud3lpCaHiJrPcmFs7qZGnvjQvkG7rDHg9QHizxHNxDrtCl+rBo X-Received: by 2002:aca:4983:: with SMTP id w125mr8385301oia.52.1583714816199; Sun, 08 Mar 2020 17:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583714816; cv=none; d=google.com; s=arc-20160816; b=J1H/C6r6tccCxUJNOARRrv8LnJQg5BsEErAz4qWV6pD8VphUzwKCTAFt/7QD6SqRCB h9vNOwbo+/TULrBcnnjko7OpPnAJxrong0B+kq2BV9y9aqaMX1pIYVR/c6qc2j+7K0RZ pTHMxSwlJPzugLfR5Bt4XZBjzNuh/j0oynJULtqONeexBt1wMzBvgEcRmsMsFhxHijrv TAfZJ0Ldw8QEVzGHZ6FUX68wJRQ0if3hUI8h3TE4j3baXoiqoHjlgExKkgCTc/FdN0du 9tImIXfC4lICtOAi6/tamAi/4w173h0KDC9JwMmuo2yj7hCuAHbY6OE2p1yFVre5VHWr lI4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=sdOUGcaj8q3hDFOhn4eBj+5DlgSKYDvVOVioueKEN4g=; b=UcuD+GN/F4enhbLr3HFfbqpr3dUI0VYQAEf0I33fFG6QtElIjSurT/WCXIgEt0g6E8 md/9TLppr/16MrCrb4yPu18lUjEu6B257PK8HssEH59OUb0B1fTXuHZUSJ5+ovtCzJZ2 bbqDcDFfRvWqc9Iohrl7O28SqINz7GH/ESbyrXIt+FMCLlejQ3rSzSr1x+U86FiSQOJo KFdNWGPs3DC7Sw92Ww0IBvmEiwLko2IlJXGCPNpLPcQba+gg4R2J66luFqBTfXINS6VK I4Tafip4O9/PFZtJ/ApnVOYEMohjZhMxC2prVK+uucTCS6hM3rQpTLtUyd0cZGAXBuZU C+fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id n62si307997oig.196.2020.03.08.17.46.45; Sun, 08 Mar 2020 17:46:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726621AbgCIApI (ORCPT + 99 others); Sun, 8 Mar 2020 20:45:08 -0400 Received: from inva020.nxp.com ([92.121.34.13]:55016 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbgCIApH (ORCPT ); Sun, 8 Mar 2020 20:45:07 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 668CD1A16A7; Mon, 9 Mar 2020 01:45:05 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5DEC71A078B; Mon, 9 Mar 2020 01:44:46 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0EC814024E; Mon, 9 Mar 2020 08:44:32 +0800 (SGT) From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, dmitry.torokhov@gmail.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, wim@linux-watchdog.org, linux@roeck-us.net, daniel.baluta@nxp.com, gregkh@linuxfoundation.org, linux@rempel-privat.de, tglx@linutronix.de, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, arnd@arndb.de, ronald@innovation.ch, krzk@kernel.org, robh@kernel.org, leonard.crestez@nxp.com, aisheng.dong@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-rtc@vger.kernel.org, linux-pm@vger.kernel.org, linux-watchdog@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case Date: Mon, 9 Mar 2020 08:38:14 +0800 Message-Id: <1583714300-19085-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 #include +#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