]> Git Repo - J-linux.git/commitdiff
Merge series "spi: spi-sun6i: One fix and some improvements" from Marc Kleine-Budde...
authorMark Brown <[email protected]>
Tue, 7 Jul 2020 13:26:33 +0000 (14:26 +0100)
committerMark Brown <[email protected]>
Tue, 7 Jul 2020 13:26:33 +0000 (14:26 +0100)
Hello,

this series first fixes the calculation of the clock rate. The driver will
round up to the nearest clock rate instead of rounding down. Resulting in SPI
devices accessed with a too high SPI clock.

The remaining patches improve the performance of the driver. The changes range
from micro-optimizations like reducing MMIO writes to the controller to
reducing the number of needed interrupts in some use cases.

regards,
Marc

changes since v1:
- added Maxime Ripard's to the existing patches
- 06/10: (was 05/10 in v1)
  "spi: spi-sun6i: sun6i_spi_drain_fifo(): introduce sun6i_spi_get_rx_fifo_count() and make use of it"
  use FIELD_GET instead of open coding it
  (tnx: Maxime Ripard)
- 05/10: "spi: spi-sun6i: sun6i_spi_get_tx_fifo_count: Convert manual shift+mask to FIELD_GET()"
  new patch

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

1  2 
drivers/spi/spi-pxa2xx.c

diff --combined drivers/spi/spi-pxa2xx.c
index 6721910e5f2aaaf44682e9825f9ef3871eed6060,179416bb1b2526975e457019a78055ed42de3ab1..0040362b7162279f9ba66fae3a4acdc1db2f3eca
@@@ -1485,6 -1485,11 +1485,11 @@@ static const struct pci_device_id pxa2x
        { PCI_VDEVICE(INTEL, 0x4daa), LPSS_CNL_SSP },
        { PCI_VDEVICE(INTEL, 0x4dab), LPSS_CNL_SSP },
        { PCI_VDEVICE(INTEL, 0x4dfb), LPSS_CNL_SSP },
+       /* TGL-H */
+       { PCI_VDEVICE(INTEL, 0x43aa), LPSS_CNL_SSP },
+       { PCI_VDEVICE(INTEL, 0x43ab), LPSS_CNL_SSP },
+       { PCI_VDEVICE(INTEL, 0x43fb), LPSS_CNL_SSP },
+       { PCI_VDEVICE(INTEL, 0x43fd), LPSS_CNL_SSP },
        /* APL */
        { PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP },
        { PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP },
@@@ -1885,7 -1890,7 +1890,7 @@@ static int pxa2xx_spi_probe(struct plat
  
        /* Register with the SPI framework */
        platform_set_drvdata(pdev, drv_data);
 -      status = devm_spi_register_controller(&pdev->dev, controller);
 +      status = spi_register_controller(controller);
        if (status != 0) {
                dev_err(&pdev->dev, "problem registering spi controller\n");
                goto out_error_pm_runtime_enabled;
        return status;
  
  out_error_pm_runtime_enabled:
 -      pm_runtime_put_noidle(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
  
  out_error_clock_enabled:
@@@ -1916,8 -1922,6 +1921,8 @@@ static int pxa2xx_spi_remove(struct pla
  
        pm_runtime_get_sync(&pdev->dev);
  
 +      spi_unregister_controller(drv_data->controller);
 +
        /* Disable the SSP at the peripheral and SOC level */
        pxa2xx_spi_write(drv_data, SSCR0, 0);
        clk_disable_unprepare(ssp->clk);
This page took 0.068896 seconds and 4 git commands to generate.