Received: by 10.223.164.202 with SMTP id h10csp1996762wrb; Thu, 16 Nov 2017 07:45:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ6oWtKiJW7UOvDeiw+kZmGEahY4cxW1K0OHSVAGOh+MFwVNFQkcotdgW5Gv1hD4RkMofLI X-Received: by 10.98.214.21 with SMTP id r21mr2318704pfg.74.1510847133995; Thu, 16 Nov 2017 07:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510847133; cv=none; d=google.com; s=arc-20160816; b=YuNbe5p0fHUdjl7Ut7djK0nMrvRlxHEtf3nYLotP9jgMVQG2gyu3aI64Y37eo1BlJS th/ruzl0QF69ssVpdj3nkjASBI8KpsKsHFUNrdEakiwRr9Sc8feP1S1P+UJwFFoZ0Pkv GOj2/0sVg1TLAoKpye05hyErmWiiNB7MSH4SV63jmZU0guIwZAqbQLqQKau/AMzojl/F rY33VNHjEPyemvP94/TDfp+leB0PF3BAR6gOF/dTiZRbzo81GS638UmZfu3SZPFOf0hW N30/CWJkcMdeIjhzFCfmKavL8AlyGZAHRf4vteRFbt9L/wsBrcLMkqDAX3IOJk3t5mTF jqEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=gMTerXm8TnzGQpkXTyHExl+MG5NMI2M+40YJxvuD9mc=; b=EWTGnafSqtiNr1UVXhEuMZHtUQIyugsPxgXMkqsZGc0mbB9ruurrjUPB0BpnB6FzAP E5sCHppPQXupHQHRxrbLuJoaG7/VAql/pQ6MtyPfARt4O4szXv0oTyMWOB9y6EjdF18W LSw1oJ/OLudEOmxj5s9NtnE4PIy4l0leC3VZJU+50AQk8br56vl59aNHcouH9Eb6xdYm ytla2MNSbQuaa0FYG6EXPd1pbfsmryTfbuUI3ac7GM0MGevm2nXmI/EJV0aE1k6y2+cd S29IS49Vi5/G9ZudXUCqnzhIoZ+8cVJDeC2k3qWYlWGNT35BTHnNLxJrUPH8GUBT6OJJ Xjjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si1050516pge.556.2017.11.16.07.45.20; Thu, 16 Nov 2017 07:45:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935223AbdKPN7G (ORCPT + 91 others); Thu, 16 Nov 2017 08:59:06 -0500 Received: from mga04.intel.com ([192.55.52.120]:26946 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965008AbdKPN6M (ORCPT ); Thu, 16 Nov 2017 08:58:12 -0500 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2017 02:14:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,402,1505804400"; d="scan'208";a="176875096" Received: from skchakra-desk.iind.intel.com ([10.66.254.85]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2017 02:14:50 -0800 From: Souvik Kumar Chakravarty To: platform-driver-x86@vger.kernel.org Cc: dvhart@infradead.org, andy@infradead.org, linux-kernel@vger.kernel.org, rajneesh.bhardwaj@intel.com, Souvik Kumar Chakravarty Subject: [PATCH v1 1/5] platform/x86: intel_pmc_ipc: Fix register names Date: Thu, 16 Nov 2017 15:48:13 +0530 Message-Id: <1510827497-25188-2-git-send-email-souvik.k.chakravarty@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510827497-25188-1-git-send-email-souvik.k.chakravarty@intel.com> References: <1510827497-25188-1-git-send-email-souvik.k.chakravarty@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCR TELEM register names have been fixed as per the External Design Sepcification (EDS) of Apollolake and GeminiLake. This makes it possible to fetch the complete 64-bit S0ix counter using exported APIs. This patch also fixes some alignment issues in the macro definition section. Signed-off-by: Souvik Kumar Chakravarty --- arch/x86/include/asm/intel_pmc_ipc.h | 10 ++++++---- drivers/platform/x86/intel_pmc_ipc.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/intel_pmc_ipc.h b/arch/x86/include/asm/intel_pmc_ipc.h index fac89eb..b41f388 100644 --- a/arch/x86/include/asm/intel_pmc_ipc.h +++ b/arch/x86/include/asm/intel_pmc_ipc.h @@ -3,8 +3,8 @@ /* Commands */ #define PMC_IPC_PMIC_ACCESS 0xFF -#define PMC_IPC_PMIC_ACCESS_READ 0x0 -#define PMC_IPC_PMIC_ACCESS_WRITE 0x1 +#define PMC_IPC_PMIC_ACCESS_READ 0x0 +#define PMC_IPC_PMIC_ACCESS_WRITE 0x1 #define PMC_IPC_USB_PWR_CTRL 0xF0 #define PMC_IPC_PMIC_BLACKLIST_SEL 0xEF #define PMC_IPC_PHY_CONFIG 0xEE @@ -25,8 +25,10 @@ /* GCR reg offsets from gcr base*/ #define PMC_GCR_PMC_CFG_REG 0x08 -#define PMC_GCR_TELEM_DEEP_S0IX_REG 0x78 -#define PMC_GCR_TELEM_SHLW_S0IX_REG 0x80 +#define PMC_GCR_TELEM_DEEP_S0IX_LO_REG 0x78 +#define PMC_GCR_TELEM_DEEP_S0IX_HI_REG 0x7C +#define PMC_GCR_TELEM_SHLW_S0IX_LO_REG 0x80 +#define PMC_GCR_TELEM_SHLW_S0IX_HI_REG 0x84 #if IS_ENABLED(CONFIG_INTEL_PMC_IPC) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index e03fa314..1c096e7 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -883,8 +883,8 @@ int intel_pmc_s0ix_counter_read(u64 *data) if (!ipcdev.has_gcr_regs) return -EACCES; - deep = gcr_data_readq(PMC_GCR_TELEM_DEEP_S0IX_REG); - shlw = gcr_data_readq(PMC_GCR_TELEM_SHLW_S0IX_REG); + deep = gcr_data_readq(PMC_GCR_TELEM_DEEP_S0IX_LO_REG); + shlw = gcr_data_readq(PMC_GCR_TELEM_SHLW_S0IX_LO_REG); *data = S0IX_RESIDENCY_IN_USECS(deep, shlw); -- 2.7.4 From 1584366039183993373@xxx Sat Nov 18 01:39:59 +0000 2017 X-GM-THRID: 1584366039183993373 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread