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=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 ECC3EC433F5 for ; Wed, 8 Sep 2021 15:39:40 +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 0006361104 for ; Wed, 8 Sep 2021 15:39:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0006361104 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 67F3983370; Wed, 8 Sep 2021 17:39:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="IitdQLN3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1AB5D83370; Wed, 8 Sep 2021 17:39:35 +0200 (CEST) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41617832F0 for ; Wed, 8 Sep 2021 17:39:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x32f.google.com with SMTP id l7-20020a1c2507000000b002e6be5d86b3so1890237wml.3 for ; Wed, 08 Sep 2021 08:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=930r+jzzhXAnnn0AXogvk3EwFvd0ypR1FkAjf5qQuPg=; b=IitdQLN3VB9VKrTi5cwCjReZZPVf4Yann/gAxL7QgkV1Z3L5LNfOeR72GJsz/G2llu j7Le521wAGVZtS8dTMLTRFLOzI4aZslMGxKrDqvcyXqubNwag0yqYWNozkR7F25mn0pE AWXUrj1RYwJKmhxP2wxGDR07DxhNhFHZ3glghnunycY+R3hsIUwgP0lbWguFoYmMVkU7 l8eNsp4AUBhtwPkEMJnV9r6WL8WEOZJKSvKM70w49mL0bgpL+atSMwMz/J0zomviLcfz SWufeFJAf85sPc4JhsVoj5B2juRxAEeYuecMmzXEF0bDCYyYK+5ck80yToSzrisUhz19 boVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=930r+jzzhXAnnn0AXogvk3EwFvd0ypR1FkAjf5qQuPg=; b=pTmhRDcnvf4+51mj7/Vw9LS+tTKhuMW3gOagwIA7TUTPD94UE34eB+LluSf6+5zjWw Bl+zmXIAKZIhvUpT+UYVzF/lZKNCiVgn8azcHn4DVPila6g1JduXjd9kJWO6njB9uf0l nb98OiEnCdL+g8d0kDJTFmlLvzT7l5WYQ3/PlAQxvyFzdFYnpVlLcSAGM3Tglb4MeNuc itrxBpFKqFBWhjB3y+gO6su05pYBFKbwNyQaktl42RcSJZ5OAYSycBuBtpFs1Jx2e4Se NufEM71W+2hIFBdr2DrGHqn6fU08dVf/Mk4NohpnjU7Z+SJHElfAg2haWWj8WW6EPWXe xXdg== X-Gm-Message-State: AOAM533MVkQDn1VojQfshrGULSzhR3kes0FlrbDBfVOKdTe5m2gGE8UY JzYnjUJoiqcIWP3Qug5AgVLapcd6M1zuyQ== X-Google-Smtp-Source: ABdhPJy/ZLn5Nu+NYufvsAWcx6+VCTOOneVIoziiRtQc1ryGp/iUUEcnbx2uvcm62voJAG9940U97w== X-Received: by 2002:a1c:7dc8:: with SMTP id y191mr3123981wmc.6.1631115571784; Wed, 08 Sep 2021 08:39:31 -0700 (PDT) Received: from trex (174.red-79-146-83.dynamicip.rima-tde.net. [79.146.83.174]) by smtp.gmail.com with ESMTPSA id j4sm2494466wrt.23.2021.09.08.08.39.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Sep 2021 08:39:31 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Wed, 8 Sep 2021 17:39:30 +0200 To: monstr@monstr.eu Cc: u-boot@lists.denx.de Subject: cdns_wdt: who enables the clock Message-ID: <20210908153930.GA15019@trex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) 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 Michal The *linux* cadence_wdt driver for the watchdog enables the clock that controls its behaviour. However this is not done in the U-boot driver; I dont think it is safe to assume that the clock will be active. do you know why is the driver making that assumption? and how to enable the clock? Also, I am not sure it is either safe to assume that the WDT IP will be enabled; IMO during probe we should do something like this (otherwise the AXI bus will complain and fault the boot) static int cdns_wdt_probe(struct udevice *dev) { - debug("%s: Probing wdt%u\n", __func__, dev_seq(dev)); + u32 rst = 0; + + /* release WDT from reset */ + rst = readl(0xFD1A0100) & ~BIT(15); + writel(rst, 0xFD1A0100); + + debug("%s: Probing wdt%u)\n", __func__, dev_seq(dev)); return 0; } thanks Jorge