Message ID | 20190729074711.16988-7-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBIWJ7LUQKGQEN642MMI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 13AF83F0E1 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 29 Jul 2019 09:47:48 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id i2sf37969969pfe.1 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 29 Jul 2019 00:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564386467; cv=pass; d=google.com; s=arc-20160816; b=h6Am+Hjg/YNoF/v5/gGCLGQlswgATMlQ6gsdvQdibLAdwjbKTkEn/4s6RW1MCSkq6Z xXIGnqkUnFdQ7kv8dj+Hyn57V+zcb2F42UVrrg4KOG9s44Ghq9tmOCdQ9X1Wo/1k3ir+ Woj/7EKphq5RcIO8coTslz9Hh7tN+d01uvmGsOoiU8/vE1s/2ddmVtkyElld7rKK7tJF mz4Owps2aHBQovxpVcryRPoNIdZkonEMONg1sKzuZqhJgQvIXh3QqUPzmPUSdR55keI7 dAOkpwRYmtxclYHeVGB0s0rn6FWLm2bpa19rAOUEGbwSwQat6eR3tRx6udNwOkbIGma2 h35Q== 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=BwSMowhkOcHUvkKD3km5AkrSTcx7c+Ou7k7Jj1uGJiw=; b=EXobO+kVg10grG7rDBZK8PfKAw8IhVFYIl39ghQ/bmkzyqofmqTXUM9JrjUqXaKlhp uzbD1LgDQbkEwapYXNw5KmCeUQ3mGi8oa8OORCOTtAhHm/z6qri8ZaJc8M1p5bmeChC/ eiKyCPGbBJlaeRlSHBfnPTcXxIeNWanOLqrsxnZyBo5oVaLIiPVOgYTQJn7BhmZlw6op kymRsIGYILQSNnO0NXE7GZjjxqqzzTjVE1ONXaGGo4msvTjFypkOZOQ1/CMM+wOwSieo 4CNwL+V0bVCqaDk5KLGcjQQaj0vb5a3BBbxxoQYOfZh+ltQ7EmJepwTtU9bNQ+mPlodj HQEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fMgIoiW3; 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=BwSMowhkOcHUvkKD3km5AkrSTcx7c+Ou7k7Jj1uGJiw=; b=VG5o0UJU4pxPXXeC495a+qINi33a7bTpObv+y8+Zk+tm6r3cv+7N6P8tOTfybGptUI p/+IkLkn+BikXFlMN7R3+pXi8ivF7r3Q6w857ZaBMPcqWUBjhMOYxrEUU8uB1wBzsFYG oRnLGJkkRnZqqqdzxSy4IxUcico1Z5tvK52z8= 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=BwSMowhkOcHUvkKD3km5AkrSTcx7c+Ou7k7Jj1uGJiw=; b=sg2vSl1KOU6TMVdCBsanevXNzf5xm/DbFCkzc0ht08NhXgkrvit/50KVCzk5c2xIgf 6MlHAztsOQ3xxfc4sJmPjUWphkPqah3BE8QGY1Vf+Lu/MlSCbTbQLukXdbJeTT7T3csa z1V3MLV4i6fgf4okTwTMnjdjlQfmf5/52DGuB3lh8QISl03et1+EFe6lvRll/OR+gBJN NKikq97UTVmAn3IxLdsUrKJ+k1EGvn9Z3wFs8FMyRfdoUVk12rlDAjFYZDYaEBt5JPW7 0R8358pu2QPC/FZsRNB1f5PYAmp3X33Eb/+Z4Ivrvq2w50oUjjP+gXQCFH43odyI1V54 xIDw== X-Gm-Message-State: APjAAAXfcNmSe4ZD3RmIj0Nqrj1Mm5zAlRSRZe8joeKwHfZ2l8sIObw/ FN9sas+6X4KxCnDzwtcThzzePdhd X-Google-Smtp-Source: APXvYqwmwMSTMtKYBVghA8hNMi1rqWO8hEUJ2AcEg9xI8OcDILuz5oi9btOJ6S06btqg9jvo8X1D4w== X-Received: by 2002:a17:90a:8c0c:: with SMTP id a12mr110561682pjo.67.1564386466653; Mon, 29 Jul 2019 00:47:46 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b81:: with SMTP id p1ls15661238plk.6.gmail; Mon, 29 Jul 2019 00:47:46 -0700 (PDT) X-Received: by 2002:a17:902:29e6:: with SMTP id h93mr50357310plb.297.1564386466324; Mon, 29 Jul 2019 00:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564386466; cv=none; d=google.com; s=arc-20160816; b=J/Qi8n+KTmP3UkUaPfysfcLJCeG6lf6qb1yqA7mOlo7BxkPV6+HvTICK0KcCrYWpqZ YxMh0mkHiMNSSdzGCyXiE53EDP28ZtGab28yhfv1eB5yWNQztxLo65a29AhiLIRJJN1H sgbuRKVYN5Nw90IGKABLvKxULDC67cLfIYtg9LxKLiE/hbAg/+iPrXmAaz1N1Nk1vzMQ MZ/0Oa/cXU7aKJAWVFjW1XO6H5EbxEukQY41neYqUIgTDQTcdm/mU+9RclKNJCumYame TA21ZM9dI+WL+1fHHmTEyllv7RqBtHhpqi3jBv4MdNe5I/BalX/ijByD943eUCfgMgng XS1Q== 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=Wq6GJCz6OpwvPx36T+BmHN2obhM+vzYcJ0vK8rO0YF0=; b=cu1b5OGrQPTNFYdsIhsYIzOdKWvwxWnrbT3Jd0vuKNsLBEJ0ofSA6W40OMdHO/P+6Q oHTMs+sjv1/C73z7ly11kp281TpaoqMLtfzJ27fVJRglUA7H6PjX4Yihs7Oqoi7oQc0s n93AQInhbQPotjD4Ri57wW5Z44x2YFB8/cA/e8m4vzjpQv2NxmXS8j/WqBejEcqSIb5Z DLS6wKYoKQxVsqvqkxz/D7z8/q5FTAvTkUUHGaXVfKCqeQtkASal/wgqJKp/hKKlgirV S5nGZu/v7Shay/UZR6DzP1fh2FmlOqGmJIEAnHZZBh9ci9K/xXH2xIyx3rHX9oqSH/hr cIKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fMgIoiW3; 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 q31sor33761199pgb.5.2019.07.29.00.47.46 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 29 Jul 2019 00:47:46 -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:a65:6547:: with SMTP id a7mr81906381pgw.65.1564386465884; Mon, 29 Jul 2019 00:47:45 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.41]) by smtp.gmail.com with ESMTPSA id h14sm75723348pfq.22.2019.07.29.00.47.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 00:47:45 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Kever Yang <kever.yang@rock-chips.com>, Simon Glass <sjg@chromium.org>, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Akash Gajjar <akash@openedev.com>, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com>, Chin Liang See <clsee@altera.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH 06/15] wdt: designware: Simplify is_enabled function Date: Mon, 29 Jul 2019 13:17:02 +0530 Message-Id: <20190729074711.16988-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190729074711.16988-1-jagan@amarulasolutions.com> References: <20190729074711.16988-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=fMgIoiW3; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c index c668567c66..bd858f0608 100644 --- a/drivers/watchdog/designware_wdt.c +++ b/drivers/watchdog/designware_wdt.c @@ -45,9 +45,7 @@ static void designware_wdt_enable(void) static unsigned int designware_wdt_is_enabled(void) { - unsigned long val; - val = readl((CONFIG_DW_WDT_BASE + DW_WDT_CR)); - return val & 0x1; + return readl(CONFIG_DW_WDT_BASE + DW_WDT_CR) & DW_WDT_CR_RMOD_OFFSET; } #if defined(CONFIG_HW_WATCHDOG)
Right now the designware is_enabled function is using numeric number to check whether watchdog is enabled or not, so use register macro and check the same. Cc: Chin Liang See <clsee@altera.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/watchdog/designware_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)