From patchwork Wed May 18 03:26:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yong, Jonathan" X-Patchwork-Id: 9116041 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0FF40BF29F for ; Wed, 18 May 2016 03:26:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09CE520254 for ; Wed, 18 May 2016 03:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2756C2025A for ; Wed, 18 May 2016 03:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751604AbcERD0M (ORCPT ); Tue, 17 May 2016 23:26:12 -0400 Received: from mga04.intel.com ([192.55.52.120]:1245 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546AbcERD0L (ORCPT ); Tue, 17 May 2016 23:26:11 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 17 May 2016 20:26:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,327,1459839600"; d="scan'208";a="969251407" Received: from vanguard-01.png.intel.com ([10.221.118.163]) by fmsmga001.fm.intel.com with ESMTP; 17 May 2016 20:26:10 -0700 From: "Yong, Jonathan" To: linux-watchdog@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: qipeng.zha@intel.com, jonathan.yong@intel.com Subject: [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake Date: Wed, 18 May 2016 03:26:11 +0000 Message-Id: <1463541972-19758-2-git-send-email-jonathan.yong@intel.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1463541972-19758-1-git-send-email-jonathan.yong@intel.com> References: <1463541972-19758-1-git-send-email-jonathan.yong@intel.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Apollo Lake Watchdog has the no_reboot flag in the 4th bit. Signed-off-by: Yong, Jonathan Acked-by: Guenter Roeck --- drivers/watchdog/iTCO_wdt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 0acc6c5..eccba32 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c @@ -150,6 +150,9 @@ static inline u32 no_reboot_bit(void) u32 enable_bit; switch (iTCO_wdt_private.iTCO_version) { + case 5: + enable_bit = 0x00000008; + break; case 3: enable_bit = 0x00000010; break; @@ -512,6 +515,7 @@ static int iTCO_wdt_probe(struct platform_device *dev) /* Clear out the (probably old) status */ switch (iTCO_wdt_private.iTCO_version) { + case 5: case 4: outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */ outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */