Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1356963ybv; Thu, 20 Feb 2020 18:39:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzqRyetBjpH8pVH1GiqQFdDNFIhOR2+9m+tjeWC4Qx8OPjMVVEU10BVeUB+DA7HT4Ssa9eN X-Received: by 2002:aca:388:: with SMTP id 130mr165676oid.89.1582252773113; Thu, 20 Feb 2020 18:39:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582252773; cv=pass; d=google.com; s=arc-20160816; b=r1Bu3T4yGz5RKpiJ6s9aWS4P/9lf2Z26mfM7zrR3DLAaewL6wYxbK4ZVwi4Qvehpgf QVhXHOcvn3O76UHMHjN3zV+1Mvw5bpVp2ywf3cpdlDDlgBSY7RoUQ9my2ZYsljA+29FP GKi3xKmgXeEAKjbhqUmB3Wlkh5dzheqG7pjmawfHt4gbm8KNmtetEZL3w6Q17p8zVS1e dvvqHfYuK3KXWynDvD6mgJABFw8/7hxpCrVEirWnvpQxxJ84+O1Oyi+IhUgCuMiY/ANd 2ik2yfH6fYIXHLCp/hjeceejQi56vCVgPDEPxEH5jinuBHlGbFWPZ+7JNh9f5f4PAKfI R4Ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1pHpzxEIbDKi2Xx5kdCK1RS4J/36DfLqAvV+tLY9f1I=; b=xXa/pLkfcYYuWgBnJzyuf4vba73nmJCBO1Lk0DxhatFJNnVO/Hc5n+uwvmqVT5yDvM sEtqHUTbszHNngGB0QOojJInCExIzx8G51C9Yv5YWRx9GzrdnyhxyYk7P7UwrJuhk9Sg nnMfs+FUIlMP0IyvXaTpzbjEYvF7T52e0sngDT8lgmS4CX6FEbK+A7j7cAk5VI1bf/55 jv05tRaDaNy3hntzYtQxV16G4rG7mpNqYTt2dV+KXk2/YflQlo+sEHmcpCLUV5KXiz3w RhNUz8FVXZDff3nrP/VPqKDCILfqhM/47Ev0qheu0bzZbnVTdYwY8BbeYhjZ7FaruOYd 2a2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pOlGpCCw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (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 p11si746785ota.300.2020.02.20.18.39.21; Thu, 20 Feb 2020 18:39:33 -0800 (PST) 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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pOlGpCCw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729588AbgBUCjJ (ORCPT + 99 others); Thu, 20 Feb 2020 21:39:09 -0500 Received: from mail-eopbgr10044.outbound.protection.outlook.com ([40.107.1.44]:54027 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729259AbgBUCjJ (ORCPT ); Thu, 20 Feb 2020 21:39:09 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NLV0/hdYeoUAB1+y624pw8JZi6tCOcL58oJSuLmZJe5sVhmqcD07OwHFloV4htI48ZSyNhG0xLWf5/MO2X3biQ2+mB4Pg0PtUkwJWm6Rx91E0yRVjHAaIFRTy2mMChHhQlDV+9tRQTQd1Q8o8LKt6tmO3ItCs3li1AMKFlj2p6crXqhvCnCrP62NTqVlZw4IwaSpwouSKjg8Wbx+b53VP54HKYhMkoaVhpoUrtOgK6IWRMTSQVroHtiS5bn9gfCersrda3uFrZY04inF4mWA+mP3tC5rrfFjnwgaFFGxQGPbjAqa9eNC2O9L0nrG8O5M1f9or6XlTWFLXllEtvjCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1pHpzxEIbDKi2Xx5kdCK1RS4J/36DfLqAvV+tLY9f1I=; b=Ei1pnIRyBObs0tC9O6fNjgS3JeIYGnkW7bc3GvGlfvQasR+kk4sM1gK8GfZdYodLtHwT71ssswfVlFKLaVoP3ROWBsAhuozAYyEYlB3p/1NJRaAQdZt9b6jVwMhn4dLK9ESguRS6EuqgYdnlhetPLCVk5bCq3TrRzzZ1TxFwvttMNvMtfv7LXlawNhCwyi4Oerdm0R8ES8llnL8Vh9yHyt6am+ywGIV4c9oc+8N69X7n398w5dz1rCRt/03n3XZUYnxBeIkM5C+kAyAK8kAPATt4f+M9j2HgpOdQ5hBB7S41XorTy+ITQw6o88vcOKPOdMm3O01/4Vq9LA7vnv44yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1pHpzxEIbDKi2Xx5kdCK1RS4J/36DfLqAvV+tLY9f1I=; b=pOlGpCCwfD/a2e7PugDOgjzNE3nV6dq/DsaC30XRkxPt2IMGt/YS+yySG6sa51S0TmAFbP1UQljCy5rnCtlYv+WLl4xlN5RymQsdE9hQbd2g8Cfyx6/uJ8TF8/i6EooKB0XQfQdNgiXD75qmufADN3lbpL5vXMoVn8KjOSWTFIc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5281.eurprd04.prod.outlook.com (52.134.89.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Fri, 21 Feb 2020 02:38:24 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::91e2:17:b3f4:d422]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::91e2:17:b3f4:d422%3]) with mapi id 15.20.2729.033; Fri, 21 Feb 2020 02:38:24 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de Cc: festevam@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com, olof@lixom.net, aisheng.dong@nxp.com, leonard.crestez@nxp.com, abel.vesa@nxp.com, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V5 1/2] firmware: imx: add dummy functions Date: Fri, 21 Feb 2020 10:32:18 +0800 Message-Id: <1582252339-15733-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582252339-15733-1-git-send-email-peng.fan@nxp.com> References: <1582252339-15733-1-git-send-email-peng.fan@nxp.com> Content-Type: text/plain X-ClientProxiedBy: HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) MIME-Version: 1.0 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0057.apcprd04.prod.outlook.com (2603:1096:202:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2750.17 via Frontend Transport; Fri, 21 Feb 2020 02:38:20 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6d75dcb9-c7c7-4d62-d080-08d7b6771f47 X-MS-TrafficTypeDiagnostic: AM0PR04MB5281:|AM0PR04MB5281: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0320B28BE1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(396003)(136003)(366004)(346002)(39860400002)(189003)(199004)(2616005)(9686003)(26005)(4326008)(956004)(478600001)(6506007)(36756003)(5660300002)(6486002)(6512007)(16526019)(8676002)(86362001)(8936002)(52116002)(69590400006)(2906002)(186003)(66946007)(81166006)(66556008)(81156014)(316002)(66476007);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5281;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IlGIXc2fupVgG9aHsM9c2/HOGkMQvE5iDr/twPvxqzM83IWYK94CP6U5rZgFwLZkem0sH+giiTW6nfjuW8P1vVFllCAGtl9JkFxPr/A5bixbOGRZIVkLtkrxLy3LaHnnpl6HY5fSvYgO46KSinCeZ3f8Nt7LyrXS3hXrSFqbDUQ7LSLoEDVPQd+y0Co8J1/5bDGX0YXlC77JM5H1OnQmow2xbnpjALFvZDJvcj3Bh1Mf/uSjOlrdrLVXmlpuMGlU1DIXVNPAqLoy+e0By8QPzyoHBvPL5Jk52t6i8GnJZDtn7iJn2DrplAq6UP3wIdmQTcAhgDMrF9z/qoZh8We1H2VFiUvG6krK+ww7OBhcRIe/T2Xr7VCE7EQFXWXsALk7HrQ3nTyCd3vQru7kS8jVpPEcgwRcfnVNdZimHspW7nRj8Vccjw+JiYncFzJNlGeVSWi6LAtW10VV1PcYCxjk7AfPwJIglM0LbM+GEOpqtHbldt/dyU1rUVDv4N7/CFzNFL5C+0QawgF6F3vk6TR1Lw8axdFYGfMyFNEznICxc2Q= X-MS-Exchange-AntiSpam-MessageData: S04rmBY6VoneMLkxg4OlS4ZMNLgzeU8//g57muue28C7ytN8nJY3v6tOKkVTpG8H+zFKi+PDwS2HYv6ZlVTmZPeCRyLbDkg78XNkHVR0KCxq5nt2lqbE26GjXSl569oSLYcpUXdqGWuUGNVhUIdXsA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d75dcb9-c7c7-4d62-d080-08d7b6771f47 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2020 02:38:24.0456 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: E5y7Ax4UvaMPdggOTzs9YxbG/CUdBWumgI1wmC2DUsR8JAU1ZNtwf6K1ND51egFcAaw4kgkiYawDOWzVrq+s/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5281 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan IMX_SCU_SOC could be enabled with COMPILE_TEST, however there is no dummy functions when CONFIG_IMX_SCU not defined. Then there will be build failure. So add dummy functions to avoid build failure for COMPILE_TEST Signed-off-by: Peng Fan --- include/linux/firmware/imx/ipc.h | 13 +++++++++++++ include/linux/firmware/imx/sci.h | 22 ++++++++++++++++++++++ include/linux/firmware/imx/svc/misc.h | 19 +++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/include/linux/firmware/imx/ipc.h b/include/linux/firmware/imx/ipc.h index 6312c8cb084a..30475082f472 100644 --- a/include/linux/firmware/imx/ipc.h +++ b/include/linux/firmware/imx/ipc.h @@ -35,6 +35,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. @@ -56,4 +57,16 @@ 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 -ENOTSUPP; +} + +static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc) +{ + return -ENOTSUPP; +} +#endif #endif /* _SC_IPC_H */ diff --git a/include/linux/firmware/imx/sci.h b/include/linux/firmware/imx/sci.h index 17ba4e405129..7ea875b186e3 100644 --- a/include/linux/firmware/imx/sci.h +++ b/include/linux/firmware/imx/sci.h @@ -16,8 +16,30 @@ #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 -ENOTSUPP; +} + +static inline int imx_scu_irq_register_notifier(struct notifier_block *nb) +{ + return -ENOTSUPP; +} + +static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb) +{ + return -ENOTSUPP; +} + +static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable) +{ + return -ENOTSUPP; +} +#endif #endif /* _SC_SCI_H */ diff --git a/include/linux/firmware/imx/svc/misc.h b/include/linux/firmware/imx/svc/misc.h index 031dd4d3c766..760db08a67fc 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 */ +#ifdef CONFIG_IMX_SCU int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, u8 ctrl, u32 val); @@ -54,5 +55,23 @@ 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 -ENOTSUPP; +} +static inline int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, + u32 resource, u8 ctrl, u32 *val) +{ + return -ENOTSUPP; +} + +static inline int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, + bool enable, u64 phys_addr) +{ + return -ENOTSUPP; +} +#endif #endif /* _SC_MISC_API_H */ -- 2.16.4