From patchwork Mon Aug 26 18:21:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 838 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0D7373F0E1 for ; Mon, 26 Aug 2019 20:21:37 +0200 (CEST) Received: by mail-ot1-f72.google.com with SMTP id x31sf10585596ota.4 for ; Mon, 26 Aug 2019 11:21:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1566843696; cv=pass; d=google.com; s=arc-20160816; b=ZknkY8LDqFjOqalTTSQvFtEIsaMZFfgh5Pvj3SVcSphI2C7XAz5OA26Aejfy9cfLLh 12uOGpBx/0iFsEsqVQragyrC9FnYp6uudADmwWypFhOZk2EGHAnanscAbzCiH0Q+2wgz HXRleumQr7+5TJ5G+gZarHQqU0TJJ6B/+fYp62EPAhcoEL4962Nv9EmsA6e1RHiPxs5n /R0Mz4g1mRUYPS83dLCouucyVVGNoh8wdbOaBDOQ+s8UMBlnsu6e9JYWXJgP2AcK2a+8 E3gY/H+z36/+oDgQoGkvStdNQXsqwUeQhqa6cPjPd7/IuDN5hWlmv769zaJQJuZBJCyq LzWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=T5q1qw8y0q0b53p+gI4bcc/j0+wG3zw+jtK0GGS+STc=; b=Bkf+gmmTmgZCxVGhYP9+204RuZJPFkwPClNbcLXyGteNVaYtS/JMBGq638S6Q6hXh2 ggptM6AdD83moQKrqRqvCN2gwzsjU9LHg9uZduKmtbbZ2ifUjELOalSpB8s7w2bvBwHN ph+4Qhf96wfR3Xk8mAFT4EBkeYQd9XuL2xwki06EC42DP7QJ27rOrsQGsZzyKn5LAgHA V9A9/BoJwsMNcWV3DsXdv4dbvUiFKCG/KefFMI6q9aGpXfb3h91v+CUxBmrjjw9oIi4e k/YP0gW4wLWdZPbAmFMtnqNbPBNg++OpC4vyXKhmaDnPMT02cxJJ8kgTnkDi95ppLYWZ ryIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=d001+P+0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=T5q1qw8y0q0b53p+gI4bcc/j0+wG3zw+jtK0GGS+STc=; b=TF0d6rz7ijFkMrFRiLace/TVlT0KhNTFpIL6VFGd5QfiTBtEDhAh+44NGYy6qJTvJz VhCYHmAp2idHNYQ2P9JNxtcet8ktJskbm0xi9dhN3D5umBu9SeT3f/hWq13kVhqbo6oA fBjWkOmJOJuQ/iqBUkyxh2ZM7PVDAGrFWEuxw= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=T5q1qw8y0q0b53p+gI4bcc/j0+wG3zw+jtK0GGS+STc=; b=KjjO6C8v2rWBTezrNdm2EsDoMlQpWABRp/FuI0w6u+pdzkGb4aU5cYT83eelJr5Emh OZpO1GlOvJOAcVA0oE4bm2iH23ruPMqE5bx1ajbxK57DTPJzZ6yIrui1l60qbKS0OWGC hVHH9EIAOD5Ilv6hH7c4W2xbfuSc+9un+rDAlk+Wq7gmBjAHcrjyywr9UYvfVf+ZIod4 kU37L8YBgk2ESO9S8Nn0fJrUCWoLBcClSJ4OANbHIoo5h5hc/ijvI8dCOeYX17RvgYum cNnEV45V5ZNRCksszl/JlE9jlFfxWoYRuRtCDMB3/3064qwnsodkpSr1MNoUFS3gqfo8 kP2g== X-Gm-Message-State: APjAAAXH0dIowlxQ3pV8/Tl2B1FWG6zFuKX8iz2ywTyAGV2Jl/67uWCy LlIeGG1AqeKV60X/1qhMnQAugOJd X-Google-Smtp-Source: APXvYqzRRJ7w3VXTj1ghcBLqOan/qxpIEhrDZUksTGX/+U5P4MalpYzwQAz7+EKdQPRrUIAFOOrSgA== X-Received: by 2002:aca:f4ca:: with SMTP id s193mr12856733oih.131.1566843696008; Mon, 26 Aug 2019 11:21:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a54:4717:: with SMTP id k23ls409159oik.9.gmail; Mon, 26 Aug 2019 11:21:35 -0700 (PDT) X-Received: by 2002:aca:4797:: with SMTP id u145mr13789388oia.19.1566843695728; Mon, 26 Aug 2019 11:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566843695; cv=none; d=google.com; s=arc-20160816; b=UVXIvKWphPkYqQidyAH8kA0x2iIVJZ/H9T2AIa9DIyaj8Pq/BU16ZGDE15ywnTuTl3 VY0wCKNHty8Z6h3GkKcRHh2d6rWec1HPEXrgwRkWPghgRCvi7IL6QEI+SKDmK69t+o3v JkyVIkjUWWfHwX+CC/UJmus/moCpY9QNmCDpa9W+rdNSNoi6dMD46SgJbaKr16HafDwA qKd4arI1B7oxqKk/6g9W/1KaG+WckE3D1zsyMvb/uYEbYFehxI/hvWfyoPU0QhtHcJX2 qGJSzJ7x4ILR3N4csiMVkM3LzX9kGe4w6hz37JijBjBetGZSLpCEQHspB05CM9yiFPP+ UOoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jZTZrBBeRsgIagLVhnCtIjXbWsyubZYVGeJG3Ec4F8E=; b=vk+Ur/ST/2vG0Kh2JSj97XTQBkarEU+fghGT4tMjZgluO5LH7VwyWIK2kKhR9D/H5e Ur3sVlsJlHa3d1zmj/DSAija+fL5DE4DlHt+VReerNzre9Mhm6C9Oib+5ez9TsZ/Fei9 RiJZLRjaEfzq9U/idpLP8Ff4P4Q4MwOoLfYxaJwoQGgVfYIuErEle8eqOPyT3YmD7S8S KcRR9ySNM+5XgFk7tMMp+CWVmWHlHv/ldKqYx2JQuXVR8gJJfkT4cIPaDtnSom+7VEf5 GIpbO/u6/aO7iJSTSu/+L3Kehel+0Ympm1m5q/Bhptzn3tOGnellJc4OfiyH48+oBLmh 7bGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=d001+P+0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x13sor5117889oie.112.2019.08.26.11.21.35 for (Google Transport Security); Mon, 26 Aug 2019 11:21:35 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aca:2b08:: with SMTP id i8mr12835817oik.31.1566843695319; Mon, 26 Aug 2019 11:21:35 -0700 (PDT) Received: from jagan-XPS-13-9350.attlocal.net ([2600:1700:7430:38e0:d5b0:4823:33c8:5e46]) by smtp.gmail.com with ESMTPSA id c11sm4401461otr.54.2019.08.26.11.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 11:21:34 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Akash Gajjar , u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled Date: Mon, 26 Aug 2019 23:51:08 +0530 Message-Id: <20190826182111.30999-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190826182111.30999-1-jagan@amarulasolutions.com> References: <20190826182111.30999-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=d001+P+0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch handle a checks to not enable watchdog in TPL, if TPL won't require to enable that. This is useful, in rockchip platforms where watchdog would require in SPL and U-Boot proper and optional to have it in TPL. So, without this check, the TPL build failed to get the watchdog_reset function even though the watchdog is not enable for it. Signed-off-by: Jagan Teki --- include/watchdog.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/watchdog.h b/include/watchdog.h index a4a4e8e614..f04e3e7c4d 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -51,9 +51,10 @@ int init_func_watchdog_reset(void); #if defined(__ASSEMBLY__) #define WATCHDOG_RESET bl watchdog_reset #else - /* Don't require the watchdog to be enabled in SPL */ - #if defined(CONFIG_SPL_BUILD) && \ - !defined(CONFIG_SPL_WATCHDOG_SUPPORT) + /* Don't require the watchdog to be enabled in TPL/SPL */ + #if ((defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_BUILD)) && \ + (!defined(CONFIG_TPL_WATCHDOG_SUPPORT) || \ + !defined(CONFIG_SPL_WATCHDOG_SUPPORT))) #define WATCHDOG_RESET() {} #else extern void watchdog_reset(void);