From patchwork Fri Jun 17 00:33:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yong, Jonathan" X-Patchwork-Id: 9181935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC8666088F for ; Fri, 17 Jun 2016 00:33:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC5C828396 for ; Fri, 17 Jun 2016 00:33:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C09B72839A; Fri, 17 Jun 2016 00:33:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611FF28397 for ; Fri, 17 Jun 2016 00:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754580AbcFQAdk (ORCPT ); Thu, 16 Jun 2016 20:33:40 -0400 Received: from mga04.intel.com ([192.55.52.120]:64482 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754334AbcFQAdf (ORCPT ); Thu, 16 Jun 2016 20:33:35 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 16 Jun 2016 17:33:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,481,1459839600"; d="scan'208";a="989183922" Received: from vanguard-01.png.intel.com ([10.221.118.163]) by fmsmga001.fm.intel.com with ESMTP; 16 Jun 2016 17:33:33 -0700 From: "Yong, Jonathan" To: linux-watchdog@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: qipeng.zha@intel.com, linux@roeck-us.net, dvhart@infradead.org, linux-kernel.vger.kernel.org@vger.kernel.org, jonathan.yong@intel.com Subject: [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Date: Fri, 17 Jun 2016 00:33:32 +0000 Message-Id: <1466123612-50633-3-git-send-email-jonathan.yong@intel.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1466123612-50633-1-git-send-email-jonathan.yong@intel.com> References: <1463541972-19758-1-git-send-email-jonathan.yong@intel.com> <1466123612-50633-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-Virus-Scanned: ClamAV using ClamSMTP The TCO I/O base is 40h rather than the usual 30h, and the re_reboot bit is at ACPIBASE+8. Signed-off-by: Yong, Jonathan Reviewed-by: Guenter Roeck --- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index 6f497e8..b86e1bc 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -85,7 +85,7 @@ * platform device and to export resources for those functions. */ #define TCO_DEVICE_NAME "iTCO_wdt" -#define SMI_EN_OFFSET 0x30 +#define SMI_EN_OFFSET 0x40 #define SMI_EN_SIZE 4 #define TCO_BASE_OFFSET 0x60 #define TCO_REGS_SIZE 16 @@ -94,6 +94,8 @@ #define TELEM_SSRAM_SIZE 240 #define TELEM_PMC_SSRAM_OFFSET 0x1B00 #define TELEM_PUNIT_SSRAM_OFFSET 0x1A00 +#define TCO_PMC_OFFSET 0x8 +#define TCO_PMC_SIZE 0x4 static const int iTCO_version = 3; @@ -502,7 +504,7 @@ static struct resource tco_res[] = { static struct itco_wdt_platform_data tco_info = { .name = "Apollo Lake SoC", - .version = 3, + .version = 5, }; #define TELEMETRY_RESOURCE_PUNIT_SSRAM 0 @@ -572,8 +574,8 @@ static int ipc_create_tco_device(void) res->end = res->start + SMI_EN_SIZE - 1; res = tco_res + TCO_RESOURCE_GCR_MEM; - res->start = ipcdev.gcr_base; - res->end = res->start + ipcdev.gcr_size - 1; + res->start = ipcdev.gcr_base + TCO_PMC_OFFSET; + res->end = res->start + TCO_PMC_SIZE - 1; ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res)); if (ret) {