- 11 6月, 2019 1 次提交
-
-
由 Suren Baghdasaryan 提交于
commit 8af0c18af1425fc70686c0fdcfc0072cd8431aa0 upstream. 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.comSigned-off-by: NSuren Baghdasaryan <surenb@google.com> Acked-by: NJohannes 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com> Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
-
- 16 8月, 2017 1 次提交
-
-
由 Huibin Hong 提交于
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: NHuibin Hong <huibin.hong@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 8月, 2017 1 次提交
-
-
由 Andy Yan 提交于
The spi on rv1108 is the same as other rockchip based socs, add compatible string for it. Signed-off-by: NAndy Yan <andy.yan@rock-chips.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 8月, 2017 3 次提交
-
-
由 Jeffy Chen 提交于
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: NJeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeffy Chen 提交于
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: NJeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeffy Chen 提交于
Slightly rework return value handling, no functional changes. Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 6月, 2017 2 次提交
-
-
由 Jeffy Chen 提交于
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: NDoug Anderson <dianders@chromium.org> Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeffy Chen 提交于
The rockchip spi still requires slave selection when using GPIO CS. Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 6月, 2017 1 次提交
-
-
由 Jeffy Chen 提交于
After failed to request dma tx chain, we need to disable pm_runtime. Also cleanup error labels for better readability. Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 12月, 2016 1 次提交
-
-
由 Brian Norris 提交于
In the pattern of many other devices, support a system-sleep pin configuration. Signed-off-by: NBrian Norris <briannorris@chromium.org> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Tested-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 7月, 2016 1 次提交
-
-
由 Brian Norris 提交于
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: NBrian Norris <briannorris@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 6月, 2016 1 次提交
-
-
由 Tomeu Vizoso 提交于
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: ea984911 ("spi: rockchip: check return value of dmaengine_prep_slave_sg") Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 01 6月, 2016 1 次提交
-
-
由 Caesar Wang 提交于
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: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 5月, 2016 1 次提交
-
-
由 Dan Carpenter 提交于
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: e4c0e06f ('spi: rockchip: fix probe deferral handling') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 4月, 2016 1 次提交
-
-
由 Shawn Lin 提交于
Use dma_request_chan instead of dma_request_slave_channel, in this case we can check EPROBE_DEFER without static warning. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 3月, 2016 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2016 2 次提交
-
-
由 Shawn Lin 提交于
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: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
Remove some of unused header files and reoder it into alphabetical order. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 3月, 2016 3 次提交
-
-
由 Shawn Lin 提交于
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: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
dmaengine_terminate_all is deprecated, let's use dmaengine_terminate_async for interrupt handling. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
We should check return value of dmaengine_prep_slave_sg, otherwise we take risk of null pointer. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 3月, 2016 1 次提交
-
-
由 Alexander Kochetkov 提交于
16-bit transfers must be in big endian mode on wire. Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 3月, 2016 1 次提交
-
-
由 Huibin Hong 提交于
Rockchip_spi_set_cs could be called by spi_setup, but spi_setup may be called by device driver after runtime suspend. Then the spi clock is closed, rockchip_spi_set_cs may access the spi registers, which causes cpu block in some socs. Fixes: 64e36824 ("spi/rockchip: add driver for Rockchip RK3xxx") Signed-off-by: NHuibin Hong <huibin.hong@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 2月, 2016 1 次提交
-
-
由 Xu Jianqun 提交于
Add devicetree bindings for Rockchip rk3399 spi which found on Rockchip rk3399 SoCs. Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 2月, 2016 1 次提交
-
-
由 Shawn Lin 提交于
xfer_completion isn't been used anywhere, so it can be removed. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 2月, 2016 2 次提交
-
-
由 Shawn Lin 提交于
Add missing spi_master_put for rockchip_spi_remove since it calls spi_master_get already. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shawn Lin 提交于
Before registering master, driver enables runtime pm. This patch pm_runtime_disable in err case while probing driver to balance pm reference count. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 2月, 2016 1 次提交
-
-
由 Addy Ke 提交于
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: NAddy ke <addy.ke@rock-chips.com> Fixes: 64e36824 ("spi/rockchip: add driver for Rockchip...") Signed-off-by: NShawn 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: NMark Brown <broonie@kernel.org> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com>
-
- 07 7月, 2015 1 次提交
-
-
由 Alexey Klimov 提交于
Memory for struct rockchip_spi is allocated by spi_alloc_master() using kzalloc() so it doesn't need to be set to 0 one more time. Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 3月, 2015 2 次提交
-
-
由 Julius Werner 提交于
We have found that we can sometimes see read failures on boards with high-capacitance SPI lines. It seems that the controller samples the Rx data line too early, and its register interface has an "Rx Sample Delay" setting to fine-tune against this issue. This patch adds a new optional device tree entry that can configure this delay in terms of nanoseconds. The kernel will calculate the best-fitting amount of parent clock ticks to program the controller with based on that. Signed-off-by: NJulius Werner <jwerner@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Julius Werner 提交于
The Rockchip SPI driver currently calculates its clock rate divisor by integer dividing the parent rate by the target rate, and then rounding the result up to the next even number (since the divisor must be even). Clock rate divisors should always be rounded up, so that the resulting frequency is lower or equal to the target. This is correctly done in the second step here but not in the first, so we still have a risk of exceeding the desired target frequency (e.g. setting spi-max-frequency to 40000000 with a parent clock of 99000000 could lead to a divisor of 99000000 / 40000000 == 2 (which is even) that then results in an effective frequency of 99000000 / 2 == 49500000 (potentially exceeding the flash chip's specifications). This patch changes the division to round up to fix this problem. Signed-off-by: NJulius Werner <jwerner@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 3月, 2015 1 次提交
-
-
由 Andy Shevchenko 提交于
There was handle_err() callback introduced that is dedicated for error handling. The patch moves error handling to this callback. Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-rockchip@lists.infradead.org Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 1月, 2015 1 次提交
-
-
由 Arnd Bergmann 提交于
We currently get a warning about potentially uninitialized variables in the rockchip spi driver, at least in certain toolchain versions: spi/spi-rockchip.c: In function 'rockchip_spi_prepare_dma': include/linux/dmaengine.h:796:2: warning: 'txdesc' may be used uninitialized in this function include/linux/dmaengine.h:796:2: warning: 'rxdesc' may be used uninitialized in this function The reason seems to be that gcc cannot know whether the value of the rs->rx and rs->tx variables change between the two points these are accessed. The code is actually correct, but to make this clearer to the compiler, this changes the conditionals to test for the local rxdesc/txdesc variables instead, which it knows won't change. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/spi/. Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NMark Brown <broonie@kernel.org>
-
- 12 11月, 2014 1 次提交
-
-
由 Laurentiu Palcu 提交于
The call to spi_master_put() in rockchip_spi_remove() is redundant since the master is registered using devm_. This patch removes it. Signed-off-by: NLaurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 10月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 17 10月, 2014 1 次提交
-
-
由 Addy Ke 提交于
Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 10月, 2014 2 次提交
-
-
由 Addy Ke 提交于
In rx mode, dma must be prepared before spi is enabled. But in tx and tr mode, spi must be enabled first. Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Addy Ke 提交于
Because the minimum divisor in rk3x's spi controller is 2, if spi_clk is less than 2 * sclk_out, we can't get the right divisor. So we must set spi_clk again to match slave request. Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 9月, 2014 1 次提交
-
-
由 Addy Ke 提交于
In my test on RK3288-pinky board, if spi is enabled, it will begin to read data from slave regardless of whether the DMA is ready. So we need prepare DMA before spi is enable. Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-