From: Xingyu Chen <xingyu.chen@amlogic.com>
To: Evan Benn <evanbenn@google.com>, LKML <linux-kernel@vger.kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Yonghui Yu <yonghui.yu@amlogic.com>,
Leonard Crestez <leonard.crestez@nxp.com>,
Will Deacon <will@kernel.org>,
Xingyu Chen <xingyu.chen@amlogic.com>,
Rob Herring <robh@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Anson Huang <Anson.Huang@nxp.com>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
Valentin Schneider <valentin.schneider@arm.com>,
Guenter Roeck <linux@roeck-us.net>,
devicetree@vger.kernel.org,
LINUX-WATCHDOG <linux-watchdog@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
Jianxin Pan <jianxin.pan@amlogic.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vinod Koul <vkoul@kernel.org>, Olof Johansson <olof@lixom.net>,
Julius Werner <jwerner@chromium.org>,
Shawn Guo <shawnguo@kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls.
Date: Wed, 15 Apr 2020 19:54:57 +0800 [thread overview]
Message-ID: <243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com> (raw)
In-Reply-To: <890948ef-7276-fdae-d270-eb30eff3eab2@amlogic.com>
Hi,Evan
On 2020/4/11 23:06, Xingyu Chen wrote:
> Hi, Evan
>
> On 2020/4/3 14:04, Evan Benn wrote:
>> Apologies I forgot to add this note to my cover letter.
>>
>> Xingyu do you mind seeing if you can modify your ATF firmware to match
>> this driver?
>> We can add a compatible or make other changes to suit you.
> Thanks for your patch [0], I will test this patch on the meson-A1
> platform, but It looks more
> convenient to be compatible with other platforms if using the compatible
> strings to correlate
> platform differences include function ID and wdt_ops.
>
> [0]: https://patchwork.kernel.org/patch/11471829/
I have tested your patch on the meson-A1, but I use the compatible
strings to correlate the following platform differences,it works normally.
static const struct smcwd_data smcwd_mtk_data = {
.func_id = 0x82003d06,
.ops = &smcwd_ops,
}
static const struct smcwd_data smcwd_meson_data = {
.func_id = 0x82000086,
.ops = &smcwd_timeleft_ops,
}
In addition, It looks more reasonable to use the "msec" as the unit of
timeout parameter for the ATF fw interface with SMCWD_SET_TIMEOUT:
- The fw interface will compatible with the uboot generic watchdog
interface at [0], and there is no need to convert timeout from msec
to sec.
- Some vendor's watchdog may be not support the "wdt_trigger_reset"
reset operation, but they can use the method below to reset the system
by the watchdog right now.
watchdog_set_time(1); //1ms
watchdog_enable();
[0]:
https://gitlab.denx.de/u-boot/u-boot/-/blob/master/drivers/watchdog/wdt-uclass.c
Best Regards
>> Thanks
>>
>> On Fri, Apr 3, 2020 at 4:29 PM Evan Benn <evanbenn@chromium.org
>> <mailto:evanbenn@chromium.org>> wrote:
>>
>> This is currently supported in firmware deployed on oak, hana and
>> elm mt8173
>> chromebook devices. The kernel driver is written to be a generic SMC
>> watchdog driver.
>>
>> Arm Trusted Firmware upstreaming review:
>> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405
>>
>> Patch to add oak, hana, elm device tree:
>> https://lore.kernel.org/linux-arm-kernel/20200110073730.213789-1-hsinyi@chromium.org/
>> I would like to add the device tree support after the above patch is
>> accepted.
>>
>> Changes in v3:
>> - Change name back to arm
>> - Add optional get_timeleft op
>> - change name to arm_smc_wdt
>>
>> Changes in v2:
>> - Change name arm > mt8173
>> - use watchdog_stop_on_reboot
>> - use watchdog_stop_on_unregister
>> - use devm_watchdog_register_device
>> - remove smcwd_shutdown, smcwd_remove
>> - change error codes
>>
>> Evan Benn (1):
>> dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog
>>
>> Julius Werner (1):
>> watchdog: Add new arm_smd_wdt watchdog driver
>>
>> .../bindings/watchdog/arm-smc-wdt.yaml | 30 +++
>> MAINTAINERS | 7 +
>> arch/arm64/configs/defconfig | 1 +
>> drivers/watchdog/Kconfig | 13 ++
>> drivers/watchdog/Makefile | 1 +
>> drivers/watchdog/arm_smc_wdt.c | 181
>> ++++++++++++++++++
>> 6 files changed, 233 insertions(+)
>> create mode 100644
>> Documentation/devicetree/bindings/watchdog/arm-smc-wdt.yaml
>> create mode 100644 drivers/watchdog/arm_smc_wdt.c
>>
>> --
>> 2.26.0.292.g33ef6b2f38-goog
>>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-04-15 11:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 5:28 [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls Evan Benn
2020-04-03 5:28 ` [PATCH v2 1/2] dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog Evan Benn
2020-04-03 5:29 ` [PATCH v2 2/2] watchdog: Add new arm_smd_wdt watchdog driver Evan Benn
2020-04-03 6:00 ` Guenter Roeck
2020-04-03 22:56 ` Julius Werner
2020-04-04 1:00 ` Evan Benn
2020-04-03 6:08 ` [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls Evan Benn
[not found] ` <CAKz_xw0gV+w_gMkLfB4qUBdULLfFoiv1TBWp9_PHy33wP_XWyA@mail.gmail.com>
[not found] ` <890948ef-7276-fdae-d270-eb30eff3eab2@amlogic.com>
2020-04-15 11:54 ` Xingyu Chen [this message]
2020-04-15 22:29 ` Julius Werner
2020-04-15 23:12 ` Guenter Roeck
2020-04-16 0:46 ` Evan Benn
2020-04-16 0:56 ` Julius Werner
2020-04-16 3:48 ` Florian Fainelli
2020-04-21 1:08 ` Evan Benn
2020-04-21 2:36 ` Florian Fainelli
2020-04-16 3:23 ` Xingyu Chen
-- strict thread matches above, loose matches on Subject: below --
2020-04-21 11:05 Evan Benn
2020-04-21 14:32 ` Guenter Roeck
2020-04-22 0:40 ` Evan Benn
2020-02-21 5:38 Evan Benn
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=243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com \
--to=xingyu.chen@amlogic.com \
--cc=Anson.Huang@nxp.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=evanbenn@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jianxin.pan@amlogic.com \
--cc=jwerner@chromium.org \
--cc=leonard.crestez@nxp.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=manivannan.sadhasivam@linaro.org \
--cc=marcin.juszkiewicz@linaro.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab+huawei@kernel.org \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=valentin.schneider@arm.com \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
--cc=wim@linux-watchdog.org \
--cc=yonghui.yu@amlogic.com \
/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;
as well as URLs for NNTP newsgroup(s).