Commit 1395b9cfd5b9b979a3b937df963158e62940016b
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi bugfixes from Mark Brown: "A couple of small driver fixes for v3.18, both quite problematic if you hit a use case that's affected" * tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM spi: fsl-dspi: Fix CTAR selection
Showing 2 changed files Side-by-side Diff
drivers/spi/spi-fsl-dspi.c
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | |
47 | 47 | #define SPI_TCR 0x08 |
48 | 48 | |
49 | -#define SPI_CTAR(x) (0x0c + (x * 4)) | |
49 | +#define SPI_CTAR(x) (0x0c + (((x) & 0x3) * 4)) | |
50 | 50 | #define SPI_CTAR_FMSZ(x) (((x) & 0x0000000f) << 27) |
51 | 51 | #define SPI_CTAR_CPOL(x) ((x) << 26) |
52 | 52 | #define SPI_CTAR_CPHA(x) ((x) << 25) |
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | |
71 | 71 | #define SPI_PUSHR 0x34 |
72 | 72 | #define SPI_PUSHR_CONT (1 << 31) |
73 | -#define SPI_PUSHR_CTAS(x) (((x) & 0x00000007) << 28) | |
73 | +#define SPI_PUSHR_CTAS(x) (((x) & 0x00000003) << 28) | |
74 | 74 | #define SPI_PUSHR_EOQ (1 << 27) |
75 | 75 | #define SPI_PUSHR_CTCNT (1 << 26) |
76 | 76 | #define SPI_PUSHR_PCS(x) (((1 << x) & 0x0000003f) << 16) |
drivers/spi/spi-pxa2xx.c
... | ... | @@ -1274,8 +1274,10 @@ |
1274 | 1274 | if (status != 0) |
1275 | 1275 | return status; |
1276 | 1276 | write_SSCR0(0, drv_data->ioaddr); |
1277 | - clk_disable_unprepare(ssp->clk); | |
1278 | 1277 | |
1278 | + if (!pm_runtime_suspended(dev)) | |
1279 | + clk_disable_unprepare(ssp->clk); | |
1280 | + | |
1279 | 1281 | return 0; |
1280 | 1282 | } |
1281 | 1283 | |
... | ... | @@ -1288,7 +1290,8 @@ |
1288 | 1290 | pxa2xx_spi_dma_resume(drv_data); |
1289 | 1291 | |
1290 | 1292 | /* Enable the SSP clock */ |
1291 | - clk_prepare_enable(ssp->clk); | |
1293 | + if (!pm_runtime_suspended(dev)) | |
1294 | + clk_prepare_enable(ssp->clk); | |
1292 | 1295 | |
1293 | 1296 | /* Restore LPSS private register bits */ |
1294 | 1297 | lpss_ssp_setup(drv_data); |