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: 1153394 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="d001+P+0"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46HL8X3b8rz9sBp for ; Tue, 27 Aug 2019 04:27:40 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4291FC222CF; Mon, 26 Aug 2019 18:23:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 60256C22294; Mon, 26 Aug 2019 18:22:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AD2BAC222C1; Mon, 26 Aug 2019 18:21:39 +0000 (UTC) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by lists.denx.de (Postfix) with ESMTPS id 8CEB7C222AB for ; Mon, 26 Aug 2019 18:21:36 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id a127so12879304oii.2 for ; Mon, 26 Aug 2019 11:21:36 -0700 (PDT) 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:content-transfer-encoding; bh=jZTZrBBeRsgIagLVhnCtIjXbWsyubZYVGeJG3Ec4F8E=; b=d001+P+0aUZBLAkPxYtD/Q6XdAwdkwO763LxNH1AoTpwl3Wcc/eb/J6RHSjh+rqt+T YcUprHNiS7eKam9s2krfm64lUMP+loO+az7Mmq/jfw0D8Epi9r/j5ptkxx/tbwZfUH98 D9eI5LZ7l502uPao7Nj8844//5J1kiJFMFHB4= 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:content-transfer-encoding; bh=jZTZrBBeRsgIagLVhnCtIjXbWsyubZYVGeJG3Ec4F8E=; b=brKL84c+RNjIaOqwIHFSIe80Y/s1WOOTdkejhp3b07QQsme47S/dQrGgsTW6ZHfFtr 5vQy58sZAMz5kk7PBQYLb7kRw5+HBqoyWrwcQ0KjYPc+mvfxWeYLMzaiMYIrfU0oJ6KC I4tMDAFtzYtwKNCJyfh6ELNwwsZj2ILpf7Zlhg3sodQidwYDuboYADaiqYG2cn6sqXJ4 tILGBolK7g20ndcpBU1JV5mWAKNz7YczZQNm4pW91Z+TI2djFWE0tP6edkwyc/Vg9+1x reGymfJalP52l9RXl9j1/AdvPF4qGRrocj6py6Z6/B8SS8UXNgCF8UBf/zYriPHiu2KJ lfaw== X-Gm-Message-State: APjAAAWaJgdHth1LY6JqPsi/YYNn8vafcdzXM5vVGq7ETAG1vJmFpWPo rm8YDNYmDvSefFmM1TTLQEuIBA== X-Google-Smtp-Source: APXvYqyPrb9fpDs01HJ5B8Rn57dA7dR4hANq+mIPHM7D5Iv7GQrczqLy1QzBfH3kbnGZJVwOfN9Q3Q== 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 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 Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Akash Gajjar , linux-rockchip@lists.infradead.org Subject: [U-Boot] [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" 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);