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-fix-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
"A couple of device ID and quirk updates, plus a bunch of small fixes
most of which (other than the Cadence one) are unremarkable error
handling fixes"

* tag 'spi-fix-v7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: atcspi200: Handle invalid buswidth and fix compiler warning
spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
spi: intel-pci: Add support for Nova Lake mobile SPI flash
spi: cadence-qspi: Fix requesting of APB and AHB clocks on JH7110
spi: rockchip-sfc: Fix double-free in remove() callback
spi: atcspi200: Fix double-free in atcspi_configure_dma()
spi: amlogic: spifc-a4: Fix DMA mapping error handling

+50 -31
+24 -5
Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
··· 6 6 7 7 title: Allwinner A31 SPI Controller 8 8 9 - allOf: 10 - - $ref: spi-controller.yaml 11 - 12 9 maintainers: 13 10 - Chen-Yu Tsai <wens@csie.org> 14 11 - Maxime Ripard <mripard@kernel.org> ··· 79 82 80 83 spi-rx-bus-width: 81 84 items: 82 - - const: 1 85 + enum: [0, 1, 2, 4] 83 86 84 87 spi-tx-bus-width: 85 88 items: 86 - - const: 1 89 + enum: [0, 1, 2, 4] 87 90 88 91 required: 89 92 - compatible ··· 91 94 - interrupts 92 95 - clocks 93 96 - clock-names 97 + 98 + allOf: 99 + - $ref: spi-controller.yaml 100 + - if: 101 + not: 102 + properties: 103 + compatible: 104 + contains: 105 + enum: 106 + - allwinner,sun50i-r329-spi 107 + - allwinner,sun55i-a523-spi 108 + then: 109 + patternProperties: 110 + "^.*@[0-9a-f]+": 111 + properties: 112 + spi-rx-bus-width: 113 + items: 114 + enum: [0, 1] 115 + 116 + spi-tx-bus-width: 117 + items: 118 + enum: [0, 1] 94 119 95 120 unevaluatedProperties: false 96 121
+2 -3
drivers/spi/spi-amlogic-spifc-a4.c
··· 411 411 ret = dma_mapping_error(sfc->dev, sfc->daddr); 412 412 if (ret) { 413 413 dev_err(sfc->dev, "DMA mapping error\n"); 414 - goto out_map_data; 414 + return ret; 415 415 } 416 416 417 417 cmd = CMD_DATA_ADDRL(sfc->daddr); ··· 429 429 ret = dma_mapping_error(sfc->dev, sfc->iaddr); 430 430 if (ret) { 431 431 dev_err(sfc->dev, "DMA mapping error\n"); 432 - dma_unmap_single(sfc->dev, sfc->daddr, datalen, dir); 433 432 goto out_map_data; 434 433 } 435 434 ··· 447 448 return 0; 448 449 449 450 out_map_info: 450 - dma_unmap_single(sfc->dev, sfc->iaddr, datalen, dir); 451 + dma_unmap_single(sfc->dev, sfc->iaddr, infolen, dir); 451 452 out_map_data: 452 453 dma_unmap_single(sfc->dev, sfc->daddr, datalen, dir); 453 454
+16 -22
drivers/spi/spi-atcspi200.c
··· 195 195 if (op->addr.buswidth > 1) 196 196 tc |= TRANS_ADDR_FMT; 197 197 if (op->data.nbytes) { 198 - tc |= TRANS_DUAL_QUAD(ffs(op->data.buswidth) - 1); 198 + unsigned int width_code; 199 + 200 + width_code = ffs(op->data.buswidth) - 1; 201 + if (unlikely(width_code > 3)) { 202 + WARN_ON_ONCE(1); 203 + width_code = 0; 204 + } 205 + tc |= TRANS_DUAL_QUAD(width_code); 206 + 199 207 if (op->data.dir == SPI_MEM_DATA_IN) { 200 208 if (op->dummy.nbytes) 201 209 tc |= TRANS_MODE_DMY_READ | ··· 505 497 506 498 static int atcspi_configure_dma(struct atcspi_dev *spi) 507 499 { 508 - struct dma_chan *dma_chan; 509 - int ret = 0; 500 + spi->host->dma_rx = devm_dma_request_chan(spi->dev, "rx"); 501 + if (IS_ERR(spi->host->dma_rx)) 502 + return PTR_ERR(spi->host->dma_rx); 510 503 511 - dma_chan = devm_dma_request_chan(spi->dev, "rx"); 512 - if (IS_ERR(dma_chan)) { 513 - ret = PTR_ERR(dma_chan); 514 - goto err_exit; 515 - } 516 - spi->host->dma_rx = dma_chan; 504 + spi->host->dma_tx = devm_dma_request_chan(spi->dev, "tx"); 505 + if (IS_ERR(spi->host->dma_tx)) 506 + return PTR_ERR(spi->host->dma_tx); 517 507 518 - dma_chan = devm_dma_request_chan(spi->dev, "tx"); 519 - if (IS_ERR(dma_chan)) { 520 - ret = PTR_ERR(dma_chan); 521 - goto free_rx; 522 - } 523 - spi->host->dma_tx = dma_chan; 524 508 init_completion(&spi->dma_completion); 525 509 526 - return ret; 527 - 528 - free_rx: 529 - dma_release_channel(spi->host->dma_rx); 530 - spi->host->dma_rx = NULL; 531 - err_exit: 532 - return ret; 510 + return 0; 533 511 } 534 512 535 513 static int atcspi_enable_clk(struct atcspi_dev *spi)
+6
drivers/spi/spi-cadence-quadspi.c
··· 76 76 u8 cs; 77 77 }; 78 78 79 + static const struct clk_bulk_data cqspi_clks[CLK_QSPI_NUM] = { 80 + [CLK_QSPI_APB] = { .id = "apb" }, 81 + [CLK_QSPI_AHB] = { .id = "ahb" }, 82 + }; 83 + 79 84 struct cqspi_st { 80 85 struct platform_device *pdev; 81 86 struct spi_controller *host; ··· 1828 1823 } 1829 1824 1830 1825 /* Obtain QSPI clocks. */ 1826 + memcpy(&cqspi->clks, &cqspi_clks, sizeof(cqspi->clks)); 1831 1827 ret = devm_clk_bulk_get_optional(dev, CLK_QSPI_NUM, cqspi->clks); 1832 1828 if (ret) 1833 1829 return dev_err_probe(dev, ret, "Failed to get clocks\n");
+1
drivers/spi/spi-intel-pci.c
··· 96 96 { PCI_VDEVICE(INTEL, 0xa324), (unsigned long)&cnl_info }, 97 97 { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&cnl_info }, 98 98 { PCI_VDEVICE(INTEL, 0xa823), (unsigned long)&cnl_info }, 99 + { PCI_VDEVICE(INTEL, 0xd323), (unsigned long)&cnl_info }, 99 100 { PCI_VDEVICE(INTEL, 0xe323), (unsigned long)&cnl_info }, 100 101 { PCI_VDEVICE(INTEL, 0xe423), (unsigned long)&cnl_info }, 101 102 { },
+1 -1
drivers/spi/spi-rockchip-sfc.c
··· 711 711 } 712 712 } 713 713 714 - ret = devm_spi_register_controller(dev, host); 714 + ret = spi_register_controller(host); 715 715 if (ret) 716 716 goto err_register; 717 717