Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp332838ybv; Wed, 19 Feb 2020 22:42:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyZd320IM8QDDbI49I/wIG/QScdeoFjv+dvyhQ8ts65fWn1ilDoa8vi4p6+lMnHPhuA5Zw6 X-Received: by 2002:a9d:5888:: with SMTP id x8mr21448774otg.361.1582180927855; Wed, 19 Feb 2020 22:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582180927; cv=none; d=google.com; s=arc-20160816; b=IPUh0BEUiW3RhhKuuQduLpBhV3YE+BwiVqTFLb8qfY8I1yf7eS9/uNl2Eql+RCHPIh 8MHKvqKxexkllQ3Dhw+LmRwdFSG8HwHQ8kbbq6SXYnmQMg5bVnBRQWhgc/8FXf6Om9sl EnH3q3/aCH9nod8vyL0fZWJXlQ3g0j9bjxq6SI7m3J9mSu3Q3YvAS3R7Ke+zZo2Mmi+b HzlCeYglJJh+SWYW0WF+I35ix4MzskShwLzB4Jl+0cOKOrcRMiGZKODPSUFS92cDusYw SKH6C6hBb1PobbN9cMUidpNhj+dOyw3ctjm+x7Ua2dBNZAUFFcJjwMiH81xYJsVJwlaN PL2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9FII6SdDOT5LM0XD58UCmM9UhU3FnY2YeLrE2lk53Is=; b=Kdiydww8epNEIU3RW/Ov+xBfewjBFzVjYaPzXFyiowmOdlvfTjsJPwgwA2NeOnqC5k 9U+PL7by09p7Oxwl1msuDKoQMIgT5rOfqEcyDF/8G1dmZg9pyoEtQu0eVPNmJmhNJsk0 uFK46ylLjgQOoOwbfRlv/7Mj8QfByiD6kvggOgIVSyGYlXjnXjFTfaOsWCwjU77/zw8e TWQk8heOTBbcqu84PJaoc1U34HNC3umwzkAdH5OzSx4yp2S8BYh+WmTB/x8dAlz42Pzj k7CvhcJgS4+onyhrK43aZqjrhGZ/0OGMYTYAEVvuR3ezbJhbv0BeMeR/sEHP8t4NePfm jZlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k5J7L+u1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si1323174otl.138.2020.02.19.22.41.55; Wed, 19 Feb 2020 22:42:07 -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; dkim=pass header.i=@chromium.org header.s=google header.b=k5J7L+u1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbgBTGlj (ORCPT + 99 others); Thu, 20 Feb 2020 01:41:39 -0500 Received: from mail-ua1-f68.google.com ([209.85.222.68]:40780 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726379AbgBTGlj (ORCPT ); Thu, 20 Feb 2020 01:41:39 -0500 Received: by mail-ua1-f68.google.com with SMTP id g13so1176685uab.7 for ; Wed, 19 Feb 2020 22:41:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9FII6SdDOT5LM0XD58UCmM9UhU3FnY2YeLrE2lk53Is=; b=k5J7L+u1jOqu5YUkSY9+Wm+SZ9fEd0plNX6vVCCQMNxtJ17xPFpHlzurSPf923XUx5 fGd8FKC/yCneBjJp84L4iNCbiXagGjaBqqevwWiGJTr6ZgEhG51rY5aoA+f0Upr+DuoI aK9EFDfSdNNI3IUdXgtYEmwjegBCvffppiAHQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9FII6SdDOT5LM0XD58UCmM9UhU3FnY2YeLrE2lk53Is=; b=E77Zfv5Pa0WtPg3Z0PU+OPsnBtaURiSw60kmpYQJH0R6doCkWneLX0g0A8j0jiB0U5 dE1DEsT6WAgAgXh8QHpNUaDtpHqlLy7vnbjRzZbA/NV615kmxd9zwCNMzrx+3Unamgac 94En3NtQ4w+V+gWewXPhS59dlxrnMQINOAtE+VYQL0H3D8+TXyr7vjgSFpgouHk7+rYd sIdsw93hDTG4sW/3OgNHJYeMyJd0EMpNNOPVcOEUISxd1ll48jxT3kmJZCF66P5FXxFV 8KxeHuAZgFd83YbLLFuddhAUliA8mZ4QNMScheDGTr3/9p8rouRw+CZgwaNcrX5T9XG5 H5ZA== X-Gm-Message-State: APjAAAWBOJ+PubBRhUkr+pjmApwmJCFGqlGySDuxul5zpzjLDC6nBDWF d18gof2SiNYhk5lZwRIkd5RXjCW6vtg= X-Received: by 2002:ab0:21cc:: with SMTP id u12mr14212438uan.55.1582180898202; Wed, 19 Feb 2020 22:41:38 -0800 (PST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com. [209.85.217.48]) by smtp.gmail.com with ESMTPSA id i22sm501279uap.17.2020.02.19.22.41.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Feb 2020 22:41:36 -0800 (PST) Received: by mail-vs1-f48.google.com with SMTP id n27so2031936vsa.0 for ; Wed, 19 Feb 2020 22:41:36 -0800 (PST) X-Received: by 2002:a67:f541:: with SMTP id z1mr15813130vsn.70.1582180895674; Wed, 19 Feb 2020 22:41:35 -0800 (PST) MIME-Version: 1.0 References: <20200214062637.216209-1-evanbenn@chromium.org> <20200214172512.1.I02ebc5b8743b1a71e0e15f68ea77e506d4e6f840@changeid> <20200219223046.GA16537@bogus> <20200219232005.GA9737@roeck-us.net> In-Reply-To: <20200219232005.GA9737@roeck-us.net> From: Evan Benn Date: Thu, 20 Feb 2020 17:41:09 +1100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: watchdog: Add arm,smc-wdt watchdog arm,smc-wdt compatible To: xingyu.chen@amlogic.com Cc: Julius Werner , Guenter Roeck , Rob Herring , LKML , devicetree@vger.kernel.org, "David S. Miller" , Jonathan Cameron , Mauro Carvalho Chehab , Wim Van Sebroeck , Greg Kroah-Hartman , Mark Rutland , linux-watchdog@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.