Message ID | 20190826182111.30999-7-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBKGGSDVQKGQEL4S7KSI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 19E9E3F0E1 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 26 Aug 2019 20:21:29 +0200 (CEST) Received: by mail-oi1-f197.google.com with SMTP id z9sf5958575oid.11 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 26 Aug 2019 11:21:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1566843688; cv=pass; d=google.com; s=arc-20160816; b=x99SjNiXrh/GukRW/pwPCEff5LRKHWNTXPj7kQG8S0DYl6CI56JF8pUuTLwJpVcOf+ CagqCdLEXpvlnRk97PiHwTDVxrBAfm7BNgbGLIM3fwADihzv9lKe80Qg6g3Avu2/vhH1 kb6xAU/xxI0EUK/78ZHVNPL1H9Bz5jKHV56+eLnli4z7+aHIDt5pn0laBwOG84DhdOTa LdzzXMQqINk4iwRIs6KV2yG+LP1kWpxswqK0/YOf6nNSd2GQartHN1GHJQRqzQ9htvqH /K+SZ8D8hH0oOD8kWBfxjA3GH/X4obeRXN0MFr/RVn6AvUhRIK0w0ANTHhQ4QIH/gqyH qizA== 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=hS07LSoaVYHzagSIsAxrHdE+uAw5fkE95CpiT+3OrU0=; b=sMqtTcamLzeAGIH+jx2VMF6HemtGtg+tg5VRmD3iXlstCDH0vUVz0pFxy5Wjqymg44 B5mgGxiRQGGJtATejTyMAQRhrAz+zn6riGFmMVabTAWqiuYeYpQ3huxGIUntJtZlhvI1 rjJxPtJ1+v1YbLbMCjepYRkk2VzI1OJgGjog8BjSwy7Suv2JMGf/m62aYVg6/FUgJQ8j gpYVn3bbBRy1lbw+b42WSrUjjYe6XVLpfusBqLZ4KrXzVJw9k78/dmGnds3ZHzQ4UZKK FXjBNWPX23YbTEnmW3bU+bWF2UYpISyk31NK1PAYpGuNXgpQTlphsyZdLgtrU0+X6sNn siyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ft4AtN5x; 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=hS07LSoaVYHzagSIsAxrHdE+uAw5fkE95CpiT+3OrU0=; b=qqJkvfjftRINqapwLDNjca/qwRn/h9GPmim9O8KAiY3rvOhJ83/i+acHMJ3853ZeW2 RSdCd9XYvHDbJb/ETOVvEJPPsvzgb9TkrQtCSexx71vgz1YDEd0OZrrasFECZsFPl5cV 17aNdvonohqC0+Vlcx6zZYfvu+nYMGBnNrAC4= 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=hS07LSoaVYHzagSIsAxrHdE+uAw5fkE95CpiT+3OrU0=; b=dLN50lWerRss8WZrpzfAIHq3dKDoMX+obG8c/OB8JWw8nzs/pQrWA4F+hY3eq8iiav +BLG3OMIxtfuf7SebgE6HXvbc5r9svny8F3u5378LeqgGZTV7Wuh3nMHPriErXHZhI67 OEFN239V6X5mBSx69znT3E7oAv9eu9HiybzIIkWdB9DZBDlyS7yo6N2/E8MlBzUN0DeY Ai9sjLsOXTPtiysFLRWSrUBCtvloqVw7ur5KWB+oyQEopfE5kyD3D3qKgeewBvaRi3X4 9Y8aKMneEqQeuULnHqiZjMgXhn1JGBLOAphij9lV96CLI8omtiK1fFiWQ+g3I+EjsUXb SAMg== X-Gm-Message-State: APjAAAUtIEVmFwZtK5He0GL5RBmGeU/8G9CoWnXaosOPZF4W0rleIpbA 3tkZb/0pREaE4VFvpDbFyaZsl8Pn X-Google-Smtp-Source: APXvYqzlYleBwWM0/VYhh++bKPcd0Dudhek/+P9PMSwdveSNI7QCdH7yTAVuEFy/qq4K9/rH8i7MiQ== X-Received: by 2002:aca:b20b:: with SMTP id b11mr13536014oif.16.1566843688067; Mon, 26 Aug 2019 11:21:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6808:103:: with SMTP id b3ls410452oie.2.gmail; Mon, 26 Aug 2019 11:21:27 -0700 (PDT) X-Received: by 2002:a05:6808:65a:: with SMTP id z26mr12769201oih.151.1566843687731; Mon, 26 Aug 2019 11:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566843687; cv=none; d=google.com; s=arc-20160816; b=YO3g5cJPEjmDAp0+FFox8oBNZa/esdkZkBWt6bllXKwhLwHAYOzKv9FFHNSc5ZiqVC bcdZUQVMib7MgAY9ysaLe3GnJCbtpH3RmFWXCsrGrj3W3/TGNKTKAmeLZuZeKRmrHf1N MzvcYzL/BWhYCwO00CaI+chY0ZRPGgUCgwTWh2Tp1IqOt8R6pfnJ+KqZXoLbPl0bFtHW l1Q1qwXxvSh2P9RMMwjYJZ1BoRWey4IZf0e8oFcvSCUlOXVFzweV0rhKVxlwlHX+XSsV JGB7h60tzo8n0RkygE1hUYwNL4Q0l/vxZafDU7GrgaRe5xqql+eFp3/s+JM/ZsdiL2PX K9LQ== 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=8hP6rdkEvhhT0hEj14Sjz70+JpS0tBwbVOMye6DfvhQ=; b=uG7aDsuGaZUSsqjJ5KJTbzYGOLFDB+yUp6ayXNldMPF5Z+Ifmjbq08hxCVgBvQJkD5 zlA7dTrTi++QZitBmC48pX9c1kPWYfVKMiycrZ2ktkikg42Hpm7ZN9bALf6+ROPFCu7E cxQEoLdgpvnpu84ZKluHA8Bir4C6fmgf5jf5OYHwA4VMvYF8giWlOyHoEiaUlOWLneCf qdpfErforU5q9I47IF/aQtTAumv87Z/8S5+m5/PLt5Dfu+x0pYyWWSuwqGnH+Dcm7J5g NMH4tLirQk7Cgqt3Zo6HUtTb72Tar4II7nQhjXD5bvCxBPCGxV6dhsZL9qc5ClN2Cl55 hpdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ft4AtN5x; 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 l14sor5960927otk.79.2019.08.26.11.21.27 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 26 Aug 2019 11:21:27 -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:a9d:6852:: with SMTP id c18mr16870633oto.218.1566843687442; Mon, 26 Aug 2019 11:21:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 11:21:27 -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 v2 06/16] wdt: designware: Simplify enable function Date: Mon, 26 Aug 2019 23:51:01 +0530 Message-Id: <20190826182111.30999-7-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=ft4AtN5x; 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 bd858f0608..2979fda44e 100644 --- a/drivers/watchdog/designware_wdt.c +++ b/drivers/watchdog/designware_wdt.c @@ -14,7 +14,6 @@ #define DW_WDT_CR_EN_OFFSET 0x00 #define DW_WDT_CR_RMOD_OFFSET 0x01 -#define DW_WDT_CR_RMOD_VAL 0x00 #define DW_WDT_CRR_RESTART_VAL 0x76 /* @@ -38,9 +37,11 @@ static int designware_wdt_settimeout(unsigned int timeout) static void designware_wdt_enable(void) { - writel(((DW_WDT_CR_RMOD_VAL << DW_WDT_CR_RMOD_OFFSET) | - (0x1 << DW_WDT_CR_EN_OFFSET)), - (CONFIG_DW_WDT_BASE + DW_WDT_CR)); + u32 val = readl(CONFIG_DW_WDT_BASE + DW_WDT_CR); + + /* Enable watchdog */ + val |= DW_WDT_CR_RMOD_OFFSET; + writel(val, CONFIG_DW_WDT_BASE + DW_WDT_CR); } static unsigned int designware_wdt_is_enabled(void)
Simplify dw watchdog enable function by using proper macro and drop unwanted macros. 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)