From patchwork Sat Mar 7 01:25:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 212646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9223C10DCE for ; Sat, 7 Mar 2020 01:32:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97FCB206E2 for ; Sat, 7 Mar 2020 01:32:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726245AbgCGBcn (ORCPT ); Fri, 6 Mar 2020 20:32:43 -0500 Received: from inva020.nxp.com ([92.121.34.13]:40950 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbgCGBcm (ORCPT ); Fri, 6 Mar 2020 20:32:42 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1CCD21A0DC9; Sat, 7 Mar 2020 02:32:40 +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 304A41A0DCB; Sat, 7 Mar 2020 02:32:20 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id BB7F9402E2; Sat, 7 Mar 2020 09:32:06 +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, linux@rempel-privat.de, gregkh@linuxfoundation.org, tglx@linutronix.de, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, arnd@arndb.de, robh@kernel.org, yuehaibing@huawei.com, ronald@innovation.ch, krzk@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 V2 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case Date: Sat, 7 Mar 2020 09:25:53 +0800 Message-Id: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- new patch. --- 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..3fff0e2 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 0; +} +static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc) +{ + return 0; +} +#endif #endif /* _SC_IPC_H */ diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h index 17ba4e4..4688b60 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 0; +} +static inline int imx_scu_irq_register_notifier(struct notifier_block *nb) +{ + return 0; +} +static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb) +{ + return 0; +} +static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) +{ + return 0; +} +#endif #endif /* _SC_SCI_H */ From patchwork Sat Mar 7 01:25:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 212643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D363BC10F26 for ; Sat, 7 Mar 2020 01:33:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A459C20717 for ; Sat, 7 Mar 2020 01:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbgCGBcp (ORCPT ); Fri, 6 Mar 2020 20:32:45 -0500 Received: from inva020.nxp.com ([92.121.34.13]:41048 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgCGBcp (ORCPT ); Fri, 6 Mar 2020 20:32:45 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6FDE21A0DC5; Sat, 7 Mar 2020 02:32:42 +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 66C5E1A0DD9; Sat, 7 Mar 2020 02:32:23 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1AAD9402FC; Sat, 7 Mar 2020 09:32:09 +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, linux@rempel-privat.de, gregkh@linuxfoundation.org, tglx@linutronix.de, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, arnd@arndb.de, robh@kernel.org, yuehaibing@huawei.com, ronald@innovation.ch, krzk@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 V2 2/7] firmware: imx: add COMPILE_TEST support Date: Sat, 7 Mar 2020 09:25:54 +0800 Message-Id: <1583544359-515-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> References: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add COMPILE_TEST support to i.MX SCU drivers for better compile testing coverage. Signed-off-by: Anson Huang --- no change. --- drivers/firmware/imx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig index 1d2e5b8..116707a 100644 --- a/drivers/firmware/imx/Kconfig +++ b/drivers/firmware/imx/Kconfig @@ -12,7 +12,7 @@ config IMX_DSP config IMX_SCU bool "IMX SCU Protocol driver" - depends on IMX_MBOX + depends on IMX_MBOX || COMPILE_TEST help The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and @@ -24,6 +24,6 @@ config IMX_SCU config IMX_SCU_PD bool "IMX SCU Power Domain driver" - depends on IMX_SCU + depends on IMX_SCU || COMPILE_TEST help The System Controller Firmware (SCFW) based power domain driver. From patchwork Sat Mar 7 01:25:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 212644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BADCAC10F26 for ; Sat, 7 Mar 2020 01:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89C6A2067C for ; Sat, 7 Mar 2020 01:33:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbgCGBct (ORCPT ); Fri, 6 Mar 2020 20:32:49 -0500 Received: from inva020.nxp.com ([92.121.34.13]:41166 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgCGBcs (ORCPT ); Fri, 6 Mar 2020 20:32:48 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B27141A0DCB; Sat, 7 Mar 2020 02:32:46 +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 3AEFA1A0DD5; Sat, 7 Mar 2020 02:32:27 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CB08340294; Sat, 7 Mar 2020 09:32:13 +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, linux@rempel-privat.de, gregkh@linuxfoundation.org, tglx@linutronix.de, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, arnd@arndb.de, robh@kernel.org, yuehaibing@huawei.com, ronald@innovation.ch, krzk@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 V2 4/7] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Date: Sat, 7 Mar 2020 09:25:56 +0800 Message-Id: <1583544359-515-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> References: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add COMPILE_TEST support to i.MX SC keyboard driver for better compile testing coverage. Signed-off-by: Anson Huang --- no change. --- drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 4706ff0..81e26f6 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -467,7 +467,7 @@ config KEYBOARD_IMX config KEYBOARD_IMX_SC_KEY tristate "IMX SCU Key Driver" - depends on IMX_SCU + depends on IMX_SCU || COMPILE_TEST help This is the system controller key driver for NXP i.MX SoCs with system controller inside. From patchwork Sat Mar 7 01:25:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 212645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E08A7C10F26 for ; Sat, 7 Mar 2020 01:33:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B56F62070E for ; Sat, 7 Mar 2020 01:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgCGBc4 (ORCPT ); Fri, 6 Mar 2020 20:32:56 -0500 Received: from inva020.nxp.com ([92.121.34.13]:41276 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgCGBcw (ORCPT ); Fri, 6 Mar 2020 20:32:52 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 653D01A0DC3; Sat, 7 Mar 2020 02:32:51 +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 619C91A0DB1; Sat, 7 Mar 2020 02:32:32 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 870F0402D5; Sat, 7 Mar 2020 09:32:18 +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, linux@rempel-privat.de, gregkh@linuxfoundation.org, tglx@linutronix.de, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, arnd@arndb.de, robh@kernel.org, yuehaibing@huawei.com, ronald@innovation.ch, krzk@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 V2 6/7] watchdog: add COMPILE_TEST support for IMX_SC_WDT Date: Sat, 7 Mar 2020 09:25:58 +0800 Message-Id: <1583544359-515-6-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> References: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add COMPILE_TEST support to i.MX SC watchdog driver for better compile testing coverage. Signed-off-by: Anson Huang --- no change. --- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 9ea2b43..6388154 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -712,7 +712,7 @@ config IMX2_WDT config IMX_SC_WDT tristate "IMX SC Watchdog" depends on HAVE_ARM_SMCCC - depends on IMX_SCU + depends on IMX_SCU || COMPILE_TEST select WATCHDOG_CORE help This is the driver for the system controller watchdog