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=-22.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 0F05CC48BD1 for ; Fri, 11 Jun 2021 13:44:43 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE72B613F4 for ; Fri, 11 Jun 2021 13:44:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE72B613F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EDDC880489; Fri, 11 Jun 2021 15:44:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ZYLG9Ca6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1826580563; Fri, 11 Jun 2021 15:44:38 +0200 (CEST) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C100280488 for ; Fri, 11 Jun 2021 15:44:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=lokeshvutla@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 15BDiWAK095017; Fri, 11 Jun 2021 08:44:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1623419072; bh=osDH4WnfPQlstfdCrafpywZAcfIJuDFLq1wGv7GLxRU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=ZYLG9Ca6pY887mqp1tOPyVTCyVVd9niXa1QlAcGLu7nGOOPnGRmfH/BjEQS9Yk394 NmNi2UaYHn/oFiH3WXEJyYeb1tVQK7B1dxoTPZJ8ghZVxdh7fk703K+dwaZqQeFP6G XAHVDiuojMnbqJaQasYNfHxG2U6JaoRmGoeUwyjg= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 15BDiWht048158 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Jun 2021 08:44:32 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 11 Jun 2021 08:44:31 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Fri, 11 Jun 2021 08:44:32 -0500 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 15BDiLmb018610; Fri, 11 Jun 2021 08:44:25 -0500 Subject: Re: [PATCH v2 4/5] watchdog: rti_wdt: Add support for loading firmware To: Jan Kiszka , Tom Rini CC: U-Boot Mailing List , Le Jin , Bao Cheng Su , Nian Gao , Chao Zeng , Simon Glass References: <88d7d3e323c27417d7109b8a92bf53a08ad77654.1622626660.git.jan.kiszka@siemens.com> <96039724-9a5f-dbb8-d46b-b268a0d9a8c2@ti.com> <20210607114007.GD9516@bill-the-cat> From: Lokesh Vutla Message-ID: Date: Fri, 11 Jun 2021 19:14:21 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Tom, On 09/06/21 6:47 pm, Jan Kiszka wrote: > On 07.06.21 13:44, Jan Kiszka wrote: >> On 07.06.21 13:40, Tom Rini wrote: >>> On Mon, Jun 07, 2021 at 03:33:52PM +0530, Lokesh Vutla wrote: >>>> +Tom, >>>> >>>> Hi Tom, >>>> >>>> On 02/06/21 3:07 pm, Jan Kiszka wrote: >>>>> From: Jan Kiszka >>>>> >>>>> To avoid the need of extra boot scripting on AM65x for loading a >>>>> watchdog firmware, add the required rproc init and loading logic for the >>>>> first R5F core to the watchdog start handler. In case the R5F cluster is >>>>> in lock-step mode, also initialize the second core. The firmware itself >>>>> is embedded into U-Boot binary to ease access to it and ensure it is >>>>> properly hashed in case of secure boot. >>>>> >>>>> One possible firmware source is https://github.com/siemens/k3-rti-wdt. >>>>> >>>>> Signed-off-by: Jan Kiszka >>>>> --- >>>>> drivers/watchdog/Kconfig | 20 ++++++++++++ >>>>> drivers/watchdog/Makefile | 5 +++ >>>>> drivers/watchdog/rti_wdt.c | 58 ++++++++++++++++++++++++++++++++++- >>>>> drivers/watchdog/rti_wdt_fw.S | 20 ++++++++++++ >>>>> 4 files changed, 102 insertions(+), 1 deletion(-) >>>>> create mode 100644 drivers/watchdog/rti_wdt_fw.S >>>>> >>>>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >>>>> index f0ff2612a6..1a1fddfe9f 100644 >>>>> --- a/drivers/watchdog/Kconfig >>>>> +++ b/drivers/watchdog/Kconfig >>>>> @@ -209,6 +209,26 @@ config WDT_K3_RTI >>>>> Say Y here if you want to include support for the K3 watchdog >>>>> timer (RTI module) available in the K3 generation of processors. >>>>> >>>>> +if WDT_K3_RTI >>>>> + >>>>> +config WDT_K3_RTI_LOAD_FW >>>>> + bool "Load watchdog firmware" >>>>> + depends on REMOTEPROC >>>>> + help >>>>> + Automatically load the specified firmware image into the MCU R5F >>>>> + core 0. On the AM65x, this firmware is supposed to handle the expiry >>>>> + of the watchdog timer, typically by resetting the system. >>>>> + >>>>> +config WDT_K3_RTI_FW_FILE >>>>> + string "Watchdog firmware image file" >>>>> + default "k3-rti-wdt.fw" >>>>> + depends on WDT_K3_RTI_LOAD_FW >>>>> + help >>>>> + Firmware image to be embedded into U-Boot and loaded on watchdog >>>>> + start. >>>> >>>> I need your input on this proach. Is it okay to include the linker file unders >>>> drivers? >>> >>> Maybe? I suppose the first thing that springs to mind is why aren't we >>> using binman and including this blob (which I happily see is GPLv2) >>> similar to how we do things with x86 for one example. >>> >> >> See https://www.mail-archive.com/u-boot@lists.denx.de/msg377894.html >> >> Jan >> > > Did this help to answer open questions? Otherwise, please let me know. > > I'd also like to avoid that his patch alone blocks 1-3 of the series > needless - but I would also not mind getting everything in at once. Can you provide your reviewed-by if you are okay with this approach? Thanks and regards, Lokesh > > Thanks, > Jan >