From patchwork Tue Jun 12 14:19:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9230 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 660F023EB4 for ; Tue, 12 Jun 2012 14:20:31 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2FEACA18360 for ; Tue, 12 Jun 2012 14:20:31 +0000 (UTC) Received: by ggnf1 with SMTP id f1so3765006ggn.11 for ; Tue, 12 Jun 2012 07:20:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=feZB0XjQX2HAz10SMbifYSTgRZmZZHIGJOMevWRDM9Q=; b=ReS9jjpLZRHB68UlDURBZ7kekS6w+w4jceod0tPYg9pEaUyGzHBx3fsHDi0bWkS0gM +QqSOT/Vvjq37cbTWVpxS7F8kmnxEAIyOJnSMM7ityc1XFfWlVu0q0jRjx3Y7HmGjAm6 F8o1OEoSikSataSCpVbiAR99OxehZaR0/vHB0tnPWgx5on3o0zb7q6hJbd4yyZPMfkmR OiU6cJa+RGxI0I8uH1fDh1tJfF9zAti5AWkhKMm9vnCoAvw37Y1ei2zXCEcrJmmN8lQ/ SQyCumV13xUElhR10hBs6VOaOlOZ/kCrrjI4ZnoNW+JHKXaC4SF73huGHERrjXSSOIEr llOA== Received: by 10.50.193.196 with SMTP id hq4mr8295524igc.57.1339510830323; Tue, 12 Jun 2012 07:20:30 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp169385ibb; Tue, 12 Jun 2012 07:20:29 -0700 (PDT) Received: by 10.14.119.14 with SMTP id m14mr6660833eeh.97.1339510829182; Tue, 12 Jun 2012 07:20:29 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com. [207.126.144.129]) by mx.google.com with SMTP id w11si9254508eef.30.2012.06.12.07.20.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jun 2012 07:20:29 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKT9dQIXWaipZpckbjjk6KS34o6GMYT2f7@postini.com; Tue, 12 Jun 2012 14:20:28 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id B354D50; Tue, 12 Jun 2012 14:19:43 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id DA4704A; Tue, 12 Jun 2012 11:31:49 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 00AE524C306; Tue, 12 Jun 2012 16:19:57 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 12 Jun 2012 16:20:04 +0200 From: Linus Walleij To: Grant Likely , Cc: Viresh Kumar , Virupax Sadashivpetimath , , Vinit Shenoy , Linus Walleij Subject: [PATCH 1/3] spi/pl022: disable port when unused Date: Tue, 12 Jun 2012 16:19:56 +0200 Message-ID: <1339510796-13333-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlzoqb4a/4JUmF6EmT9rGvsewSDMbqssqflUhUplMlWzKxO1nW2q3fNBghcpRLr8JECmQXs From: Virupax Sadashivpetimath Commit ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0 "spi: create a message queueing infrastructure" Accidentally deleted the logic to disable the port when unused leading to higher power consumption. Fix this up. Cc: stable@kernel.org Cc: Vinit Shenoy Signed-off-by: Virupax Sadashivpetimath Signed-off-by: Linus Walleij --- drivers/spi/spi-pl022.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 400ae21..469eb28 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -489,6 +489,11 @@ static void giveback(struct pl022 *pl022) pl022->cur_transfer = NULL; pl022->cur_chip = NULL; spi_finalize_current_message(pl022->master); + + /* disable the SPI/SSP operation */ + writew((readw(SSP_CR1(pl022->virtbase)) & + (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); + } /**