mirror of https://github.com/torvalds/linux.git
Merge existing fixes from spi/for-6.18 into new branch
This commit is contained in:
commit
3d66d3dbd5
|
|
@ -14,9 +14,14 @@ allOf:
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- cdns,spi-r1p6
|
||||
- xlnx,zynq-spi-r1p6
|
||||
oneOf:
|
||||
- enum:
|
||||
- xlnx,zynq-spi-r1p6
|
||||
- items:
|
||||
- enum:
|
||||
- xlnx,zynqmp-spi-r1p6
|
||||
- xlnx,versal-net-spi-r1p6
|
||||
- const: cdns,spi-r1p6
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
|
|
|||
|
|
@ -358,7 +358,9 @@ static int dw_spi_mmio_probe(struct platform_device *pdev)
|
|||
if (IS_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;
|
||||
|
||||
|
|
|
|||
|
|
@ -704,7 +704,12 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
|||
ret = -ENOMEM;
|
||||
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);
|
||||
|
|
@ -715,6 +720,9 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
|||
|
||||
return 0;
|
||||
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));
|
||||
err_dma:
|
||||
pm_runtime_get_sync(dev);
|
||||
|
|
@ -736,6 +744,8 @@ static void rockchip_sfc_remove(struct platform_device *pdev)
|
|||
struct spi_controller *host = sfc->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));
|
||||
|
||||
clk_disable_unprepare(sfc->clk);
|
||||
|
|
|
|||
Loading…
Reference in New Issue