summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* spi: falcon: switch to use modern nameYang Yingliang2023-08-141-17/+17
| | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807124105.3429709-5-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: ep93xx: switch to use modern nameYang Yingliang2023-08-141-87/+87
| | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807124105.3429709-4-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: au1550: switch to use modern nameYang Yingliang2023-08-141-37/+37
| | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807124105.3429709-3-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: amlogic-spifc-a1: switch to use devm_spi_alloc_host()Yang Yingliang2023-08-141-1/+1
| | | | | | | | | | Switch to use modern name function devm_spi_alloc_host(). No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807124105.3429709-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl-cpm: Properly define and use IO pointersChristophe Leroy2023-08-091-37/+37
| | | | | | | | | | | | | Sparse reports several issues with IO pointers. Fix it by adding missing __iomem flags and using iowriteXXbe() generic helpers instead of the powerpc specific out_beXX() ones. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202307252052.7RqHxFZj-lkp@intel.com/ Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://lore.kernel.org/r/18a65dca9134f6fc35932408066d4a8284cbfa65.1691571190.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: dw: Set default value if reg-io-width isn't specifiedKunihiko Hayashi2023-08-081-1/+3
| | | | | | | | | | | | According to the dt-bindings, the default value of reg-io-width is 4. However, the value becomes zero when reg-io-width isn't specified. Should set the actual value to dws->reg_io_width, considering it referenced. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Link: https://lore.kernel.org/r/20230807001621.196776-1-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: switch to use modern nameMark Brown2023-08-0723-624/+624
|\ | | | | | | | | | | | | | | | | Merge series from Yang Yingliang <yangyingliang@huawei.com>: After introducing devm_spi_alloc_host/spi_alloc_host(), the legacy named function devm_spi_alloc_master/spi_alloc_master() can be replaced. And also change other legacy name master/slave to modern name host/target or controller.
| * spi: npcm-fiu: switch to use modern nameYang Yingliang2023-08-071-10/+10
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-22-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: hisi-kunpeng: switch to use modern nameYang Yingliang2023-08-071-42/+42
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-21-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dw: switch to use modern nameYang Yingliang2023-08-074-74/+74
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-20-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dln2: switch to use modern nameYang Yingliang2023-08-071-47/+47
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-19-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: davinci: switch to use modern nameYang Yingliang2023-08-071-38/+38
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-18-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: coldfire-qspi: switch to use modern nameYang Yingliang2023-08-071-33/+33
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-17-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: spi-cavium-thunderx: switch to use modern nameYang Yingliang2023-08-071-16/+16
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-16-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: octeon: switch to use modern nameYang Yingliang2023-08-071-16/+16
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-15-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: clps711x: switch to use modern nameYang Yingliang2023-08-071-21/+21
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-14-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: cadence: switch to use modern nameYang Yingliang2023-08-071-35/+35
| | | | | | | | | | | | | | | | | | | | Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-13-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: cadence-xspi: switch to use modern nameYang Yingliang2023-08-071-15/+15
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-12-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: butterfly: switch to use modern nameYang Yingliang2023-08-071-9/+9
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-10-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: bcm63xx: switch to use modern nameYang Yingliang2023-08-071-34/+34
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-9-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: bcm63xx-hsspi: switch to use modern nameYang Yingliang2023-08-071-43/+43
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-8-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: bcm2835aux: switch to use modern nameYang Yingliang2023-08-071-42/+42
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-7-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: bcm2835: switch to use modern nameYang Yingliang2023-08-071-56/+56
| | | | | | | | | | | | | | | | | | | | Change legacy name master/slave to modern name host/target. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-6-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: bcm-qspi: switch to use modern nameYang Yingliang2023-08-071-32/+32
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-5-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: spi-axi-spi-engine: switch to use modern nameYang Yingliang2023-08-071-29/+29
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-4-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: aspeed: switch to use modern nameYang Yingliang2023-08-071-7/+7
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-3-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: amd: switch to use modern nameYang Yingliang2023-08-071-25/+25
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230728093221.3312026-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | dt-bindings: spi: convert spi-brcm63xx.txt to YAMLJonas Gorski2023-08-073-34/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes done during conversion: * added a description, lifting and adapting the limitation sentence from brcm,bcm63xx-hsspi.yml * added appropriate compatibles for all SoCs that are supported by bcm63xx/bmips Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Link: https://lore.kernel.org/r/20230727070806.12205-1-jonas.gorski@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: omap2-mcspi: remove redundant dev_err_probe()Zhu Wang2023-08-071-3/+1
| | | | | | | | | | | | | | | | | | | | When platform_get_irq() is called, the error message has been printed, so it need not to call dev_err_probe() to print error, we remove the redundant platform_get_irq(). Signed-off-by: Zhu Wang <wangzhu9@huawei.com> Link: https://lore.kernel.org/r/20230801135442.255604-1-wangzhu9@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: spi-mpc52xx-psc: Fix an unsigned comparison that can never be negativeRajeshwar R Shinde2023-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In struct mpc52xx_psc_spi, the variable 'irq' is declared as an unsigned int. The comparison of variable 'irq' with signed int operand is incorrect. Also, the return value from the call to platform_get_irq(pdev,0) is int and it is assigned to an unsigned int variable 'irq', thus redeclaring the type of variable 'irq' to signed int. This fixes warning such as: drivers/spi/spi-mpc52xx-psc.c:332:5-13: WARNING: Unsigned expression compared with zero: mps -> irq < 0 Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com> Link: https://lore.kernel.org/r/20230807144942.30317-2-coolrrsh@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: cadence-quadspi: switch to use modern nameYang Yingliang2023-08-071-22/+22
| | | | | | | | | | | | | | | | | | | | Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230807140717.3484180-11-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: Do not check for 0 return after calling platform_get_irq()Ruan Jinjie2023-08-074-8/+8
| | | | | | | | | | | | | | | | | | | | It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> # Link: https://lore.kernel.org/r/20230802093238.975906-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: spi-zynq: Do not check for 0 return after calling platform_get_irq()Ruan Jinjie2023-08-072-4/+4
|/ | | | | | | | | It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230802094357.981100-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPIWilliam Qiu2023-08-041-0/+67
| | | | | | | | | Add JH7110's clock initialization code to the driver. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Link: https://lore.kernel.org/r/20230804020254.291239-3-william.qiu@starfivetech.com Signed-off-by: Mark Brown <broonie@kernel.org>
* dt-bindings: qspi: cdns,qspi-nor: Add clocks for StarFive JH7110 SoCWilliam Qiu2023-08-041-1/+11
| | | | | | | | | | | The QSPI controller needs three clock items to work properly on StarFive JH7110 SoC, so there is need to change the maxItems's value to 3. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230804020254.291239-2-william.qiu@starfivetech.com Signed-off-by: Mark Brown <broonie@kernel.org>
* dt-bindings: spi: spi-cadence: Add label propertyMichal Simek2023-08-031-0/+3
| | | | | | | | | | | Add a label property to allow a custom name to be used for identifying the controller on a board. This is useful when there is more than one controller present. Similar change was done by commit 412b7a521c30 ("dt-bindings: eeprom: at24: Add label property for AT24"). Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/82cd1a57397867b5a1039cd15244344c02a3ece1.1691047461.git.michal.simek@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* dt-bindings: spi: spi-cadence: Describe power-domains propertyMichal Simek2023-08-031-0/+3
| | | | | | | | | | ZynqMP Cadence SPI IP core has own power domain that's why describe it as optional property. Signed-off-by: Michal Simek <michal.simek@amd.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/987430ee905fd299fe962663d94f848b341c87df.1691047461.git.michal.simek@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: mpc5xxx-psc: Fix unsigned expression compared with zeroLi Zetao2023-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | There is two warnings reported by coccinelle: ./drivers/spi/spi-mpc512x-psc.c:493:5-13: WARNING: Unsigned expression compared with zero: mps -> irq < 0 ./drivers/spi/spi-mpc52xx-psc.c:332:5-13: WARNING: Unsigned expression compared with zero: mps -> irq < 0 The commit "208ee586f862" ("spi: mpc5xxx-psc: Return immediately if IRQ resource is unavailable") was to check whether the IRQ resource is unavailable. When the IRQ resource is unavailable, an error code is returned, however, the type of "mps->irq" is "unsigned int", causing the error code to flip. Modify the type of "mps->irq" to solve this problem. Fixes: 208ee586f862 ("spi: mpc5xxx-psc: Return immediately if IRQ resource is unavailable") Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230803134805.1037251-1-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: fsl-spi: Do not check 0 for platform_get_irq()Zhu Wang2023-08-031-2/+2
| | | | | | | | | | | Since platform_get_irq() never returned zero, so it need not to check whether it returned zero, and we use the return error code of platform_get_irq() to replace the current return error code, for that platform_get_irq() may return -EINVAL or -ENXIO. Signed-off-by: Zhu Wang <wangzhu9@huawei.com> Link: https://lore.kernel.org/r/20230803083944.21501-1-wangzhu9@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi-geni-qcom: Add SPI device mode support for GENIMark Brown2023-07-312-6/+56
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Praveen Talari <quic_ptalari@quicinc.com>: This series adds spi device mode functionality to geni based Qupv3. The common header file contains spi slave related registers and masks. Praveen Talari (2): soc: qcom: geni-se: Add SPI Device mode support for GENI based QuPv3 spi: spi-geni-qcom: Add SPI Device mode support for GENI based QuPv3 --- v6 -> v7: - Corrected author mail v5 -> v6: - Added code comments - Dropped get_spi_master api v4 -> v5: - Addressed review comments in driver v3 -> v4: - Used existing property spi-slave - Hence dropped dt-binding changes v2 -> v3: - Modified commit message - Addressed comment on dt-binding v1 -> v2: - Added dt-binding change for spi slave - Modified commit message - Addressed review comments in driver drivers/spi/spi-geni-qcom.c | 53 ++++++++++++++++++++++++++++---- include/linux/soc/qcom/geni-se.h | 9 ++++++ 2 files changed, 56 insertions(+), 6 deletions(-) -- 2.17.1
| * spi: spi-geni-qcom: Add SPI Device mode support for GENI based QuPv3Praveen Talari2023-07-311-6/+47
| | | | | | | | | | | | | | | | | | | | | | Currently spi geni driver supports only master mode operation. Add spi device mode support to GENI based QuPv3. Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com> Reviewed-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Link: https://lore.kernel.org/r/20230714042203.14251-3-quic_ptalari@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * soc: qcom: geni-se: Add SPI Device mode support for GENI based QuPv3Praveen Talari2023-07-311-0/+9
| | | | | | | | | | | | | | | | | | Add device mode supported registers and masks. Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com> Reviewed-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Link: https://lore.kernel.org/r/20230714042203.14251-2-quic_ptalari@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: loongson: add bus driver for the loongson spi controllerYinbo Zhu2023-07-317-0/+463
| | | | | | | | | | | | | | | | | | | | | | | | | | This bus driver supports the Loongson SPI hardware controller in the Loongson platforms and supports the use DTS and PCI framework to register SPI device resources. Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Mark Brown <broonie@kernel.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230613075834.5219-3-zhuyinbo@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: dt-bindings: add loongson spiYinbo Zhu2023-07-312-0/+52
|/ | | | | | | | | | Add the Loongson platform spi binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230613075834.5219-2-zhuyinbo@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: Use dev_err_probe instead of dev_errWang Ming2023-07-311-4/+4
| | | | | | | | | | It is possible that dma_request_chan will return EPROBE_DEFER, which means that dev is not ready yet. In this case, dev_err(dev), there will be no output. This patch fixes the bug. Signed-off-by: Wang Ming <machel@vivo.com> Link: https://lore.kernel.org/r/20230726105457.3743-1-machel@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: Merge up fixes from Linus' treeMark Brown2023-07-31401-1854/+3253
|\ | | | | | | Gets us pine64plus back if nothing else.
| * Linux 6.5-rc4v6.5-rc4Linus Torvalds2023-07-301-1/+1
| |
| * Merge tag 'spi-fix-v6.5-rc3' of ↵Linus Torvalds2023-07-301-5/+49
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A bunch of fixes for the Qualcomm QSPI driver, fixing multiple issues with the newly added DMA mode - it had a number of issues exposed when tested in a wider range of use cases, both race condition style issues and issues with different inputs to those that had been used in test" * tag 'spi-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-qcom-qspi: Add mem_ops to avoid PIO for badly sized reads spi: spi-qcom-qspi: Fallback to PIO for xfers that aren't multiples of 4 bytes spi: spi-qcom-qspi: Add DMA_CHAIN_DONE to ALL_IRQS spi: spi-qcom-qspi: Call dma_wmb() after setting up descriptors spi: spi-qcom-qspi: Use GFP_ATOMIC flag while allocating for descriptor spi: spi-qcom-qspi: Ignore disabled interrupts' status in isr
| | * spi: spi-qcom-qspi: Add mem_ops to avoid PIO for badly sized readsDouglas Anderson2023-07-261-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the patch ("spi: spi-qcom-qspi: Fallback to PIO for xfers that aren't multiples of 4 bytes") we detect reads that we can't handle properly and fallback to PIO mode. While that's correct behavior, we can do better by adding "spi_controller_mem_ops" for our controller. Once we do this then the caller will give us a transfer that's a multiple of 4-bytes so we can DMA. Fixes: b5762d95607e ("spi: spi-qcom-qspi: Add DMA mode support") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Link: https://lore.kernel.org/r/20230725110226.2.Id4a39804e01e4a06dae9b73fd2a5194c4c7ea453@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: spi-qcom-qspi: Fallback to PIO for xfers that aren't multiples of 4 bytesDouglas Anderson2023-07-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qualcomm QSPI driver appears to require that any reads using DMA are a mutliple of 4 bytes. If this isn't true then the controller will clobber any extra bytes in memory following the last word. Let's detect this and falback to PIO. This fixes problems reported by slub_debug=FZPUA, which would complain about "kmalloc Redzone overwritten". One such instance said: 0xffffff80c29d541a-0xffffff80c29d541b @offset=21530. First byte 0x0 instead of 0xcc Allocated in mtd_kmalloc_up_to+0x98/0xac age=36 cpu=3 pid=6658 Tracing through what was happening I saw that, while we often did DMA tranfers of 0x1000 bytes, sometimes we'd end up doing ones of 0x41a bytes. Those 0x41a byte transfers were the problem. NOTE: a future change will enable the SPI "mem ops" to help avoid this case, but it still seems good to add the extra check in the transfer. Fixes: b5762d95607e ("spi: spi-qcom-qspi: Add DMA mode support") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230725110226.1.Ia2f980fc7cd0b831e633391f0bb1272914d8f381@changeid Signed-off-by: Mark Brown <broonie@kernel.org>