mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
spi: Fixes for v3.19
A few driver specific fixes here, some fixes for issues introduced and discovered during recent work on the DesignWare driver (which has been getting a lot of attention recently) and a couple of other drivers. All serious things for people who run into them. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUxiKGAAoJECTWi3JdVIfQ3gAH/jkNJzgNOw0yyVNM6darlVjF fpDLbXEloryR89lui0FV1KeqNbUmtR1pIQFQnqPOrauBD6ccGxn0fNdF4p84j7wt cOiWpLbPJ9bGuxgYX8OQMFlba9Xk6cJbTJdr3j6Ep/CJuHkTsZHD1AYeYtsr/zG9 bVLrqR/JuIASxkcv0fyZP3UFWJgu7Q5Ar8l4gPp8HwTqojDSs7OaTIPABjhG9INn l6AA/YXohTInjBXu7ALQjN0yFjtR2po41ewIo1DVkeOCQkarMSNtCejNEArTsOq2 +6PiSQp8hewtc/f8SCwg8eQcBDA49TCPrN/flFVe+X5ynQg95YuqnZMo6ocIAac= =BqdK -----END PGP SIGNATURE----- Merge tag 'spi-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few driver specific fixes here, some fixes for issues introduced and discovered during recent work on the DesignWare driver (which has been getting a lot of attention recently) and a couple of other drivers. All serious things for people who run into them" * tag 'spi-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: dw: amend warning message spi: sh-msiof: fix MDR1_FLD_MASK value spi: dw-mid: fix FIFO size spi: dw: Fix detecting FIFO depth spi/pxa2xx: Clear cur_chip pointer before starting next message
This commit is contained in:
commit
8d6b9327cb
@ -271,7 +271,6 @@ int dw_spi_mid_init(struct dw_spi *dws)
|
||||
iounmap(clk_reg);
|
||||
|
||||
dws->num_cs = 16;
|
||||
dws->fifo_len = 40; /* FIFO has 40 words buffer */
|
||||
|
||||
#ifdef CONFIG_SPI_DW_MID_DMA
|
||||
dws->dma_priv = kzalloc(sizeof(struct mid_dma), GFP_KERNEL);
|
||||
|
@ -621,13 +621,13 @@ static void spi_hw_init(struct dw_spi *dws)
|
||||
if (!dws->fifo_len) {
|
||||
u32 fifo;
|
||||
|
||||
for (fifo = 2; fifo <= 257; fifo++) {
|
||||
for (fifo = 2; fifo <= 256; fifo++) {
|
||||
dw_writew(dws, DW_SPI_TXFLTR, fifo);
|
||||
if (fifo != dw_readw(dws, DW_SPI_TXFLTR))
|
||||
break;
|
||||
}
|
||||
|
||||
dws->fifo_len = (fifo == 257) ? 0 : fifo;
|
||||
dws->fifo_len = (fifo == 2) ? 0 : fifo - 1;
|
||||
dw_writew(dws, DW_SPI_TXFLTR, 0);
|
||||
}
|
||||
}
|
||||
@ -673,7 +673,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
|
||||
if (dws->dma_ops && dws->dma_ops->dma_init) {
|
||||
ret = dws->dma_ops->dma_init(dws);
|
||||
if (ret) {
|
||||
dev_warn(&master->dev, "DMA init failed\n");
|
||||
dev_warn(dev, "DMA init failed\n");
|
||||
dws->dma_inited = 0;
|
||||
}
|
||||
}
|
||||
|
@ -546,8 +546,8 @@ static void giveback(struct driver_data *drv_data)
|
||||
cs_deassert(drv_data);
|
||||
}
|
||||
|
||||
spi_finalize_current_message(drv_data->master);
|
||||
drv_data->cur_chip = NULL;
|
||||
spi_finalize_current_message(drv_data->master);
|
||||
}
|
||||
|
||||
static void reset_sccr1(struct driver_data *drv_data)
|
||||
|
@ -82,7 +82,7 @@ struct sh_msiof_spi_priv {
|
||||
#define MDR1_SYNCMD_LR 0x30000000 /* L/R mode */
|
||||
#define MDR1_SYNCAC_SHIFT 25 /* Sync Polarity (1 = Active-low) */
|
||||
#define MDR1_BITLSB_SHIFT 24 /* MSB/LSB First (1 = LSB first) */
|
||||
#define MDR1_FLD_MASK 0x000000c0 /* Frame Sync Signal Interval (0-3) */
|
||||
#define MDR1_FLD_MASK 0x0000000c /* Frame Sync Signal Interval (0-3) */
|
||||
#define MDR1_FLD_SHIFT 2
|
||||
#define MDR1_XXSTP 0x00000001 /* Transmission/Reception Stop on FIFO */
|
||||
/* TMDR1 */
|
||||
|
Loading…
Reference in New Issue
Block a user