From: Guenter Roeck <linux@roeck-us.net>
To: Anson Huang <anson.huang@nxp.com>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will.deacon@arm.com" <will.deacon@arm.com>,
"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
Andy Gross <andy.gross@linaro.org>,
"heiko@sntech.de" <heiko@sntech.de>,
"horms+renesas@verge.net.au" <horms+renesas@verge.net.au>,
"arnd@arndb.de" <arnd@arndb.de>,
"olof@lixom.net" <olof@lixom.net>,
"jagan@amarulasolutions.com" <jagan@amarulasolutions.com>,
"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
"enric.balletbo@collabora.com" <enric.balletbo@collabora.com>,
"marc.w.gonzalez@free.fr" <marc.w.gonzalez@free.fr>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH V4 1/2] watchdog: imx_sc: Add i.MX system controller watchdog support
Date: Thu, 28 Feb 2019 20:21:26 -0800 [thread overview]
Message-ID: <dcc27575-8191-cfa9-4991-c02b399860df@roeck-us.net> (raw)
In-Reply-To: <DB3PR0402MB391655BBF367452B7BF6A7CEF5760@DB3PR0402MB3916.eurprd04.prod.outlook.com>
On 2/28/19 7:46 PM, Anson Huang wrote:
> Hi, Guenter
>
> Best Regards!
> Anson Huang
>
>> -----Original Message-----
>> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter
>> Roeck
>> Sent: 2019年2月28日 22:58
>> To: Anson Huang <anson.huang@nxp.com>; catalin.marinas@arm.com;
>> will.deacon@arm.com; wim@linux-watchdog.org; shawnguo@kernel.org;
>> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
>> Andy Gross <andy.gross@linaro.org>; heiko@sntech.de;
>> horms+renesas@verge.net.au; arnd@arndb.de; olof@lixom.net;
>> jagan@amarulasolutions.com; bjorn.andersson@linaro.org;
>> enric.balletbo@collabora.com; marc.w.gonzalez@free.fr; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
>> watchdog@vger.kernel.org
>> Cc: dl-linux-imx <linux-imx@nxp.com>
>> Subject: Re: [PATCH V4 1/2] watchdog: imx_sc: Add i.MX system controller
>> watchdog support
>>
>> On 2/27/19 11:59 PM, Anson Huang wrote:
>>> i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller
>>> inside, the system controller is in charge of controlling power, clock
>>> and watchdog etc..
>>>
>>> This patch adds i.MX system controller watchdog driver support,
>>> watchdog operation needs to be done in secure EL3 mode via
>>> ARM-Trusted-Firmware, using SMC call, CPU will trap into
>>> ARM-Trusted-Firmware and then it will request system controller to do
>>> watchdog operation via IPC.
>>>
>>> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>>> ---
>>> Changes since V3:
>>> - add ARM64 dependency for this driver;
>>> - change SPDX license to GPL-2.0 to match module license;
>>> - register platform device in driver instead of getting from dts;
>>> - return linux error code instead of system controller firmware error
>> code for watchdog operation
>>> failed case.
>>> ---
>>> drivers/watchdog/Kconfig | 13 +++
>>> drivers/watchdog/Makefile | 1 +
>>> drivers/watchdog/imx_sc_wdt.c | 201
>> ++++++++++++++++++++++++++++++++++++++++++
>>> 3 files changed, 215 insertions(+)
>>> create mode 100644 drivers/watchdog/imx_sc_wdt.c
>>>
>>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index
>>> 65c3c42..8c6575e 100644
>>> --- a/drivers/watchdog/Kconfig
>>> +++ b/drivers/watchdog/Kconfig
>>> @@ -625,6 +625,19 @@ config IMX2_WDT
>>> To compile this driver as a module, choose M here: the
>>> module will be called imx2_wdt.
>>>
>>> +config IMX_SC_WDT
>>> + tristate "IMX SC Watchdog"
>>> + depends on (ARCH_MXC && ARM64) || COMPILE_TEST
>>> + select WATCHDOG_CORE
>>> + help
>>> + This is the driver for the system controller watchdog
>>> + on the NXP i.MX SoCs with system controller inside.
>>> + If you have one of these processors and wish to have
>>> + watchdog support enabled, say Y, otherwise say N.
>>> +
>>> + To compile this driver as a module, choose M here: the
>>> + module will be called imx_sc_wdt.
>>> +
>>
>> With this patch applied, alpha:allmodconfig and almost all other
>> allmodconfig/allyesconfig builds fail with:
>>
>> ERROR: "__arm_smccc_smc" [drivers/watchdog/imx_sc_wdt.ko] undefined!
>> scripts/Makefile.modpost:92: recipe for target '__modpost' failed
>> make[1]: *** [__modpost] Error 1
>> Makefile:1260: recipe for target 'modules' failed
>>
>> as I told you before would happen. For the future, please consider that
>> forcing me to "prove" such failures does take a significant amount of time,
>> which is not always readily available.
>
> Sorry for wasting your time, it is just because I misunderstand your point, NOT
> that I did NOT force you to prove it.
>
> I am a little confuse, since this is new to me about these configs, I looked into
> other drivers which also use arm_smccc_smc, they do NOT add special config
> dependency for the failure build cause as you said, can you be more detail about
> this build issue, I tried below build, but the failure I met is other, so could you please
> advise how to fix such dependency issue, adding dummy function looks like NOT
> a good way since this arm_smccc_smc() API is widely used in kernel, there should be
> some common solution for it, Thanks in advanced and appreciate for your time.
>
I am quite sure that the other drivers calling arm_smccc_smc don't have
"|| COMPILE_TEST" as dependency, or they have a secondary dependency.
Randomly picking some
RTC_DRV_IMX_SC - no.
ARM_RK3399_DMC_DEVFREQ - no.
PHY_MVEBU_A3700_COMPHY - yes, but it also has "depends on HAVE_ARM_SMCCC" as
separate line, limiting its scope.
You can either drop "|| COMPILE_TEST" or add "depends on HAVE_ARM_SMCCC"
in a separate line. There may be other options, but I did not explore them.
Guenter
next prev parent reply other threads:[~2019-03-01 4:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 7:59 Anson Huang
2019-02-28 7:59 ` [PATCH V4 2/2] arm64: defconfig: add support for i.MX system controller watchdog Anson Huang
2019-02-28 14:58 ` [PATCH V4 1/2] watchdog: imx_sc: Add i.MX system controller watchdog support Guenter Roeck
2019-03-01 3:46 ` Anson Huang
2019-03-01 4:21 ` Guenter Roeck [this message]
2019-03-01 4:51 ` Anson Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcc27575-8191-cfa9-4991-c02b399860df@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andy.gross@linaro.org \
--cc=anson.huang@nxp.com \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=enric.balletbo@collabora.com \
--cc=festevam@gmail.com \
--cc=heiko@sntech.de \
--cc=horms+renesas@verge.net.au \
--cc=jagan@amarulasolutions.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=marc.w.gonzalez@free.fr \
--cc=olof@lixom.net \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=will.deacon@arm.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®