- 22 9月, 2020 3 次提交
-
-
由 Aswath Govindraju 提交于
This reverts commit 13d515c7 (spi: omap2-mcspi: Switch to readl_poll_timeout()). The amount of time spent polling for the MCSPI_CHSTAT bits to be set on AM335x-icev2 platform is less than 1us (about 0.6us) in most cases, with or without using DMA. So, in most cases the function need not sleep. Also, setting the sleep_usecs to zero would not be optimal here because ktime_add_us() used in readl_poll_timeout() is slower compared to the direct addition used after the revert. So, it is sub-optimal to use readl_poll_timeout in this case. When DMA is not enabled, this revert results in an increase of about 27% in throughput and decrease of about 20% in CPU usage. However, the CPU usage and throughput are almost the same when used with DMA. Therefore, fix this by reverting the commit which switched to using readl_poll_timeout(). Fixes: 13d515c7 ("spi: omap2-mcspi: Switch to readl_poll_timeout()") Signed-off-by: NAswath Govindraju <a-govindraju@ti.com> Link: https://lore.kernel.org/r/20200910122624.8769-1-a-govindraju@ti.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Qinglang Miao 提交于
Simplify the return expression. Signed-off-by: NQinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200921131106.93228-1-miaoqinglang@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Julia Lawall 提交于
sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1600601186-7420-12-git-send-email-Julia.Lawall@inria.frSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 18 9月, 2020 9 次提交
-
-
由 Jay Fang 提交于
Free previously allocated IRQs when return an error code of desc->setup() which is not always successful. And simplify the code by adding a goto label. Fixes: 8f5c285f ("SPI: designware: pci: Switch over to MSI interrupts") CC: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: NJay Fang <f.fangjian@huawei.com> Link: https://lore.kernel.org/r/1600132969-53037-1-git-send-email-f.fangjian@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 kuldip dwivedi 提交于
Currently NXP fspi driver has support of DT only. Adding ACPI support to the driver so that it can be used by UEFI firmware booting in ACPI mode. This driver will be probed if any firmware will expose HID "NXP0009" in DSDT table. Signed-off-by: Nkuldip dwivedi <kuldip.dwivedi@puresoftware.com> Reviewed-by: NAshish Kumar <Ashish.Kumar@nxp.com> Link: https://lore.kernel.org/r/20200911130331.6313-1-kuldip.dwivedi@puresoftware.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Barry Song 提交于
Running in hardIRQ, disabling irq is redundant. Signed-off-by: NBarry Song <song.bao.hua@hisilicon.com> Link: https://lore.kernel.org/r/20200916101042.21860-1-song.bao.hua@hisilicon.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Ricardo Ribalda 提交于
The info message was showing the mapped address of the device. To avoid security problems, all virtual addresses are converted to __ptrval__, so the message was useless/ugly: [ 2.304949] xilinx_spi b0010000.spi-flash: at 0xB0010000 mapped to 0x(____ptrval____), irq=37 Use %pR instead: [ 15.021354] xilinx_spi b0010000.spi-flash: at [mem 0xb0010000-0xb001ffff], irq=37 Signed-off-by: NRicardo Ribalda <ribalda@kernel.org> Acked-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20200915112936.320647-1-ribalda@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Eddie James 提交于
The SPI controllers are not accessible if the mux isn't set. Therefore, check the mux status before starting a transfer and fail out if it isn't set. Signed-off-by: NEddie James <eajames@linux.ibm.com> Signed-off-by: NJoel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20200909222857.28653-7-eajames@linux.ibm.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Eddie James 提交于
Some of the FSI-attached SPI controllers cannot use the loop command in programming the sequencer due to security requirements. Check the devicetree compatibility that indicates this condition and restrict the size for these controllers. Also, add more transfers directly in the sequence up to the length of the sequence register. Fixes: bbb6b2f9 ("spi: Add FSI-attached SPI controller driver") Signed-off-by: NEddie James <eajames@linux.ibm.com> Reviewed-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NJoel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20200909222857.28653-6-eajames@linux.ibm.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Brad Bishop 提交于
All of the switches in N2_count_control in the counter configuration are required to make the branch if not equal and increment command work. Set them when using bneq+. A side effect of this mode requires a dummy write to TDR when both transmitting and receiving otherwise the controller won't start shifting receive data. It is likely not possible to avoid TDR underrun errors in this mode and they are harmless, so do not check for them. Fixes: bbb6b2f9 ("spi: Add FSI-attached SPI controller driver") Signed-off-by: NBrad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: NEddie James <eajames@linux.ibm.com> Reviewed-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NJoel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20200909222857.28653-4-eajames@linux.ibm.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Brad Bishop 提交于
Use a clock divider tuned to a 200MHz FSI bus frequency (the maximum). Use of the previous divider at 200MHz results in corrupt data from endpoint devices. Ideally the clock divider would be calculated from the FSI clock, but that would require some significant work on the FSI driver. With FSI frequencies slower than 200MHz, the SPI clock will simply run slower, but safely. Signed-off-by: NBrad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: NEddie James <eajames@linux.ibm.com> Signed-off-by: NJoel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20200909222857.28653-3-eajames@linux.ibm.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Brad Bishop 提交于
The trailing <len> - 8 bytes of transfer data in this size range is no longer ignored. Fixes: bbb6b2f9 ("spi: Add FSI-attached SPI controller driver") Signed-off-by: NBrad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: NEddie James <eajames@linux.ibm.com> Reviewed-by: NJoel Stanley <joel@jms.id.au> Signed-off-by: NJoel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20200909222857.28653-2-eajames@linux.ibm.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 14 9月, 2020 11 次提交
-
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NChunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20200910160706.5883-1-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Douglas Anderson 提交于
If we're sending bytes over SPI, we know the FIFO is empty at the start of the transfer. There's no reason to wait for the interrupt telling us to start--we can just start right away. Then if we transmit everything in one swell foop we don't even need to bother listening for TX interrupts. In a test of "flashrom -p ec -r /tmp/foo.bin" interrupts were reduced from ~30560 to ~29730, about a 3% savings. This patch looks bigger than it is because I moved a few functions rather than adding a forward declaration. The only actual change to geni_spi_handle_tx() was to make it return a bool indicating if there is more to tx. Signed-off-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NAkash Asthana <akashast@codeaurora.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200912111716.1.Ied5e843fad0d6b733a1fb8bcfb364dd2fa889eb3@changeidSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Jason Yan 提交于
This eliminates the following sparse warning: drivers/spi/spi-bcm2835.c:78:14: warning: symbol 'polling_limit_us' was not declared. Should it be static? Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Link: https://lore.kernel.org/r/20200912072211.602735-1-yanaijie@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Vladimir Oltean 提交于
The arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi device tree lacks DMA channels for DSPI, so naturally, the driver fails to probe: [ 2.945302] fsl-dspi 2100000.spi: rx dma channel not available [ 2.951134] fsl-dspi 2100000.spi: can't get dma channels In retrospect, this should have been obvious, because LS2080A, LS2085A LS2088A and LX2160A don't appear to have an eDMA module at all. Looking again at their datasheets, the CTARE register (which is specific to XSPI functionality) seems to be documented, so switch them to XSPI mode instead. Fixes: 0feaf8f5 ("spi: spi-fsl-dspi: Convert the instantiations that support it to DMA") Reported-by: NQiang Zhao <qiang.zhao@nxp.com> Tested-by: NQiang Zhao <qiang.zhao@nxp.com> Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20200910121532.1138596-1-olteanv@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Douglas Anderson 提交于
We always toggle the chip select manually in spi-geni-qcom so that we can properly implement the Linux API. There's no reason to program this to the hardware on every transfer. Program it once at init and be done with it. This saves some part of a microsecond of overhead on each transfer. While not really noticeable on any real world benchmarks, we might as well save the time. Signed-off-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200912140730.2.I33e571179986850b4ec17042e813d0b08fb1b9c1@changeidSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Douglas Anderson 提交于
In commit 902481a7 ("spi: spi-geni-qcom: Actually use our FIFO") I explained that the maximum size we could program the FIFO was "mas->tx_fifo_depth - 3" but that I chose "mas->tx_fifo_depth()" because I was worried about decreased bandwidth. Since that time: * All the interconnect patches have landed, making things run at the proper speed. * I've done more measurements. This lets me confirm that there's really no downside of using the FIFO more. Specifically I did "flashrom -p ec -r /tmp/foo.bin" on a Chromebook and averaged over several runs. Before: It took 6.66 seconds and 59669 interrupts fired. After: It took 6.66 seconds and 47992 interrupts fired. Signed-off-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200912140730.1.Ie67fa32009b94702d56232c064f1d89065ee8836@changeidSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Barry Song 提交于
It is redundant to do irqsave and irqrestore in hardIRQ context. Cc: Andy Gross <agross@kernel.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NBarry Song <song.bao.hua@hisilicon.com> Link: https://lore.kernel.org/r/20200910100246.32696-1-song.bao.hua@hisilicon.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Ray Jui 提交于
The Broadcom QSPI driver now falls back to no MSPI_DEV support as the default setting in the generic compatible string, explicit settings for STB chips 7425, 7429, and 7435 can be removed. Signed-off-by: NRay Jui <ray.jui@broadcom.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20200910152539.45584-4-ray.jui@broadcom.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Ray Jui 提交于
iProc chips have QSPI controller that does not have the MSPI_REV offset. Reading from that offset will cause a bus error. Fix it by having MSPI_REV query disabled in the generic compatible string. Fixes: 3a01f04d ("spi: bcm-qspi: Handle lack of MSPI_REV offset") Link: https://lore.kernel.org/linux-arm-kernel/20200909211857.4144718-1-f.fainelli@gmail.com/T/#uSigned-off-by: NRay Jui <ray.jui@broadcom.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20200910152539.45584-3-ray.jui@broadcom.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Ray Jui 提交于
Add compatible string for BRCMSTB 7445 SoCs and indicate it has MSPI rev support. Signed-off-by: NRay Jui <ray.jui@broadcom.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20200910152539.45584-2-ray.jui@broadcom.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200910150410.750959-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 09 9月, 2020 14 次提交
-
-
由 Jay Fang 提交于
In spidev_read() and spidev_write(), the variable status is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: NJay Fang <f.fangjian@huawei.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/1599631704-53232-1-git-send-email-f.fangjian@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Viresh Kumar 提交于
dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, create a new label and put clkname on errors. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/b77aa0bbe82a580508e321a34da488b4b27966d0.1598594714.git.viresh.kumar@linaro.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Viresh Kumar 提交于
dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, create a new label and put clkname on errors. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/ea0864d41277e61fa31d304fbd4cf9af6b314269.1598594714.git.viresh.kumar@linaro.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Ikjoon Jang 提交于
Use default supports_op() to support spi-[rt]x-bus-width properties. And check dummy op's byte length instead of its bus width for output. Signed-off-by: NIkjoon Jang <ikjn@chromium.org> Link: https://lore.kernel.org/r/20200826091852.519138-1-ikjn@chromium.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-11-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-10-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-9-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-8-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-7-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-6-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200901152713.18629-5-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20200901152713.18629-4-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200901152713.18629-3-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time. Fixes: 386119bc ("spi: sprd: spi: sprd: Add DMA mode support") Cc: <stable@vger.kernel.org> Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NChunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20200901152713.18629-1-krzk@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 08 9月, 2020 3 次提交
-
-
由 Lars Povlsen 提交于
This adds SPI support for the Sparx5 SoC, which is using the MMIO Designware SPI controller. The Sparx5 differs from the Ocelot version in these areas: * The CS override is controlled by a new set of registers for this purpose. * The Sparx5 SPI controller has the RX sample delay register, and it must be configured for the (SPI NAND) device on SPI2. * The Sparx5 SPI controller has 2 different SPI bus interfaces on the same controller (don't ask...). The "spi-mux" driver should be used in conjunction with the SPI driver to select the appropriate bus. Signed-off-by: NLars Povlsen <lars.povlsen@microchip.com> Link: https://lore.kernel.org/r/20200824203010.2033-3-lars.povlsen@microchip.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Lars Povlsen 提交于
This add support for the RX_SAMPLE_DLY register. If enabled in the Designware IP, it allows tuning of the rx data signal by means of an internal rx sample fifo. The register is controlled by the rx-sample-delay-ns DT property, which is defined per SPI slave as well on controller level. The controller level rx-sample-delay-ns will apply to all slaves without the property explicitly defined. The register is located at offset 0xf0, and if the option is not enabled in the IP, changing the register will have no effect. The register will only be written if any slave defines a nonzero value (after scaling by the clock period). Signed-off-by: NLars Povlsen <lars.povlsen@microchip.com> Link: https://lore.kernel.org/r/20200824203010.2033-2-lars.povlsen@microchip.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Alex Dewar 提交于
There seems no reason to restrict testing to ARM, so remove this constraint to improve test coverage. Build-tested with allyesconfig on x86. Signed-off-by: NAlex Dewar <alex.dewar90@gmail.com> Link: https://lore.kernel.org/r/20200904163709.110975-1-alex.dewar90@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-