]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.5.1/spi-pl022-disable-port-when-unused.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.5.1 / spi-pl022-disable-port-when-unused.patch
CommitLineData
9ccbece7
GKH
1From fd316941cfee1fbd12746afea83720fb7823888a Mon Sep 17 00:00:00 2001
2From: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
3Date: Tue, 12 Jun 2012 15:10:58 +0200
4Subject: spi/pl022: disable port when unused
5
6From: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
7
8commit fd316941cfee1fbd12746afea83720fb7823888a upstream.
9
10Commit ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0
11"spi: create a message queueing infrastructure"
12Accidentally deleted the logic to disable the port
13when unused leading to higher power consumption.
14Fix this up.
15
16Cc: Vinit Shenoy <vinit.shenoy@st.com>
17Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
18Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/spi/spi-pl022.c | 5 +++++
23 1 file changed, 5 insertions(+)
24
25--- a/drivers/spi/spi-pl022.c
26+++ b/drivers/spi/spi-pl022.c
27@@ -489,6 +489,11 @@ static void giveback(struct pl022 *pl022
28 pl022->cur_transfer = NULL;
29 pl022->cur_chip = NULL;
30 spi_finalize_current_message(pl022->master);
31+
32+ /* disable the SPI/SSP operation */
33+ writew((readw(SSP_CR1(pl022->virtbase)) &
34+ (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
35+
36 }
37
38 /**