From patchwork Tue Mar 2 21:00:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 1446258 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ch9RcoRx; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DqqK53kPPz9sRN for ; Wed, 3 Mar 2021 08:00:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 00C1182833; Tue, 2 Mar 2021 22:00:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="ch9RcoRx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E25682834; Tue, 2 Mar 2021 22:00:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (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 54F7082829 for ; Tue, 2 Mar 2021 22:00:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=judge.packham@gmail.com Received: by mail-pg1-x52c.google.com with SMTP id a23so4902544pga.8 for ; Tue, 02 Mar 2021 13:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vXKF43vXwgUFHqfk7107LJIbnJlyUh6O3bBGLpGRhVw=; b=ch9RcoRxipLBwOOwv/F2ihzDs+FCptCCoDgGRfOYSdblP0bzZiUZLgKo8335G9XNl5 nNL8cZgalvgtKN0tgf9ldQdu19SQB/WJL1mFPyAOxWQYpfFb7iZS2DxjfpDrm/LMwLXC 6+qVlt82ymky6z6+Zt6ZCgpXsJr53fPi5OZC7FZqY1nvQ7890UndssSeDgtr+XlorEeR T4xWXpaMD5zX1V/aEs/Fxjgrp7DNmLK4T8aK/J0DUiHb4PwaG4zlMfRQ+ozl0uI5GUe8 8ReeS6UORwPpI86YNb5usC2uuK6XsD5eWc+bbgYtKxP6+fEa7obbu9sz72EYynZ1iVcN ysZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vXKF43vXwgUFHqfk7107LJIbnJlyUh6O3bBGLpGRhVw=; b=AU/ziVtwOg5reHQg/KbSihe94zFByO50uwrQIYepuFb+KGHI00Pps5ArCN4w9H6xmX 4R4/c+DOyTbC+jCglbdb+OWzv0xJ9me25hrxOobyAMpCmlSdGpj81gJkRcOjbVeJI4Dz zdojB4fxdq+FFcbBRUJB5kMS+wI3Qj7CUZdVqB//59uJVjs2+mPcaFmr53Oj1WXN5qQd TLfxByNjDNu0KBJk/ExSIkCznufDvmWY9cg/wFl4TCVf5P8ewGjTCs7B1H/PbqlwU1h7 lMGXVeQqIC+GJOcEr1XKe/CDYBmuO5o6y9MSENSMYNk9dY8RguuU2Ua2uN5bmWj4PIve lnKg== X-Gm-Message-State: AOAM531ZsSyvx1GypwSzxpQbAi8Z/lw0gp9L6UR3+WjcrNGXFHIsWMqt 002YY+JeZ8O216t9HRqvm+wkogNEIzi68g== X-Google-Smtp-Source: ABdhPJzxp+jyexNF89HZaw7XaqXwczn21LSiasw3t1ODMArlChQydKH9m0+9vIck1nSrD8EEUZhscA== X-Received: by 2002:aa7:8a11:0:b029:1ee:42d8:a8f5 with SMTP id m17-20020aa78a110000b02901ee42d8a8f5mr4907301pfa.5.1614718813139; Tue, 02 Mar 2021 13:00:13 -0800 (PST) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:d5c7:34da:f3de:e82e]) by smtp.gmail.com with ESMTPSA id ml17sm4839528pjb.18.2021.03.02.13.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 13:00:12 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de Cc: York Sun , Rainer Boschung , Chris Packham , Masahiro Yamada , Ovidiu Panait , Patrick Delaunay , Simon Glass , Stefan Roese , Stephen Warren Subject: [PATCH] common: board_f: Restore 85xx watchdog support Date: Wed, 3 Mar 2021 10:00:03 +1300 Message-Id: <20210302210003.21298-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean In commit 75918afa649b ("powerpc: Drop old non-generic-board code") we lost the call to init_85xx_watchdog() which had the effect of disabling support for the watchdog on 85xx and similar SoCs (i.e. the QorIQ P Series and T Series). Signed-off-by: Chris Packham --- Admittedly this is a bit ugly but it's the most literal reinstatement of the code that was lost. At the very least I should probably rename init_85xx_watchdog() to hw_watchdog_init() so it fits with the rest of the code. The other question is how has this gone unnoticed for ~5 years. I think the answer is because only the keymile boards were using it. Finally I am wondering if this should be converted to a DM driver. But given the fact that the watchdog is part of the core and not a peripheral on the SoC I don't know how that would look (e.g. what would I put in the DTS?). So I thought I'd run this up the flag pole as-is and see what feedback I get. common/board_f.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 0cddf0359dca..3778571a7196 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -111,6 +111,11 @@ static int init_func_watchdog_init(void) hw_watchdog_init(); puts(" Watchdog enabled\n"); # endif +# ifdef CONFIG_MPC85xx + init_85xx_watchdog(); + puts(" Watchdog enabled\n"); +# endif + WATCHDOG_RESET(); return 0;