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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 B1095C2BA19 for ; Thu, 16 Apr 2020 00:55:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83892208E0 for ; Thu, 16 Apr 2020 00:55:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="t6Hf0mE2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="a2XbOiwl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83892208E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZJq8eEDMmPIWiC/wYKb4x7RGnuv5aklv2hgGQfO3kxM=; b=t6Hf0mE2fMdj4o Bw7f3hdsSR7jyq1Lz/l98EeYQv97iCYyqYcz26NB/Y0DIa3/Pv2cmG5iRKqdYX2gLgDOPQtQXI4WK RF0ZzjtWOcq5j4ROlYcdh/HC9llu4wJIR5JezRtFao6WSQsbkK8TOwL499w79g0BBqo0rLH3HJG9B I9vQ/z89asQ8Zfg2J7S8yGZosxAovVQi5QxDJlpWggoKdI0uD5l9D1aKE3Z7fypq0cUDnUPxsIlqB kebj+++QRQwDF/wItHQILRG20VuOIKXlln10OzeqcbeyUV2lTsmqiKEURmgGA1TQsVxsN65m77+8j Dk4OX1zqsxecz9o8fSPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOsoL-0000Th-M0; Thu, 16 Apr 2020 00:55:21 +0000 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOsoJ-0000T9-EQ for linux-mediatek@lists.infradead.org; Thu, 16 Apr 2020 00:55:20 +0000 Received: by mail-ot1-x342.google.com with SMTP id j26so1751908ots.0 for ; Wed, 15 Apr 2020 17:55:19 -0700 (PDT) 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=oymDymDSGwWgVl7PdrWgMeH1mdt9MH+svEJHIh9ofYo=; b=a2XbOiwlAAQzxczt4QF4WPs7900EFsrLVOxWmAfWFDrYlbOxFqFleRRIhOr+uI8M5f M2cwVJ40d4uDtjkefb7KmLLsMXHjL/sGzNwIx0DMzOlXnR5mb/1snHQ+m68Q4OvzwI+F RFsl2ztnRLmbC/I9LzD4UKpcjD3O1jAdNfCXg= 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=oymDymDSGwWgVl7PdrWgMeH1mdt9MH+svEJHIh9ofYo=; b=C76t1rbBW3dInE1FDVB4/6KLutC2dVfkAoQZ6WFyD+pMVAgn3+g5OcINOAgeeXqKgr fMF1d4bflT/Ox+sge0s2hrpYcAFWjhE/quNFuDdCFN/y3H4jWbg/7OL6/TZUstDrWqAr quEGU6Z6I5ukRMzpDBNoVXlv8Zm97DsJU4VV7a7kkZCnnORQJ/cD7QfqjSh74mPKBdd7 1CCrxxFWbYJM7qR5Qi4+83gGLuUHQB3Wwbo2+WvfjnBTXtmv9zG95NW1XMUzY8RFgIxf oZomSsDf62VD6C8jT4gAf7A2FPEK7K1Ypf68921y+x56fD4GZaF7Ax3n7YpDgvB2D3fG /uxA== X-Gm-Message-State: AGi0Pub9w3Sucl+z4rrz8/vBE16nvVX59bcCLnFxKKXHWwyC1q87kmVW 8MK8TZu3RR8Qdfr+lLXvEjk0zPuLohM= X-Google-Smtp-Source: APiQypJPU6xWz6FjmJbBm+4vOVwD6RgZyMiXkB7sItAl4Hq3o/l0wEGSiPJ3BoJQMjasFGEjESFtvg== X-Received: by 2002:a05:6830:1:: with SMTP id c1mr24134885otp.200.1586998518539; Wed, 15 Apr 2020 17:55:18 -0700 (PDT) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com. [209.85.210.48]) by smtp.gmail.com with ESMTPSA id n23sm7350621ooe.44.2020.04.15.17.55.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Apr 2020 17:55:18 -0700 (PDT) Received: by mail-ot1-f48.google.com with SMTP id f52so1700471otf.8 for ; Wed, 15 Apr 2020 17:55:18 -0700 (PDT) X-Received: by 2002:ab0:592c:: with SMTP id n41mr1543975uad.73.1586998027359; Wed, 15 Apr 2020 17:47:07 -0700 (PDT) MIME-Version: 1.0 References: <20200403052900.258855-1-evanbenn@chromium.org> <890948ef-7276-fdae-d270-eb30eff3eab2@amlogic.com> <243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com> <20200415231215.GA182398@roeck-us.net> In-Reply-To: <20200415231215.GA182398@roeck-us.net> From: Evan Benn Date: Thu, 16 Apr 2020 10:46:39 +1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls. To: Guenter Roeck X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200415_175519_488969_825751CA X-CRM114-Status: GOOD ( 22.58 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Bjorn Andersson , Manivannan Sadhasivam , Yonghui Yu , Leonard Crestez , Will Deacon , Xingyu Chen , Rob Herring , Wim Van Sebroeck , Anson Huang , Mauro Carvalho Chehab , Marcin Juszkiewicz , Valentin Schneider , devicetree@vger.kernel.org, LINUX-WATCHDOG , Rob Herring , "moderated list:ARM/Mediatek SoC support" , Jonathan Cameron , Matthias Brugger , "open list:ARM/Amlogic Meson..." , Andy Shevchenko , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Jianxin Pan , Greg Kroah-Hartman , LKML , Vinod Koul , Olof Johansson , Julius Werner , Shawn Guo , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Thanks Xingyu, Can anyone provide advice about making SMCWD_FUNC_ID a device tree param directly, vs using the compatible to select from a table. Please note get_timeleft erroneously returns res.a0 instead of res.a1 in this version. Evan On Thu, Apr 16, 2020 at 9:12 AM Guenter Roeck wrote: > > On Wed, Apr 15, 2020 at 03:29:29PM -0700, Julius Werner wrote: > > > 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. > > > > I think we're trying hard to keep this compatible to a Trusted > > Firmware counterpart that we have already shipped, so we would prefer > > to keep it at seconds if possible. That's what the Linux watchdog core > > uses as well after all, so it just seems natural. I don't really see > > how what U-Boot does would have anything to do with this. > > > > > - 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(); > > > > They can still do that but they should do that on the Trusted Firmware > > side. Emulating a missing reset functionality should be handled by the > > hardware abstraction layer (in this case Trusted Firmware), not at the > > Linux API level. So Linux would still send a PSCI_SYSTEM_RESET SMC, > > but then Trusted Firmware can choose to implement that by setting the > > watchdog to the smallest possible timeout (which it can because it's > > accessing it directly, not through this SMC interface) and letting it > > expire. > > I agree. Using a watchdog to implement reset functionality is always a > means of last resort and should be avoided if possible. > > Guenter _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek