Merge existing fixes from spi/for-6.18 into new branch

This commit is contained in:
Mark Brown 2025-10-13 11:07:53 +01:00
commit 3d66d3dbd5
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 22 additions and 5 deletions

View File

@ -14,9 +14,14 @@ allOf:
properties: properties:
compatible: compatible:
enum: oneOf:
- cdns,spi-r1p6 - enum:
- xlnx,zynq-spi-r1p6 - xlnx,zynq-spi-r1p6
- items:
- enum:
- xlnx,zynqmp-spi-r1p6
- xlnx,versal-net-spi-r1p6
- const: cdns,spi-r1p6
reg: reg:
maxItems: 1 maxItems: 1

View File

@ -358,7 +358,9 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
if (IS_ERR(dwsmmio->rstc)) if (IS_ERR(dwsmmio->rstc))
return PTR_ERR(dwsmmio->rstc); return PTR_ERR(dwsmmio->rstc);
reset_control_deassert(dwsmmio->rstc); ret = reset_control_deassert(dwsmmio->rstc);
if (ret)
return dev_err_probe(&pdev->dev, ret, "Failed to deassert resets\n");
dws->bus_num = pdev->id; dws->bus_num = pdev->id;

View File

@ -704,7 +704,12 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
ret = -ENOMEM; ret = -ENOMEM;
goto err_dma; goto err_dma;
} }
sfc->dma_buffer = virt_to_phys(sfc->buffer); sfc->dma_buffer = dma_map_single(dev, sfc->buffer,
sfc->max_iosize, DMA_BIDIRECTIONAL);
if (dma_mapping_error(dev, sfc->dma_buffer)) {
ret = -ENOMEM;
goto err_dma_map;
}
} }
ret = devm_spi_register_controller(dev, host); ret = devm_spi_register_controller(dev, host);
@ -715,6 +720,9 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
return 0; return 0;
err_register: err_register:
dma_unmap_single(dev, sfc->dma_buffer, sfc->max_iosize,
DMA_BIDIRECTIONAL);
err_dma_map:
free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize)); free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
err_dma: err_dma:
pm_runtime_get_sync(dev); pm_runtime_get_sync(dev);
@ -736,6 +744,8 @@ static void rockchip_sfc_remove(struct platform_device *pdev)
struct spi_controller *host = sfc->host; struct spi_controller *host = sfc->host;
spi_unregister_controller(host); spi_unregister_controller(host);
dma_unmap_single(&pdev->dev, sfc->dma_buffer, sfc->max_iosize,
DMA_BIDIRECTIONAL);
free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize)); free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
clk_disable_unprepare(sfc->clk); clk_disable_unprepare(sfc->clk);