Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2029611ybv; Fri, 21 Feb 2020 07:37:12 -0800 (PST) X-Google-Smtp-Source: APXvYqydPjiaKEj0xgR0Gk6fPQQnXVC7oqB0vqOC5kios6ZyH/sN6jsCZdYeDLdPSjduuxm3xuxO X-Received: by 2002:a05:6808:7dd:: with SMTP id f29mr2514839oij.67.1582299432853; Fri, 21 Feb 2020 07:37:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582299432; cv=none; d=google.com; s=arc-20160816; b=StXsCnfvaM+Lwy1zaNp5EWpP2ATiTYjr6A9fTcG1rLvwdo/4CQ5ZKNKR5AYQcYD+fd cXEYJEi2SBltQjWhZw5OG9rrZfvGNwNN46zVrHoamAaBgDU6gqk5GPgP6UT/Ndti0shD F0T0G6Kg/j4AbL+Wfil6ULL5+P1KbIZNMYnZH5VdiXYIFRhdXpCSYOVaTUQhWCRT7l91 3QLVrDkIYSnVcxj9XGAyuv58MbTfHGPuzZzIS/MwdGhIBp/Maj6xLtRWnIqYG8U3nT9z GFz25VSrKdp6dlwCBp/WuEulzK5+d1tSgbIf+eCST6xId+g4UYfbGV81P1zBBRCkqzDP 50VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=irTHNHUoqIP1OIaWKmJ9NZYQ5cimvKM2iE1/IFmPLJ8=; b=MvZPmxgJ3Nbtdl9v0D1uxLfWnv28Vvz6fPgS8PxlewbOy5dVzCdKTdcdP5PE5ZKbEk VcRCeeDrtuVOzfKIYJ6Q3NM9cjC+Wt+p290+yVPvzIkbZdWZZg51hgZhJ7BrnAz7ibyD 1CGbW/2iOCyIQ4B7Q/fgp3cpBEEPbiJaCtmrDyk/1BT01li9/3+Gk47tCOHbpaDsYRK8 a/fhtYcmePqUadjaD4rS80/ofPtTnpX45+7ENFA2wFFTxAPneDX8FqHR3fYDvwn/kKP1 N4A+104lvceunMKfxRYIk6P8E6SCaowaIWBRRI1Z0qlRDFQD4QoVA4I2I0KmjHGd8Btn VB3A== ARC-Authentication-Results: i=1; mx.google.com; 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 d20si1587438otq.157.2020.02.21.07.36.58; Fri, 21 Feb 2020 07:37:12 -0800 (PST) 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; 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 S1728679AbgBUPfo (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. > .