From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8487DC35646 for ; Fri, 21 Feb 2020 15:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 601D224650 for ; Fri, 21 Feb 2020 15:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727096AbgBUPfo (ORCPT ); Fri, 21 Feb 2020 10:35:44 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:26487 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgBUPfn (ORCPT ); Fri, 21 Feb 2020 10:35:43 -0500 Received: from [10.28.90.153] (10.28.90.153) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Fri, 21 Feb 2020 23:36:03 +0800 Subject: Re: [PATCH 1/2] dt-bindings: watchdog: Add arm,smc-wdt watchdog arm,smc-wdt compatible To: Evan Benn CC: Julius Werner , Guenter Roeck , Rob Herring , LKML , , "David S. Miller" , Jonathan Cameron , Mauro Carvalho Chehab , Wim Van Sebroeck , Greg Kroah-Hartman , Mark Rutland , , Jianxin Pan , Yonghui Yu References: <20200214062637.216209-1-evanbenn@chromium.org> <20200214172512.1.I02ebc5b8743b1a71e0e15f68ea77e506d4e6f840@changeid> <20200219223046.GA16537@bogus> <20200219232005.GA9737@roeck-us.net> From: Xingyu Chen Message-ID: Date: Fri, 21 Feb 2020 23:36:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [10.28.90.153] Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Hi, Evan Because the ATF does not define standard wdt index, each vendor defines its own index. So I don't think that the current driver[0] can fully cover my usecases. As discussed in your previous email, the meson wdt driver [1] can use the arm_smccc instead of meson_sm_call. [0]: https://patchwork.kernel.org/patch/11395579/ [1]: https://patchwork.kernel.org/patch/11331271/ Best Regards On 2020/2/20 14:41, Evan Benn wrote: > Dear Xingyu, > > Could this driver also cover your usecase? I am not familiar with > meson, but it seems like the meson calls could > be replaced with arm_smccc calls. Then this driver will cover both > chips. I am not sure if your firmware is upstream > somewhere, but this might be adapted; > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405 > > Thanks > > > On Thu, Feb 20, 2020 at 10:20 AM Guenter Roeck wrote: >> On Wed, Feb 19, 2020 at 03:04:54PM -0800, Julius Werner wrote: >>>> You are not the first 'watchdog in firmware accessed via an SMC call'. >>>> Is there some more detail about what implementation this is? Part of >>>> TF-A? Defined by some spec (I can dream)? >>> This is just some random implementation written by me because we >>> needed one. I would like it to be the new generic implementation, but >>> it sounds like people here prefer the naming to be MediaTek specific >>> (at least for now). The other SMC watchdog we're aware of is >>> imx_sc_wdt but unfortunately that seems to hardcode platform-specific >> There is one more pending, for Meson SMC. >> >> https://patchwork.kernel.org/project/linux-watchdog/list/?series=227733 >> >> Unfortunately it uses Meson firmware API functions, though it has pretty >> much the same functionality since those ultimately end up calling >> arm_smccc_smc(). >> >> Guenter >> >>> details in the interface (at least in the pretimeout SMC) so we can't >>> just expand that. With this driver I tried to directly wrap the kernel >>> watchdog interface so it should be platform-agnostic and possible to >>> expand this driver to other platforms later if desired. The SMC >>> function ID would still always have to be platform-specific, >>> unfortunately (but we could pass it in through the device tree), since >>> the Arm SMC spec doesn't really leave any room for OS-generic SMCs >>> like this. > .