From patchwork Thu Apr 24 16:40:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 28996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D3EE12036A for ; Thu, 24 Apr 2014 16:42:24 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf15360457ieb.9 for ; Thu, 24 Apr 2014 09:42:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=LgaaqXf+gNnB1iikrPhfc/0nRhjP5LEB++SQEU8ee8A=; b=IvGa5O/GYiA5LpIKbJoOWhsc/pYUE6Rn+XJw06wYUr5FivVCYUB77O0I9WKadGmMHq iOJn/7l6H4JuujjQriuw7BkSL/DPaLHmIeFg88aSL/6GJbhEVSjrnVZxbxiVpeOIB/Wb 7drg/tgYtcAcoOYaJgYaBgR1VyVoOtHl9TQwnEN+LBSwmb860/to/5WfXzkVBO3vdMYr My7s2x02OeFvCSZRDS74K8FjW9bEmWV8aYHpuSUehKXPj4L3EX6yL7HcInQrUSGZSmzh ZteMhFwi6+cyJ1HjbjWxMJHLIHTa7LOq2hnxpYvYXyp9PXUGk7BFWgnPgUrZ7+mQptIP WcWQ== X-Gm-Message-State: ALoCoQnob5bORITI/zv/t9vxOudIPu2r2uvOW2pfjhNwRR7XRynhegHYN+8L8MHAHvzX8ZOTOkRZ X-Received: by 10.50.62.106 with SMTP id x10mr2740377igr.2.1398357744310; Thu, 24 Apr 2014 09:42:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.200 with SMTP id 66ls1207403qgf.24.gmail; Thu, 24 Apr 2014 09:42:24 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr1850619vev.7.1398357744079; Thu, 24 Apr 2014 09:42:24 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id z6si1056641vcm.9.2014.04.24.09.42.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 09:42:24 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so3171983veb.21 for ; Thu, 24 Apr 2014 09:42:24 -0700 (PDT) X-Received: by 10.52.90.37 with SMTP id bt5mr1583734vdb.7.1398357743994; Thu, 24 Apr 2014 09:42:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp30569vcb; Thu, 24 Apr 2014 09:42:23 -0700 (PDT) X-Received: by 10.224.67.195 with SMTP id s3mr4373956qai.96.1398357743600; Thu, 24 Apr 2014 09:42:23 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id v6si2474243qas.22.2014.04.24.09.42.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Apr 2014 09:42:23 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdMhw-0000is-CQ; Thu, 24 Apr 2014 16:41:08 +0000 Received: from fw-tnat.austin.arm.com ([217.140.110.23] helo=collaborate-mta1.arm.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdMhb-0000Sf-Ob for linux-arm-kernel@lists.infradead.org; Thu, 24 Apr 2014 16:40:48 +0000 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.45]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 5E63813FCAD; Thu, 24 Apr 2014 11:40:23 -0500 (CDT) From: Pawel Moll To: arm@kernel.org Subject: [PATCH 4/4] ARM: vexpress/TC2: Convert OPP voltage to uV before storing Date: Thu, 24 Apr 2014 17:40:18 +0100 Message-Id: <1398357618-11050-5-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398357618-11050-1-git-send-email-pawel.moll@arm.com> References: <1398357618-11050-1-git-send-email-pawel.moll@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140424_094047_846263_A302D9CC X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Punit Agrawal , Pawel Moll , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pawel.moll@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Punit Agrawal The SPC stores voltage in mV while the code assumes it was returning uV. Convert the returned voltage to uV before storing. Also fix the comment depicting voltage to uV. Signed-off-by: Punit Agrawal Reviewed-by: Sudeep Holla Signed-off-by: Pawel Moll --- arch/arm/mach-vexpress/spc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index c26ef5b..2c2754e 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -392,7 +392,7 @@ static irqreturn_t ve_spc_irq_handler(int irq, void *data) * +--------------------------+ * | 31 20 | 19 0 | * +--------------------------+ - * | u_volt | freq(kHz) | + * | m_volt | freq(kHz) | * +--------------------------+ */ #define MULT_FACTOR 20 @@ -414,7 +414,7 @@ static int ve_spc_populate_opps(uint32_t cluster) ret = ve_spc_read_sys_cfg(SYSCFG_SCC, off, &data); if (!ret) { opps->freq = (data & FREQ_MASK) * MULT_FACTOR; - opps->u_volt = data >> VOLT_SHIFT; + opps->u_volt = (data >> VOLT_SHIFT) * 1000; } else { break; }