Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'spi-v3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
"There's a couple of driver fixes here, plus one core fix for the DMA
mapping which wasn't doing the right thing for vmalloc()ed addresses
that hadn't been through kmap(). It's fairly rare to use vmalloc()
with SPI and it's a subset of those users who might fail so it's
unsurprising that this wasn't noticed sooner"

* tag 'spi-v3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: sirf: fix word width configuration
spi: Fix mapping from vmalloc-ed buffer to scatter list
spi: dw: Fix dynamic speed change.

+6 -10
+1 -5
drivers/spi/spi-dw.c
··· 376 376 chip = dws->cur_chip; 377 377 spi = message->spi; 378 378 379 - if (unlikely(!chip->clk_div)) 380 - chip->clk_div = dws->max_freq / chip->speed_hz; 381 - 382 379 if (message->state == ERROR_STATE) { 383 380 message->status = -EIO; 384 381 goto early_exit; ··· 416 419 if (transfer->speed_hz) { 417 420 speed = chip->speed_hz; 418 421 419 - if (transfer->speed_hz != speed) { 422 + if ((transfer->speed_hz != speed) || (!chip->clk_div)) { 420 423 speed = transfer->speed_hz; 421 424 422 425 /* clk_div doesn't support odd number */ ··· 578 581 dev_err(&spi->dev, "No max speed HZ parameter\n"); 579 582 return -EINVAL; 580 583 } 581 - chip->speed_hz = spi->max_speed_hz; 582 584 583 585 chip->tmode = 0; /* Tx & Rx */ 584 586 /* Default SPI mode is SCPOL = 0, SCPH = 0 */
+2 -2
drivers/spi/spi-sirf.c
··· 562 562 563 563 sspi->word_width = DIV_ROUND_UP(bits_per_word, 8); 564 564 txfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) | 565 - sspi->word_width; 565 + (sspi->word_width >> 1); 566 566 rxfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) | 567 - sspi->word_width; 567 + (sspi->word_width >> 1); 568 568 569 569 if (!(spi->mode & SPI_CS_HIGH)) 570 570 regval |= SIRFSOC_SPI_CS_IDLE_STAT;
+3 -3
drivers/spi/spi.c
··· 615 615 sg_free_table(sgt); 616 616 return -ENOMEM; 617 617 } 618 - sg_buf = page_address(vm_page) + 619 - ((size_t)buf & ~PAGE_MASK); 618 + sg_set_page(&sgt->sgl[i], vm_page, 619 + min, offset_in_page(buf)); 620 620 } else { 621 621 sg_buf = buf; 622 + sg_set_buf(&sgt->sgl[i], sg_buf, min); 622 623 } 623 624 624 - sg_set_buf(&sgt->sgl[i], sg_buf, min); 625 625 626 626 buf += min; 627 627 len -= min;