From patchwork Tue Sep 22 10:24:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11792145 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67ED259D for ; Tue, 22 Sep 2020 10:47:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29F162073A for ; Tue, 22 Sep 2020 10:47:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F8Px92ON"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cXA/hzQ/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F162073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/ORZoSGGnp/jxGCMCAyv+tqpqqYmunzHZIkIHEDxtwM=; b=F8Px92ONuwua1QT0S3H8RzirDI 1J7kQdSBbfKC058eyQZ3UQJEzAH8Pmais3MmOZszeCSoBjLhAmRD5u6wbOg3PBnOdGj8iRhKpn0rJ lmfi6dyIV348PkGhq2ISG8puFKbR+fUcl+Mcuo3UpN5c3Np7pYMTghnwQxEq/8RH2QX365HlSwZ55 A7wBjsnzjoy1TT2xE7c+SHA/RZ8wR6kw1h7qGYH5/I1hIlDJ79DzoFGE1eqROPDHWg1PKpnQn1gnO u2yEeX8EQ1jSTp3wF70DBERBrnyIF0D1Ho3YSFt86hRmqPyK7Jj/QYFwzjtbg+5NtvCFbcnjup8za XK5UP8pA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKfo9-0006EZ-R1; Tue, 22 Sep 2020 10:46:01 +0000 Received: from mail-vi1eur05on2089.outbound.protection.outlook.com ([40.107.21.89] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKfo7-0006Do-0S for linux-arm-kernel@lists.infradead.org; Tue, 22 Sep 2020 10:46:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlvxxMU94tMFkY2WP+ZQA7pEWTOmPP0MGSTvyjGexZzgCeMvKMP/VQqNAK40kJ5Bs55yKCwRYo+c0rmAnSPGyxqurCj9BiMJORLAQkLElTwl/WM2Erggq3VQ4Hl8cSd63SHSWneBZuB6jRxbh6qqr7nU4l5fM551tuJD2OY2bztsRRZKNpC/9pH/I4HI8LXpQ2a7QQpxb/FQUaCkHpwr6PG5gqM1HLclq4+luamgUFabnHBOMp6BVEJwu0zCxOhK2bvWSI/zZAj1bUTwydzFgJqj6k7feogYNC/bBfF3fICe5yRsHaAMQ+Wrxuyx2PwD50CMcqO3s272MmnTeuzxMw== 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=/DSQh/FeDXLAuhm6emv3L7q7ZObCJNprLI9V+TMMmTA=; b=VRkz05IXm0aUJcW0m5Cc4S2INyIhV7WDyoDQ7ADIWy2KlkwqGoAqL4+rQtikltPeDbPZX3yEOIy796NQc5Xm2SD1yzIul35QnVkn4+XPmo/RK/hM4BFJDy5XiL7/ih5LBrzaZTlxyvb6I4/Bc7+bRPgiK0T6nW05RpQZzzxCUZZwwS0+GHlTNUhl4ra6x4LyFrx192GEOqQ6GNycsHcCFEzizWeCxEgcjkRKf/yE/ctPj0ZhdJ+BaRmVwfO79EuZ9g8Lbx1VgOsuoWfrL28JqFHAlGWCr8S0rgf5mgR39Yg3UtPnd/EMOnwlGpcgM6jxjh7hIldfFIqFgW8U2r4QLg== 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=/DSQh/FeDXLAuhm6emv3L7q7ZObCJNprLI9V+TMMmTA=; b=cXA/hzQ/toGv7A+llg4JtiXh9QjVFPJchCE6Np14kU+abq0B7vl+Ca3UssrbkPmwmNaML7LSVYIcQX3TJIa81gJZNYKCfQIt0FJZqCR1ECOdD+mZJomAZLgMA+5jUlwDEkRVKSjCgcfUeZgRUqNjX6wzG90h3RJhidRw2il0cyY= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.26; Tue, 22 Sep 2020 10:31:45 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413%10]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 10:31:45 +0000 From: peng.fan@nxp.com To: shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, abel.vesa@nxp.com Subject: [PATCH] firmware: imx: add dummy functions Date: Tue, 22 Sep 2020 18:24:29 +0800 Message-Id: <1600770269-30619-1-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: SG2PR06CA0235.apcprd06.prod.outlook.com (2603:1096:4:ac::19) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from 10.192.242.69 (119.31.174.67) by SG2PR06CA0235.apcprd06.prod.outlook.com (2603:1096:4:ac::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3391.11 via Frontend Transport; Tue, 22 Sep 2020 10:31:41 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e20a7fdd-7880-473b-2eaa-08d85ee2b3c6 X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:669; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6W3ig+ynO1Weha/lJbjf7c82aX3BGLgSBsOS/Cux2WaoGM9ZVGABoIzkHRXWi5qkadV7kqtbWouiBvy4aG28XlaJrCVtUGr8mtHgheXXQVyu6dOJynGwPNFC3ADmx6sB/Npu7Z+puIMy6Hpg7xJHtpD6FN2SXDVin9EIGMtynrvL68HDS4ugg1tSeZZ0roaNSWnxVsKdm07GkHpgyL64ojjCzR6elurCJX8l785PPjCMdPPrNV86UDGZB6J5YFzsHLQE0Tzhq1SxrrZKQ3CJvkA1jKz6bEuqJl/1wIGWzMU3OqJQiEtT+2abjsN9HmMdeyMbOKstb9qhFueVMP9HsdVEYuiFdJ12WXqIoT5Kj8v9RBXjzeA5LVTEdmYqHky0/euOe/7XLy4RXIpc7SeGW+zR0Y3kEE3sN10xdYI8ewLIFmYE2hAPbx1DPjAgx97Z X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(346002)(396003)(136003)(83380400001)(316002)(478600001)(16576012)(86362001)(4326008)(8936002)(6486002)(8676002)(6666004)(956004)(16526019)(52116002)(2616005)(26005)(186003)(66476007)(66946007)(2906002)(5660300002)(966005)(36756003)(66556008)(9686003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 832HzxcqkzyStk9pt9JrX8pEPXbEJc4mp184H4Rh2viZVDOKJxqer/YAf3cq9Emd7xyZqUT9QS/Pv5VK8v2t4iFJo1l+UeyPlf6Lwg5l7brEbU4mkxpfdfTUXMMNrAc+72NNzafMhC22sC+1BPm6YNceXfgamNQaZzrlghiLAYoRw8PhkBWcifMhDH+3G1DNzSDvf+dEeHkbFcp8CxJywIA4ckm/BE6Qqjm/CZepjANQ2rnlStAV//DhUyhW5EtCTkZ3Xf3uNixXL9KyZVcAA8UJ+7kWyb5fVBg1LTeEmXj1dN6jG9dK4ce9hy5qMtEC2eXk6S/RPreSNF8265aZQWYwhAgch+N+2jZBzfH4nM+LoGwNBSh3781x2OwYxNQ53bDk6G7nRQ4uO7JTqgDkZc3N6lFk7SHEQmst0Ypyc3upyZHFVYH3ZxZZU2yUthbEGpdhTS9aC7Pr5GHIbk6hZf1IcR+1k3HYhr32eO/PhyyMeRAC5DxumpTdLebWxe//la4X0Q29ZA4z05vM/B51m5XEYcw1B3MJvWetU5bF0c0Rg9EMsaS83CJEwXOwYqZYgqsePT7ezYvD+BqtOP+VkIIT8kMtXc2VBPoIX7z9secmXI9XkTGuj9EiWxNupCHcbpsi2p2RwqT8xq8Rp053jQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e20a7fdd-7880-473b-2eaa-08d85ee2b3c6 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 10:31:44.8343 (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: MF+BPKFjyavVo8hFpCbVppLi5MDeyj/Oz68aKXUuc/9GO+FqYNpnlBWOKnsn5nE1kBvIQG4vOSRJ78tbwCkkiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200922_064559_215003_4CACA258 X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.89 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.89 listed in list.dnswl.org] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, Peng Fan , Anson.Huang@nxp.com, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Peng Fan add dummy functions to avoid build failure when header files are included, but drivers are not built. Signed-off-by: Peng Fan --- V1: Seems this patch was missed. https://patchwork.kernel.org/cover/11395245/ Rebased on linux-next. include/linux/firmware/imx/ipc.h | 13 +++++++++++++ include/linux/firmware/imx/sci.h | 27 +++++++++++++++++++++++++++ include/linux/firmware/imx/svc/misc.h | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/include/linux/firmware/imx/ipc.h b/include/linux/firmware/imx/ipc.h index 891057434858..0b4643571625 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,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 22c76571a294..5cc63fe7e84d 100644 --- a/include/linux/firmware/imx/sci.h +++ b/include/linux/firmware/imx/sci.h @@ -16,9 +16,36 @@ #include #include +#if IS_ENABLED(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); int imx_scu_soc_init(struct device *dev); +#else +static inline int imx_scu_soc_init(struct device *dev) +{ + return -ENOTSUPP; +} + +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 */