summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-rockchip.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288Thomas Gleixner2019-06-051-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 263 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* include/: refactor headers to allow kthread.h inclusion in psi_types.hSuren Baghdasaryan2019-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | kthread.h can't be included in psi_types.h because it creates a circular inclusion with kthread.h eventually including psi_types.h and complaining on kthread structures not being defined because they are defined further in the kthread.h. Resolve this by removing psi_types.h inclusion from the headers included from kthread.h. Link: http://lkml.kernel.org/r/20190319235619.260832-7-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Dennis Zhou <dennis@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Li Zefan <lizefan@huawei.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* spi: rockchip: support lsb-first modeEmil Renner Berthing2018-11-051-1/+3
| | | | | | | | Add missing support for lsb-first mode. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: support 4bit wordsEmil Renner Berthing2018-11-051-12/+29
| | | | | | | | | The hardware supports 4, 8 and 16bit spi words, so add the missing support for 4bit words. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: use irq rather than pollingEmil Renner Berthing2018-11-051-63/+92
| | | | | | | | | Register an interrupt handler to fill/empty the tx and rx fifos rather than busy-looping. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: precompute rx sample delayEmil Renner Berthing2018-11-051-18/+18
| | | | | | | | | | Now that we no longer potentially change spi clock at runtime we can precompute the rx sample delay at probe time rather than for each transfer. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: set min/max speedEmil Renner Berthing2018-11-051-32/+20
| | | | | | | | | | | | | | | | | | | | | | | The driver previously checked each transfer if the requested speed was higher than possible with the current spi clock rate and raised the clock rate accordingly. However, there is no check to see if the spi clock was actually set that high and no way to dynamically lower the spi clock rate again. So it seems any potiential users of this functionality are better off just setting the spi clock rate at init using the assigned-clock-rates devicetree property. Removing this dynamic spi clock rate raising allows us let the spi framework handle min/max speeds for us. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: simplify use_dma logicEmil Renner Berthing2018-11-051-11/+7
| | | | | | | | | | We only need to know if we're using dma when setting up the transfer, so just use a local variable for that. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: remove master pointer from dev dataEmil Renner Berthing2018-11-051-11/+10
| | | | | | | | | | | | | In almost all cases we already have a pointer to the spi master structure where we have the driver data. The only exceptions are the dma callbacks which are easily fixed by passing them the master and using spi_master_get_devdata to retrieve the driver data. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: don't store dma channels twiceEmil Renner Berthing2018-11-051-42/+34
| | | | | | | | | | The spi master (aka spi controller) structure already has two fields for storing the rx and tx dma channels. Just use them rather than duplicating them in driver data. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: read transfer info directlyEmil Renner Berthing2018-11-051-46/+24
| | | | | | | | | | Just read transfer info directly from the spi device and transfer structures rather than storing it in driver data first. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: disable spi on errorEmil Renner Berthing2018-11-051-25/+5
| | | | | | | | | | | | | | Successful transfers leave the spi disabled, so if we just make sure to disable the spi on error there should be no need to disable the spi from master->unprepare_message. This also flushes the tx and rx fifos, so no need to do that manually. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: use atomic_t stateEmil Renner Berthing2018-11-051-50/+25
| | | | | | | | | | | | The state field is currently only used to make sure only the last of the tx and rx dma callbacks issue an spi_finalize_current_transfer. Rather than using a spinlock we can get away with just turning the state field into an atomic_t. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: always use SPI modeEmil Renner Berthing2018-11-051-13/+4
| | | | | | | | | | | The hardware supports 3 different variants of SPI and there were some code around it, but nothing to actually set it to anything but "Motorola SPI". Just drop that code and always use that mode. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: use designated init for dma configEmil Renner Berthing2018-11-051-12/+14
| | | | | | | | | | Use C99 designated initializers for dma slave config structures. This also makes sure uninitialized fields are zeroed so we don't need an explicit memset. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: make spi_enable_chip take boolEmil Renner Berthing2018-11-051-9/+9
| | | | | | | | | The spi_enable_chip function takes a boolean argument. Change the type to reflect that. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'spi-4.20' into spi-nextMark Brown2018-10-211-40/+19
|\
| * spi: rockchip: simplify spi enable logicEmil Renner Berthing2018-10-111-19/+9
| | | | | | | | | | | | | | | | | | | | | | Let the dma/non-dma code paths handle the spi enable flag themselves. This removes some logic to determine if the flag should be turned on before or after dma and also don't leave the spi enabled if the dma path fails. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: rockchip: directly use direction constantsEmil Renner Berthing2018-10-111-7/+4
| | | | | | | | | | | | | | | | | | The dma direction for the tx and rx dma channels never change, so just use the constants directly rather than storing them in device data. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: rockchip: mark use_dma as boolEmil Renner Berthing2018-10-111-3/+3
| | | | | | | | | | | | | | | | | | The driver data has a u32 field use_dma which is only ever used as a boolean, so change its type to reflect that. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: rockchip: remove unneeded dma_capsEmil Renner Berthing2018-10-111-2/+0
| | | | | | | | | | | | | | | | | | We no longer need the dma_caps since the dma driver already clamps the burst length to the hardware limit, so don't request and store dma_caps in device data. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: rockchip: adjust dma watermark and burstlenHuibin Hong2018-10-111-9/+3
| | | | | | | | | | | | | | | | | | | | | | Signal tx dma when spi fifo is less than half full, and limit tx bursts to half the fifo length. Clamp rx burst length to 1 to avoid alignment issues. Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: rockchip: initialize dma_slave_config properlyHuibin Hong2018-10-111-0/+3
|/ | | | | | | | | | The rxconf and txconf structs are allocated on the stack, so make sure we zero them before filling out the relevant fields. Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: configure CTRLR1 according to size and data frameHuibin Hong2017-08-161-1/+7
| | | | | | | | | CTRLR1 is number of data frames, when rx only. When data frame is 8 bit, CTRLR1 is len-1. When data frame is 16 bit, CTRLR1 is (len/2)-1. Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: add compatible string for rv1108 spiAndy Yan2017-08-141-0/+1
| | | | | | | | | The spi on rv1108 is the same as other rockchip based socs, add compatible string for it. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: Fix clock handling in suspend/resumeJeffy Chen2017-08-071-15/+6
| | | | | | | | | | | | The runtime suspend callback might be called by pm domain framework at suspend_noirq stage. It would try to disable the clocks which already been disabled by rockchip_spi_suspend. Call pm_runtime_force_suspend/pm_runtime_force_resume when suspend/resume to avoid that. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: Fix clock handling in removeJeffy Chen2017-08-071-1/+5
| | | | | | | | | | | We are assuming clocks enabled when calling rockchip_spi_remove, which is not always true. Those clocks might already been disabled by the runtime PM at that time. Call pm_runtime_get_sync before trying to disable clocks to avoid that. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: Slightly rework return value handlingJeffy Chen2017-08-071-12/+12
| | | | | | | Slightly rework return value handling, no functional changes. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: Disable Runtime PM when chip select is assertedJeffy Chen2017-06-281-25/+26
| | | | | | | | | | | | | | | | | The rockchip spi would stop driving pins when runtime suspended, which might break slave's xfer(for example cros_ec). Since we have pullups on those pins, we only need to care about this when the CS asserted. So let's keep the spi alive when chip select is asserted. Also use pm_runtime_put instead of pm_runtime_put_sync. Suggested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: Set GPIO_SS flag to enable Slave Select with GPIO CSJeffy Chen2017-06-281-0/+1
| | | | | | | | The rockchip spi still requires slave selection when using GPIO CS. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: fix error handling when probeJeffy Chen2017-06-131-13/+14
| | | | | | | | | After failed to request dma tx chain, we need to disable pm_runtime. Also cleanup error labels for better readability. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: rockchip: support "sleep" pin configurationBrian Norris2016-12-191-0/+5
| | | | | | | | | | In the pattern of many other devices, support a system-sleep pin configuration. Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Tested-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/rockchip', ↵Mark Brown2016-07-241-0/+3
|\ \ | | | | | | | | | 'spi/topic/s3c64xx', 'spi/topic/sh' and 'spi/topic/sh-msiof' into spi-next
| | * spi/rockchip: add the rk3036/rk3228/rk3368 to match for driverCaesar Wang2016-05-311-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | In gerenal, the "rockchip,rockchip-spi" string will match the dts that's great in spi driver. After all the most of rockchip SoCs ar same spi controller. Then, we should keep the old style to match the dts various. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'spi/fix/pax2xx' and 'spi/fix/rockchip' into ↵Mark Brown2016-07-241-0/+17
|\ \ \ | | |/ | |/| | | | spi-linus
| | * spi: rockchip: limit transfers to (64K - 1) bytesBrian Norris2016-07-201-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Rockchip SPI controller's length register only supports 16-bits, yielding a maximum length of 64KiB (the CTRLR1 register holds "length - 1"). Trying to transfer more than that (e.g., with a large SPI flash read) will cause the driver to hang. Now, it seems that while theoretically we should be able to program CTRLR1 with 0xffff, and get a 64KiB transfer, but that also seems to cause the core to choke, so stick with a maximum of 64K - 1 bytes -- i.e., 0xffff. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* / spi: rockchip: Signal unfinished DMA transfersTomeu Vizoso2016-06-081-1/+3
|/ | | | | | | | | | | | | | | | | When using DMA, the transfer_one callback should return 1 because the transfer hasn't finished yet. A previous commit changed the function to return 0 when the DMA channels were correctly prepared. This manifested in Veyron boards with this message: [ 1.983605] cros-ec-spi spi0.0: EC failed to respond in time Fixes: ea9849113343 ("spi: rockchip: check return value of dmaengine_prep_slave_sg") Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* spi: rockchip: potential NULL dereference on errorDan Carpenter2016-05-041-5/+4
| | | | | | | | | | | | We were calling dma_release_channel(rs->dma_tx.ch) when "rs->dma_tx.ch" is potentially NULL. There is actually a call to that in the unwind code at the bottom of the function so we can just re-arrange this a bit and remove the call. Also there is no need to set rs->dma_tx.ch to NULL on this error path. Fixes: e4c0e06f949b ('spi: rockchip: fix probe deferral handling') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'spi/fix/omap2' and 'spi/fix/rockchip' into ↵Mark Brown2016-04-041-6/+10
|\ \ | | | | | | | | | spi-linus
| | * spi: rockchip: fix probe deferral handlingShawn Lin2016-03-311-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use dma_request_chan instead of dma_request_slave_channel, in this case we can check EPROBE_DEFER without static warning. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: rockchip: Spelling s/divsor/divisor/Geert Uytterhoeven2016-03-151-1/+1
| |/ | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds2016-03-171-2/+10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull dmaengine updates from Vinod Koul: "This is smallish update with minor changes to core and new driver and usual updates. Nothing super exciting here.. - We have made slave address as physical to enable driver to do the mapping. - We now expose the maxburst for slave dma as new capability so clients can know this and program accordingly - addition of device synchronize callbacks on omap and edma. - pl330 updates to support DMAFLUSHP for Rockchip platforms. - Updates and improved sg handling in Xilinx VDMA driver. - New hidma qualcomm dma driver, though some bits are still in progress" * tag 'dmaengine-4.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (40 commits) dmaengine: IOATDMA: revise channel reset workaround on CB3.3 platforms dmaengine: add Qualcomm Technologies HIDMA channel driver dmaengine: add Qualcomm Technologies HIDMA management driver dmaengine: hidma: Add Device Tree binding dmaengine: qcom_bam_dma: move to qcom directory dmaengine: tegra: Move of_device_id table near to its user dmaengine: xilinx_vdma: Remove unnecessary variable initializations dmaengine: sirf: use __maybe_unused to hide pm functions dmaengine: rcar-dmac: clear pertinence number of channels dmaengine: sh: shdmac: don't open code of_device_get_match_data() dmaengine: tegra: don't open code of_device_get_match_data() dmaengine: qcom_bam_dma: Make driver work for BE dmaengine: sun4i: support module autoloading dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo dmaengine: xilinx_vdma: Use readl_poll_timeout instead of do while loop's dmaengine: xilinx_vdma: Simplify spin lock handling dmaengine: xilinx_vdma: Fix issues with non-parking mode dmaengine: xilinx_vdma: Improve SG engine handling dmaengine: pl330: fix to support the burst mode dmaengine: make slave address physical ...
| * spi: rockchip: modify DMA max burst to 1Addy Ke2016-02-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generic dma controller on Rockchips' platform cannot support DMAFLUSHP instruction which make dma to flush the req of non-aligned or non-multiple of what we need. That will cause an unrecoverable dma bus error. The saftest way is to set dma max burst to 1. Signed-off-by: Addy ke <addy.ke@rock-chips.com> Fixes: 64e36824b32b06 ("spi/rockchip: add driver for Rockchip...") Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> cc: Heiko Stuebner <heiko@sntech.de> cc: Olof Johansson <olof@lixom.net> cc: Doug Anderson <dianders@chromium.org> cc: Sonny Rao <sonnyrao@chromium.org> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| |
| \
*-. \ Merge remote-tracking branches 'spi/topic/res', 'spi/topic/rockchip', ↵Mark Brown2016-03-111-21/+35
|\ \ \ | | |/ | |/| | | | 'spi/topic/sh', 'spi/topic/ti-qspi' and 'spi/topic/xilinx' into spi-next
| | * spi: rockchip: covert rsd_nsecs to u32 typeShawn Lin2016-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rsd_nsecs is defined as u8 memeber of struct rockchip_spi, but using of_property_read_u32. That means we take risk of truncation by type conversion if we pass on big value from dt. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: rockchip: header file cleanupShawn Lin2016-03-101-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | Remove some of unused header files and reoder it into alphabetical order. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: rockchip: check requesting dma channel with EPROBE_DEFERShawn Lin2016-03-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Let's defer probing the driver if the return value of dma_request_slave_channel is ERR_PTR(-EPROBE_DEFER) instead of disabling dma capability directly. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: rockchip: migrate to dmaengine_terminate_asyncShawn Lin2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | dmaengine_terminate_all is deprecated, let's use dmaengine_terminate_async for interrupt handling. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi: rockchip: check return value of dmaengine_prep_slave_sgShawn Lin2016-03-091-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | We should check return value of dmaengine_prep_slave_sg, otherwise we take risk of null pointer. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * spi/rockchip: fix endian mode for 16-bit transfersAlexander Kochetkov2016-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | 16-bit transfers must be in big endian mode on wire. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>