Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-25Merge tag 'mtd/changes-for-5.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "There has been a lot of activity in the MTD subsystem recently, with a number of SPI-NOR cleanups as well as the introduction of ECC engines that can be used by SPI controllers (hence a few SPI patches in here). Core MTD changes: - Replace the expert mode symbols with a single helper - Fix misuses of of_match_ptr() - Remove partid and partname debugfs files - tests: Fix eraseblock read speed miscalculation for lower partition sizes - TRX parser: Allow to use on MediaTek MIPS SoCs MTD driver changes: - spear_smi: use GFP_KERNEL - mchp48l640: Add SPI ID table - mchp23k256: Add SPI ID table - blkdevs: Avoid soft lockups with some mtd/spi devices - aspeed-smc: Improve probe resilience Hyperbus changes: - HBMC_AM654 should depend on ARCH_K3 NAND core changes: - ECC: - Add infrastructure to support hardware engines - Add a new helper to retrieve the ECC context - Provide a helper to retrieve a pilelined engine device NAND-ECC changes: - Macronix ECC engine: - Add Macronix external ECC engine support - Support SPI pipelined mode - Make two read-only arrays static const - Fix compile test issue Raw NAND core changes: - Fix misuses of of_match_node() - Rework of_get_nand_bus_width() - Remove of_get_nand_on_flash_bbt() wrapper - Protect access to rawnand devices while in suspend - bindings: Document the wp-gpios property Rax NAND controller driver changes: - atmel: Fix refcount issue in atmel_nand_controller_init - nandsim: - Add NS_PAGE_BYTE_SHIFT macro to replace the repeat pattern - Merge repeat codes in ns_switch_state - Replace overflow check with kzalloc to single kcalloc - rockchip: Fix platform_get_irq.cocci warning - stm32_fmc2: Add NAND Write Protect support - pl353: Set the nand chip node as the flash node - brcmnand: Fix sparse warnings in bcma_nand - omap_elm: Remove redundant variable 'errors' - gpmi: - Support fast edo timings for mx28 - Validate controller clock rate - Fix controller timings setting - brcmnand: - Add BCMA shim - BCMA controller uses command shift of 0 - Allow platform data instantation - Add platform data structure for BCMA - Allow working without interrupts - Move OF operations out of brcmnand_init_cs() - Avoid pdev in brcmnand_init_cs() - Allow SoC to provide I/O operations - Assign soc as early as possible Onenand changes: - Check for error irq SPI-NAND core changes: - Delay a little bit the dirmap creation - Create direct mapping descriptors for ECC operations SPI-NAND driver changes: - macronix: Use random program load SPI NOR core changes: - Move vendor specific code out of the core into vendor drivers. - Unify all function and object names in the vendor modules. - Make setup() callback optional to improve readability. - Skip erase logic when the SPI_NOR_NO_ERASE flag is set at flash declaration. SPI changes: - Macronix SPI controller: - Fix the transmit path - Create a helper to configure the controller before an operation - Create a helper to ease the start of an operation - Add support for direct mapping - Add support for pipelined ECC operations - spi-mem: - Introduce a capability structure - Check the controller extra capabilities - cadence-quadspi/mxic: Provide capability structures - Kill the spi_mem_dtr_supports_op() helper - Add an ecc parameter to the spi_mem_op structure Binding changes: - Dropped mtd/cortina,gemini-flash.txt - Convert BCM47xx partitions to json-schema - Vendor prefixes: Clarify Macronix prefix - SPI NAND: Convert spi-nand description file to yaml - Raw NAND chip: Create a NAND chip description - Raw NAND controller: - Harmonize the property types - Fix a comment in the examples - Fix the reg property description - Describe Macronix NAND ECC engine - Macronix SPI controller: - Document the nand-ecc-engine property - Convert to yaml - The interrupt property is not mandatory" * tag 'mtd/changes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (104 commits) mtd: nand: ecc: mxic: Fix compile test issue mtd: nand: mxic-ecc: make two read-only arrays static const mtd: hyperbus: HBMC_AM654 should depend on ARCH_K3 mtd: core: Remove partid and partname debugfs files dt-bindings: mtd: partitions: convert BCM47xx to the json-schema mtd: tests: Fix eraseblock read speed miscalculation for lower partition sizes mtd: rawnand: atmel: fix refcount issue in atmel_nand_controller_init mtd: rawnand: rockchip: fix platform_get_irq.cocci warning mtd: spi-nor: Skip erase logic when SPI_NOR_NO_ERASE is set mtd: spi-nor: renumber flags mtd: spi-nor: slightly change code style in spi_nor_sr_ready() mtd: spi-nor: spansion: rename vendor specific functions and defines mtd: spi-nor: spansion: convert USE_CLSR to a manufacturer flag mtd: spi-nor: move all spansion specifics into spansion.c mtd: spi-nor: spansion: slightly rework control flow in late_init() mtd: spi-nor: micron-st: rename vendor specific functions and defines mtd: spi-nor: micron-st: convert USE_FSR to a manufacturer flag mtd: spi-nor: move all micron-st specifics into micron-st.c mtd: spi-nor: xilinx: correct the debug message mtd: spi-nor: xilinx: rename vendor specific functions and defines ...
2022-03-22Merge tag 'spi-v5.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The overwhelming bulk of this pull request is a change from Uwe Kleine-König which changes the return type of the remove() function to void as part of some wider work he's doing to do this for all bus types, causing updates to most SPI device drivers. The branch with that on has been cross merged with a couple of other trees which added new SPI drivers this cycle, I'm not expecting any build issues resulting from the change. Otherwise it's been a relatively quiet release with some new device support, a few minor features and the welcome completion of the conversion of the subsystem to use GPIO descriptors rather than numbers: - Change return type of remove() to void. - Completion of the conversion of SPI controller drivers to use GPIO descriptors rather than numbers. - Quite a few DT schema conversions. - Support for multiple SPI devices on a bus in ACPI systems. - Big overhaul of the PXA2xx SPI driver. - Support for AMD AMDI0062, Intel Raptor Lake, Mediatek MT7986 and MT8186, nVidia Tegra210 and Tegra234, Renesas RZ/V2L, Tesla FSD and Sunplus SP7021" [ And this is obviously where that spi change that snuck into the regulator tree _should_ have been :^] * tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (124 commits) spi: fsi: Implement a timeout for polling status spi: Fix erroneous sgs value with min_t() spi: tegra20: Use of_device_get_match_data() spi: mediatek: add ipm design support for MT7986 spi: Add compatible for MT7986 spi: sun4i: fix typos in comments spi: mediatek: support tick_delay without enhance_timing spi: Update clock-names property for arm pl022 spi: rockchip-sfc: fix platform_get_irq.cocci warning spi: s3c64xx: Add spi port configuration for Tesla FSD SoC spi: dt-bindings: samsung: Add fsd spi compatible spi: topcliff-pch: Prevent usage of potentially stale DMA device spi: tegra210-quad: combined sequence mode spi: tegra210-quad: add acpi support spi: npcm-fiu: Fix typo ("npxm") spi: Fix Tegra QSPI example spi: qup: replace spin_lock_irqsave by spin_lock in hard IRQ spi: cadence: fix platform_get_irq.cocci warning spi: Update NXP Flexspi maintainer details dt-bindings: mfd: maxim,max77802: Convert to dtschema ...
2022-03-22Merge tag 'regulator-v5.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Quite a quiet release for the regulator API, mainly a few new drivers plus a lot of fixes for the Raspberry Pi panel driver. There's also a SPI commit in here which I managed to apply to the wrong tree and then didn't notice until there were too many commits on top of it, sorry about that. - Make it easier to use the virtual consumer test driver with DT systems. - Substantial overhaul providing various fixes and robustness improvements for the Raspberry Pi panel driver. - Support for Qualcomm PMX65 and SDX65, Richtek RT5190A, and Texas Instruments TPS62864x" * tag 'regulator-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits) regulator: qcom-rpmh: Add support for SDX65 regulator: dt-bindings: Add PMX65 compatibles regulator: vctrl: Use min() instead of doing it manually regulator: rt5190a: Add support for Richtek RT5190A PMIC regulator: Add bindings for Richtek RT5190A PMIC regulator: Convert TPS62360 binding to json-schema regulator: cleanup comments regulator: virtual: add devicetree support regulator: virtual: warn against production use regulator: virtual: use dev_err_probe() regulator: tps62864: Fix bindings for SW property regulator: Add support for TPS6286x regulator: Add bindings for TPS62864x regulator/rpi-panel-attiny: Use two transactions for I2C read regulator/rpi-panel-attiny: Use the regmap cache regulator: rpi-panel: Remove get_brightness hook regulator: rpi-panel: Add GPIO control for panel and touch resets regulator: rpi-panel: Convert to drive lines directly regulator: rpi-panel: Ensure the backlight is off during probe. regulator: rpi-panel: Serialise operations. ...
2022-03-18Merge tag 'spi-nor/for-5.18' into mtd/nextMiquel Raynal
SPI NOR core changes: - move vendor specific code out of the core into vendor drivers. - unify all function and object names in the vendor modules. - make setup() callback optional to improve readability. - skip erase logic when the SPI_NOR_NO_ERASE flag is set at flash declaration. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2022-03-18spi: fsi: Implement a timeout for polling statusEddie James
The data transfer routines must poll the status register to determine when more data can be shifted in or out. If the hardware gets into a bad state, these polling loops may never exit. Prevent this by returning an error if a timeout is exceeded. Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220317211426.38940-1-eajames@linux.ibm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-17spi: Fix erroneous sgs value with min_t()Biju Das
While computing sgs in spi_map_buf(), the data type used in min_t() for max_seg_size is 'unsigned int' where as that of ctlr->max_dma_len is 'size_t'. min_t(unsigned int,x,y) gives wrong results if one of x/y is 'size_t' Consider the below examples on a 64-bit machine (ie size_t is 64-bits, and unsigned int is 32-bit). case 1) min_t(unsigned int, 5, 0x100000001); case 2) min_t(size_t, 5, 0x100000001); Case 1 returns '1', where as case 2 returns '5'. As you can see the result from case 1 is wrong. This patch fixes the above issue by using the data type of the parameters that are used in min_t with maximum data length. Fixes: commit 1a4e53d2fc4f68aa ("spi: Fix invalid sgs value") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20220316175317.465-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-17spi: Get sgs size fix into branchMark Brown
Dependency for patch to be applied.
2022-03-16spi: tegra20: Use of_device_get_match_data()Minghao Chi
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220315023138.2118293-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-15fix typos in commentsMark Brown
Merge series from Julia Lawall <Julia.Lawall@inria.fr>: Various spelling mistakes in comments. Detected with the help of Coccinelle. --- drivers/base/devres.c | 4 ++-- drivers/clk/qcom/gcc-sm6125.c | 2 +- drivers/clk/ti/clkctrl.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/display/dc/bios/command_table.c | 6 +++--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++-- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/infiniband/hw/qib/qib_iba7220.c | 4 ++-- drivers/leds/leds-pca963x.c | 2 +- drivers/media/i2c/ov5695.c | 2 +- drivers/mfd/rohm-bd9576.c | 2 +- drivers/mtd/ubi/block.c | 2 +- drivers/net/can/usb/ucan.c | 4 ++-- drivers/net/ethernet/packetengines/yellowfin.c | 2 +- drivers/net/wireless/ath/ath6kl/htc_mbox.c | 2 +- drivers/net/wireless/cisco/airo.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 6 +++--- drivers/platform/x86/uv_sysfs.c | 2 +- drivers/s390/crypto/pkey_api.c | 2 +- drivers/scsi/aic7xxx/aicasm/aicasm.c | 2 +- drivers/scsi/elx/libefc_sli/sli4.c | 2 +- drivers/scsi/lpfc/lpfc_mbox.c | 2 +- drivers/scsi/qla2xxx/qla_gs.c | 2 +- drivers/spi/spi-sun4i.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- drivers/usb/gadget/udc/snps_udc_core.c | 2 +- fs/kernfs/file.c | 2 +- kernel/events/core.c | 2 +- 30 files changed, 39 insertions(+), 39 deletions(-)
2022-03-15spi: mediatek: add ipm design support for MT7986Leilk Liu
this patch add the support of ipm design. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220315032411.2826-4-leilk.liu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-15spi: sun4i: fix typos in commentsJulia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20220314115354.144023-22-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-15spi: mediatek: support tick_delay without enhance_timingLeilk Liu
this patch support tick_delay bit[31:30] without enhance_timing feature. Fixes: f84d866ab43f("spi: mediatek: add tick_delay support") Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220315032411.2826-2-leilk.liu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-10spi: rockchip-sfc: fix platform_get_irq.cocci warningYihao Han
Remove dev_err() messages after platform_get_irq*() failures. platform_get_irq() already prints an error. Generated by: scripts/coccinelle/api/platform_get_irq.cocci Signed-off-by: Yihao Han <hanyihao@vivo.com> Link: https://lore.kernel.org/r/20220310094806.13734-1-hanyihao@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-10Merge tag 'spi-fix-v5.17-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One fix for type conversion issues when working out maximum scatter/gather segment sizes. It caused problems for some systems where the limits overflow due to the type conversion" * tag 'spi-fix-v5.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Fix invalid sgs value
2022-03-08spi: Tesla FSD supportMark Brown
Merge series from Alim Akhtar: This series adds support for the SPI controller in the Tesla FSD SoC, also pulling in: git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-spi-dt-v5.18 from the MFD tree which has dependencies for the DT bindings.
2022-03-08spi: s3c64xx: Add spi port configuration for Tesla FSD SoCAlim Akhtar
Add compatible and port configuration for spi controller for Tesla Full Self-Driving SoC. Cc: linux-fsd@tesla.com Signed-off-by: Aswani Reddy <aswani.reddy@samsung.com> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Andi Shyti <andi@etezian.org> Link: https://lore.kernel.org/r/20220308121640.27344-2-alim.akhtar@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-08Tegra QUAD SPI combined sequence modeMark Brown
Merge series from Krishna Yarlagadda <kyarlagadda@nvidia.com>: Add ACPI support for Tegra210 QUAD SPI driver Support new Tegra194 feature, combined sequence mode.
2022-03-08spi: topcliff-pch: Prevent usage of potentially stale DMA deviceAndy Shevchenko
DMA device is expected to be available while SPI transfer is ongoing. Prevent usage of potentially stale DMA device by keeping reference count till the end of the transfer. Fixes: 4d986ffa036a ("spi: add missing pci_dev_put() before return") Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220307173740.80996-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-08spi: tegra210-quad: combined sequence modeKrishna Yarlagadda
Add combined sequence mode supported by Tegra QSPI controller. For commands which contain cmd, addr, data parts to it, controller can accept all 3 transfers at once and avoid interrupt for each transfer. This would improve read & write performance. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220307165519.38380-3-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-08spi: tegra210-quad: add acpi supportKrishna Yarlagadda
Add ACPI ID for Tegra QUAD SPI. Switch to common device property calls. Skip clock calls that are not updated in ACPI boot. Runtime PM support is not yet enabled with ACPI boot. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220307165519.38380-2-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-08spi: Fix invalid sgs valueBiju Das
max_seg_size is unsigned int and it can have a value up to 2^32 (for eg:-RZ_DMAC driver sets dma_set_max_seg_size as U32_MAX) When this value is used in min_t() as an integer type, it becomes -1 and the value of sgs becomes 0. Fix this issue by replacing the 'int' data type with 'unsigned int' in min_t(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20220307184843.9994-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07spi: npcm-fiu: Fix typo ("npxm")Jonathan Neuschäfer
The platform is called NPCM, not NPXM. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Link: https://lore.kernel.org/r/20220306142312.109017-1-j.neuschaefer@gmx.net Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07spi: qup: replace spin_lock_irqsave by spin_lock in hard IRQXingbang Liu
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Xingbang Liu <liu.airalert@gmail.com> Link: https://lore.kernel.org/r/20220302071521.6638-1-liu.airalert@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07spi: cadence: fix platform_get_irq.cocci warningYihao Han
Remove dev_err() messages after platform_get_irq*() failures. platform_get_irq() already prints an error. Generated by: scripts/coccinelle/api/platform_get_irq.cocci Signed-off-by: Yihao Han <hanyihao@vivo.com> Link: https://lore.kernel.org/r/20220303125054.3574-1-hanyihao@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-07spi: s3c64xx: Allow controller-data to be optionalKrzysztof Kozlowski
The Samsung SoC SPI driver requires to provide controller-data node for each of SPI peripheral device nodes. Make this controller-data node optional, so DTS could be simpler. Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Andi Shyti <andi@etezian.org> Reviwed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220124082347.32747-5-krzysztof.kozlowski@canonical.com
2022-03-03spi: Use of_device_get_match_data()Minghao Chi (CGEL ZTE)
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220303092131.2060044-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-02spi: spi-zynqmp-gqspi: Handle error for dma_set_maskJiasheng Jiang
As the potential failure of the dma_set_mask(), it should be better to check it and return error if fails. Fixes: 126bdb606fd2 ("spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Link: https://lore.kernel.org/r/20220302092051.121343-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: use specific last_cs instead of last_cs_enableYun Zhou
Commit d40f0b6f2e21 instroduced last_cs_enable to avoid setting chipselect if it's not necessary, but it also introduces a bug. The chipselect may not be set correctly on multi-device SPI busses. The reason is that we can't judge the chipselect by bool last_cs_enable, since chipselect may be modified after other devices were accessed. So we should record the specific state of chipselect in case of confusion. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Link: https://lore.kernel.org/r/20220217141234.72737-1-yun.zhou@windriver.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Constify struct pxa_spi_info variablesAndy Shevchenko
Now when there are no dynamical changes required, we may constify struct pxa_spi_info variables. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-11-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Drop temporary storage use for a handful of membersAndy Shevchenko
Instead of using temporary storage, assign the values directly to the corresponding struct pxa2xx_spi_controller members. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-10-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Extract pxa2xx_spi_pci_clk_register()Andy Shevchenko
Extract pxa2xx_spi_pci_clk_register() from ->probe() in order to reuse it later on for getting rid of max_clk_rate temporary storage. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-9-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Drop unneeded checks in lpss_spi_setup()Andy Shevchenko
All of the LPSS devices are using DMA and set the parameters up, hence no need to test for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-8-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Replace enum with direct use of PCI IDsAndy Shevchenko
Instead of creating an abstraction on top of PCI IDs, just use them directly. The corresponding enum can be dropped. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-7-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Move max_clk_rate assignment to ->setup()Andy Shevchenko
Move max_clk_rate to the corresponding ->setup() function to unify with the rest. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Move dma_burst_size assignment to ->setup()Andy Shevchenko
Instead of using conditional, move dma_burst_size to the corresponding ->setup() function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Move port_id assignment to ->setup()Andy Shevchenko
Instead of using conditional, move port_id to the corresponding ->setup() functions. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Drop redundant NULL check in ->probe()Andy Shevchenko
Since all platforms are using ->setup() function, drop unneeded check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Refactor Quark X1000 to use ->setup()Andy Shevchenko
Refactor Quark X1000 handling code to use ->setup() instead of using the configuration data structure directly. It will allow to refactor further to avoid intermediate storage for the used configuration parameters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28spi: pxa2xx-pci: Refactor CE4100 to use ->setup()Andy Shevchenko
Refactor CE4100 handling code to use ->setup() instead of spreading potentially confusing conditional. Besides that, it will allow to refactor further to avoid intermediate storage for the used configuration parameters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25Merge tag 'spi-fix-v5.17-rc5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few small driver specific fixes" * tag 'spi-fix-v5.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: rockchip: terminate dma transmission when slave abort spi: rockchip: Fix error in getting num-cs property spi: spi-zynq-qspi: Fix a NULL pointer dereference in zynq_qspi_exec_mem_op()
2022-02-25Tegra QUAD SPI ACPI & device supportMark Brown
Merge series from Krishna Yarlagadda <kyarlagadda@nvidia.com>: Add ACPI support for Tegra210 QUAD SPI driver and a new compatilbe.
2022-02-24spi: tegra210-quad: add new chips to compatibleKrishna Yarlagadda
Add support for Tegra234 and soc data to select capabilities. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220222175611.58051-4-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24spi: tegra210-quad: use device_reset methodKrishna Yarlagadda
Use device_reset api to replace duplicate code in driver to call reset_control_get api with reset handle. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220222175611.58051-2-kyarlagadda@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24spi: pxa2xx-pci: Balance reference count for PCI DMA deviceAndy Shevchenko
The pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put(). Fixes: 743485ea3bee ("spi: pxa2xx-pci: Do a specific setup in a separate function") Fixes: 25014521603f ("spi: pxa2xx-pci: Enable DMA for Intel Merrifield") Reported-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220223191637.31147-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24spi: pxa2xx-pci: Do not dereference fwnode in struct deviceAndy Shevchenko
In order to make the underneath API easier to change in the future, prevent users from dereferencing fwnode from struct device. Instead, use the specific dev_fwnode() API for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220223191948.31325-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-23spi: add missing pci_dev_put() before returnWang Qing
pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put() Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1644890407-65167-1-git-send-email-wangqing@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-22spi: gpio: Implement LSB First bitbang supportAndreas Färber
Add support for slave DT property spi-lsb-first, i.e., SPI_LSB_FIRST mode. Duplicate the inline helpers bitbang_txrx_be_cpha{0,1} as LE versions. Conditionally call them from all the spi-gpio txrx_word callbacks. Some alternatives to this implementation approach were discussed back then [0], but eventually it was considered reasonable. [0] https://lore.kernel.org/linux-arm-kernel/20191212033952.5967-8-afaerber@suse.de/ Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/feac3377-4ad1-77d8-9a18-3588d80fb909@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-22spi: stm32: ignore Rx queue not empty in stm32f4 Tx only modeAhmad Fatoum
STM32F4_SPI_SR_RXNE and STM32F4_SPI_SR_OVR are distinct bits in the same status register. ~STM32F4_SPI_SR_OVR | STM32F4_SPI_SR_RXNE is thus equal to ~STM32F4_SPI_SR_OVR. The original intention was likely for transmission-only transfers to ignore interrupts both for when the Rx queue has bytes (RXNE) as well as when these bytes haven't been read in time (OVR). Fix the typo by adding the missing parenthesis. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20220201115142.3999860-1-a.fatoum@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-21spi: Use of_device_get_match_data()Minghao Chi (CGEL ZTE)
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220221020233.1925154-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-18spi: use sysfs_emit() for printing statistics and add trailing newlineHeiner Kallweit
Use dedicated function sysfs_emit() that does some extra checking, e.g. to ensure that no more than PAGESIZE bytes are written. In addition add a trailing newline to the output, that makes it better readable from the console. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/56e1588d-d53b-73e9-fdc8-7fe30bf91f11@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>