Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1954266ybh; Sun, 8 Mar 2020 17:58:38 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvGzG3Q4H9M76M75h2RovKgBCmbwS0qCwzd+cg6Tr5131xZrsRQYPLJ4TnohfoehokE6O6Z X-Received: by 2002:a05:6830:46:: with SMTP id d6mr1939074otp.81.1583715518542; Sun, 08 Mar 2020 17:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583715518; cv=none; d=google.com; s=arc-20160816; b=OV+Dg5rghYPevr9cw1HWmAyflTQLz/X8AITSTCVrjkcHP/jOel54rvOekm7AkkTIfm CFZOY2EAe6fUKqFMpPaaJp4yqPwzouYBkDPl45fVviFnio5atO/8ZouwSa1oTxHKQoAA 8g08Y9usW3bBi5YREBvU3y8KEar/vVyHNglKb3LWYKFhB5hcWYIyR7mg1Avw35JnfOwB RBtUkqU4GzGYnZl5/xJ8L0xw+5zugvuQXu6ZNSKKOabU1AANscPSZlrPMc1SyuS22pqZ W/0g/NCsDjjV6UvNPCO9501QD/sxSroBhdfC6E3iO22j6P4GUGqXP7ygDlWcVZn4JyN6 gWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=V3EnAxyKfLmIeTAixSuTqX1IXT45nU66efv2U7XXuYc=; b=PSK3qXijGqNRtPHPNkrkaOPw1ae/SG5BA9p9ixdv8EbWwE9rToByr3Oxx1dQnDfYnD e05Lti0H+8jHoOHlocxx+Vc64H/+A7wF2gxYaBByCqNVp1+kpjS0ayb0cLdO7proV5gi piyh75z0+G2RZWR9p/JrpOdFnGefoWeeIgGpKLM62vK/vNoFfz6ujnjbF7bVUKO9s8LC NpsJm7Htpb+j54b5CgNS8j3OQZsOmrGkMgYHhitq8NiZrHrjoRWNQ89TFeejCz0q/i/v baw1Hxl+77kEJk5jqpcLXWuY3fegagzHm4AUMBMVVABYw9jp7yscGcUrgOwk8jfERL6e q+zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RtqGkW8D; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x189si3246256oia.270.2020.03.08.17.58.11; Sun, 08 Mar 2020 17:58:38 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RtqGkW8D; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbgCIABA (ORCPT + 99 others); Sun, 8 Mar 2020 20:01:00 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40153 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbgCIABA (ORCPT ); Sun, 8 Mar 2020 20:01:00 -0400 Received: by mail-pl1-f193.google.com with SMTP id h11so55035plk.7; Sun, 08 Mar 2020 17:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V3EnAxyKfLmIeTAixSuTqX1IXT45nU66efv2U7XXuYc=; b=RtqGkW8D0lBvQQ1sOqiu79XEPqp89unTbnXFwtaYvcveKigLF/KlZGTz0DO4vh5SHd zeg4hPAJpHqoP3ndT0t7pN9bYJ+1+uZ0e6pDpJMr94o7K8HTGNSS44X4ZTQVNvgWaGcw 85PzzEbOlMoFu5ShVPfPOcJpS3Tqo7Vzwv6bg1wcVfIFhdqqTB7YMYL7/gyQSesIGFaw MyZ99v/my8jEg2qfG9c0RS/bUjoQQEquW3aFAnQCucKJyjUq6nwz0hvVZnJquthvFrAY A1OKSZFrrGdQjPSli9AqjUOSHiocMIntGbECFd0IzhimZUysScGhXgJjN9Nj6G4OIXBo lPcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=V3EnAxyKfLmIeTAixSuTqX1IXT45nU66efv2U7XXuYc=; b=IFe/yvwMGKJqkGOTZ1OtY0BM3Jjn7WqH0Tc8Ohp3eIpEC7hYLHgvzoWtOsVtFbRDuL dUcD0SafGahR+5BsX5Z4P35cwveHi4SSrD6INekP0vdjkxzr4PJxd9BtMHr1xTu9NgGw JussUQu5YAcS1cM7SS+PiQ+embm40kEMyCIzHZwrX1E5oyhGXp2ChRpEAs07B/1Ybg1j O0i/E9vLjK1MQuZjJvY2x9H5NJErTmDFGuNuDh49FlGC4iFY7zNY3w/n4drM0SmiANfS +cDkcBd4JxHfwx3u9YK03Uv94azLl2x+1WEjJ+ygdnqjpsGq5HhimJ1Evc7qxBSqaSOx Pk/w== X-Gm-Message-State: ANhLgQ1X6q0LhbZo1y2Hw3skraN6OMhOc8E9Z6EeBKiqnImFufD9MZK/ rG+6fHDZpWJTGE7EQhqi664= X-Received: by 2002:a17:90a:fa06:: with SMTP id cm6mr16082073pjb.109.1583712058652; Sun, 08 Mar 2020 17:00:58 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id u12sm41739573pfm.165.2020.03.08.17.00.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Mar 2020 17:00:57 -0700 (PDT) Subject: Re: [PATCH V2 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU case To: Anson Huang , 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, 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 References: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rX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hNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= Message-ID: <63862bdf-874f-86d3-3bb5-b41185efffe1@roeck-us.net> Date: Sun, 8 Mar 2020 17:00:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <1583544359-515-1-git-send-email-Anson.Huang@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/20 5:25 PM, Anson Huang wrote: > 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; > +} It would probably be more appropriate to return errors from the stub functions. Guenter > +#endif > #endif /* _SC_SCI_H */ >