]>
Commit | Line | Data |
---|---|---|
9ccbece7 GKH |
1 | From fd316941cfee1fbd12746afea83720fb7823888a Mon Sep 17 00:00:00 2001 |
2 | From: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | |
3 | Date: Tue, 12 Jun 2012 15:10:58 +0200 | |
4 | Subject: spi/pl022: disable port when unused | |
5 | ||
6 | From: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | |
7 | ||
8 | commit fd316941cfee1fbd12746afea83720fb7823888a upstream. | |
9 | ||
10 | Commit ffbbdd21329f3e15eeca6df2d4bc11c04d9d91c0 | |
11 | "spi: create a message queueing infrastructure" | |
12 | Accidentally deleted the logic to disable the port | |
13 | when unused leading to higher power consumption. | |
14 | Fix this up. | |
15 | ||
16 | Cc: Vinit Shenoy <vinit.shenoy@st.com> | |
17 | Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> | |
18 | Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | |
19 | Signed-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 | /** |