- 21 10月, 2016 1 次提交
-
-
由 Vikram N 提交于
currently during probe the resource data gets modified and device physical address remains valid only during first load. If the module is unloaded and loaded again, the ioremp will be done on a incorrect address as the resource was modified during previous module load. This patch fixes this issue. Signed-off-by: NVikram N <vicky773@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 7月, 2016 1 次提交
-
-
由 Franklin S Cooper Jr 提交于
Currently, the driver handles mapping buffers to be used by the DMA. However, there are times that the current mapping implementation will fail for certain buffers. Fortunately, the SPI framework can detect and map buffers so its usable by the DMA. Update the driver to utilize the SPI framework for buffer mapping instead. Also incorporate hooks that the framework uses to determine if the DMA can or can not be used. This will result in the original omap2_mcspi_transfer_one function being deleted and omap2_mcspi_work_one being renamed to omap2_mcspi_transfer_one. Previously transfer_one was only responsible for mapping and work_one handled the transfer. But now only transferring needs to be handled by the driver. Signed-off-by: NFranklin S Cooper Jr <fcooper@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 7月, 2016 1 次提交
-
-
由 Franklin S Cooper Jr 提交于
OMAP35x and OMAP37x mentions in the McSPI End-of-Transfer Sequences section that if the McSPI is configured as a Master and only DMA RX is being performed then the DMA transfer size needs to be reduced by 1 or 2. This was originally implemented by: commit 57c5c28d ("spi: omap2_mcspi rxdma bugfix") This patch adds comments to clarify what is going on in the code since its not obvious what problem its addressing. Signed-off-by: NFranklin S Cooper Jr <fcooper@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 30 4月, 2016 1 次提交
-
-
由 Peter Ujfalusi 提交于
With the new dma_request_chan() the client driver does not need to look for the DMA resource and it does not need to pass filter_fn anymore. By switching to the new API the driver can now support deferred probing against DMA. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 4月, 2016 1 次提交
-
-
由 Akinobu Mita 提交于
This reverts commit 3525e0aa. The DMA transfer for RX buffer was not handled correctly in this change. The actual transfer length for DMA RX can be less than xfer->len in the specific condition and the last words will be filled after the DMA completion, but the commit doesn't consider it and the dmaengine is started with rx_sg mapped by spi core. The solution for this at least requires more lines than this commit has inserted. So revert it for now. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 3月, 2016 1 次提交
-
-
由 Akinobu Mita 提交于
Currently omap2-mcspi cannot handle dma transfer for vmalloced buffer. I hit this problem when using mtdblock on spi-nor. This lets the SPI core handle the page mapping for dma transfer buffer. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 2月, 2016 1 次提交
-
-
由 Tony Lindgren 提交于
Commit 5de85b9d ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") introduced pm_runtime_reinit() that is used to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting down the device after a failed probe. However, for drivers using pm_runtime_use_autosuspend() this can cause a state where suspend callback is never called after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. The solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Fixes: 5de85b9d ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Cc: linux-spi@vger.kernel.org Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Mark Brown <broonie@kernel.org> Cc: Nishanth Menon <nm@ti.com> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 12月, 2015 1 次提交
-
-
由 Michael Welling 提交于
Occasionally the setup function will be called multiple times. Only request the gpio the first time otherwise -EBUSY will occur on subsequent calls to setup. Reported-by: NJoseph Bell <joe@iachieved.it> Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 11月, 2015 1 次提交
-
-
由 Pascal Huerst 提交于
This adds calls to pinctrl subsystem in order to switch pin states on suspend/resume if you provide a "sleep" state in DT. If no "sleep" state is provided in DT, these calls turn to NOPs. Signed-off-by: NPascal Huerst <pascal.huerst@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 10月, 2015 1 次提交
-
-
由 Neil Armstrong 提交于
Since the "Switch driver to use transfer_one" change, the cs_change behavior has changed and a channel chip select can still be asserted when changing channel from a previous last transfer in a message having the cs_change attribute. Since there is no sense having multiple chip select being asserted at the same time, disable all the remaining forced chip selects in a the prepare_message called right before a spi_transfer_one_message call. It ignores the current channel configuration in order to keep the possibility to leave the chip select asserted between messages. It fixes this bug on a DM8168 SoC ES2.1 Soc and an OMAP4 ES2.1 SoC. It was hanging all the other channels transfers when a CHCONF_FORCE is present on the wrong channel. Fixes: b28cb941 ("spi: omap2-mcspi: Switch driver to use transfer_one") Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Reviewed-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 7月, 2015 1 次提交
-
-
由 Sebastian Reichel 提交于
Since commit ddcad7e9 omap2_mcspi_set_cs() is called without runtime power management requested. This patch fixes the problem by requesting runtime power management in omap2_mcspi_set_cs(). Reported-By: NPali Rohár <pali.rohar@gmail.com> Fixes: ddcad7e9 (spi: omap2-mcspi: Fix native cs with new set_cs) Tested-By: NPavel Machek <pavel@ucw.cz> Signed-off-by: NSebastian Reichel <sre@kernel.org> Acked-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 5月, 2015 4 次提交
-
-
由 Michael Welling 提交于
If a valid GPIO is specified but cannot be requested by the driver, print a message and error out of omap2_mcspi_setup. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Michael Welling 提交于
The OMAP2_MCSPI_CHCONF_FORCE must be toggled even when using GPIO chip selects. This patch conditionally calls the omap2_mcspi_set_cs function to do so when using GPIO chip selects. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Michael Welling 提交于
The core spi driver swaps the polarity of the enable based on SPI_CS_HIGH. The omap2 controller has an internal configuration register bit called OMAP2_MCSPI_CHCONF_EPOL to handle active high chip selects as well. So we have to revert swap the polarity back for the correct setting of the OMAP2_MCSPI_CHCONF_FORCE bit in omap2_mcspi_set_cs. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Michael Welling 提交于
The core spi driver handles the delay between transactions. This is a remanant from the transfer_one conversion. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 5月, 2015 1 次提交
-
-
由 Michael Welling 提交于
GPIO chip select patch series appears to have broken the native chip select support. This patch pulls the manual native chip select toggling out of the transfer_one routine and adds a set_cs routine. Tested natively on AM3354 with SPI serial flash on spi0cs0. Reported-by: NNishanth Menon <nm@ti.com> Signed-off-by: NMichael Welling <mwelling@ieee.org> Tested-by: NNishanth Menon <nm@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 5月, 2015 1 次提交
-
-
由 Michael Welling 提交于
If GPIO chip select is specified, request the GPIO in the setup function and release it in the cleanup function. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 5月, 2015 1 次提交
-
-
由 Michael Welling 提交于
Switches from transfer_one_message to transfer_one to prepare driver for use of GPIO chip selects. Signed-off-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 4月, 2015 1 次提交
-
-
由 Fionn Cleary 提交于
The spi queue waits forever for spi_finalize_current_message() to be called, blocking the bus. Ensure that all error paths from omap2_mcspi_transfer_one_message() call spi_finalize_current_message(). Signed-off-by: NFionn Cleary <fionn.cleary@streamunlimited.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 12月, 2014 1 次提交
-
-
由 Jarkko Nikula 提交于
Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.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>
-
- 12 8月, 2014 1 次提交
-
-
由 Jorge A. Ventura 提交于
The spi hangs waiting the completion of omap2_mcspi_rx_callback. Signed-off-by: NJorge A. Ventura <jorge.araujo.ventura@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 04 7月, 2014 1 次提交
-
-
由 Mark A. Greer 提交于
Commit id 2bd16e3e (spi: omap2-mcspi: Do not configure the controller on each transfer unless needed) does its job too well so omap2_mcspi_setup_transfer() isn't called even when an SPI slave driver changes 'spi->mode'. The result is that the mode requested by the SPI slave driver never takes effect. Fix this by adding the 'mode' member to the omap2_mcspi_cs structure which holds the mode value that the hardware is configured for. When the SPI slave driver changes 'spi->mode' it will be different than the value of this new member and the SPI master driver will know that the hardware must be reconfigured (by calling omap2_mcspi_setup_transfer()). Fixes: 2bd16e3e (spi: omap2-mcspi: Do not configure the controller on each transfer unless needed) Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 03 4月, 2014 1 次提交
-
-
由 Axel Lin 提交于
This saves a few unwind code and return proper error if devm_kcalloc fails. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 2月, 2014 2 次提交
-
-
由 Axel Lin 提交于
Set master->max_speed_hz and master->min_speed_hz then spi core will handle checking transfer speed. So we can remove the same checking in this driver. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
This checking is done in __spi_validate(). Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 04 2月, 2014 2 次提交
-
-
由 Stefan Sørensen 提交于
Currently a divide-by-2^n clock is used, causing a very coarse clock selection, i.e. a 10MHz device will need to use a 6MHz clock. The McSPI can also use a divide-by-n clock, this patch adds support for selecting that when possible. Signed-off-by: NStefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Stefan Sørensen 提交于
spi_transfer->speed_hz and spi_transfer->bits_per_word used to only be set when not using the default settings but are not set on every transfer, causing omap2_mcspi_setup_transfer to be called on each transfer. This patch changes the check to only call omap2_mcspi_setup_transfer if the settings needs to be changed. Signed-off-by: NStefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 2月, 2014 1 次提交
-
-
由 Paul Gortmaker 提交于
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 11月, 2013 1 次提交
-
-
由 Victor Kamensky 提交于
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: NVictor Kamensky <victor.kamensky@linaro.org> Signed-off-by: NTaras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 10月, 2013 1 次提交
-
-
由 Jarkko Nikula 提交于
Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 10 10月, 2013 1 次提交
-
-
由 Illia Smyrnov 提交于
This patch fixes MCSPI FIFO buffer support when transmit-and-receive (full duplex) mode is used. In this mode FIFO can be used for RX or for TX or for both directions. If FIFO used for both directions the buffer is split into two 32-byte buffers - one for each direction. Also for full duplex mode both AEL and AFL need to be set in CHCONF0 register. Signed-off-by: NIllia Smyrnov <illia.smyrnov@globallogic.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 26 9月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 29 8月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 7月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@linaro.org> Reviewed-by: NFelipe Balbi <balbi@ti.com>
-
- 24 6月, 2013 1 次提交
-
-
由 Matt Porter 提交于
Convert dmaengine channel requests to use dma_request_slave_channel_compat(). This supports the DT case of platforms requiring channel selection from either the OMAP DMA or the EDMA engine. AM33xx only boots from DT and is the only user implementing EDMA so in the !DT case we can default to the OMAP DMA filter. Signed-off-by: NMatt Porter <mporter@ti.com> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NJoel A Fernandes <joelagnel@ti.com> Signed-off-by: NSourav Poddar <sourav.poddar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 6月, 2013 1 次提交
-
-
由 Illia Smyrnov 提交于
The MCSPI controller has a built-in FIFO buffer to unload the DMA or interrupt handler and improve data throughput. This patch adds FIFO buffer support for SPI transfers in DMA mode. For SPI transfers in DMA mode, the largest possible FIFO buffer size will be calculated and set up. The FIFO won't be used for the SPI transfers in DMA mode if: calculated FIFO buffer size is less then 2 bytes or the FIFO buffer size isn't multiple of the SPI word length. Signed-off-by: NIllia Smyrnov <illia.smyrnov@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 6月, 2013 1 次提交
-
-
由 Illia Smyrnov 提交于
Introduce mcspi_bytes_per_word function as replacement for the next code fragment: int c = (word_len <= 8) ? 1 : (word_len <= 16) ? 2 : /* word_len <= 32 */ 4; This code used 2 times in current driver code and will be used 2 times in the next FIFO buffer support patch. Replace it with inline function with clear name to improve code legibility. Signed-off-by: NIllia Smyrnov <illia.smyrnov@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 5月, 2013 1 次提交
-
-
由 Stephen Warren 提交于
Fill in the recently added spi_master.bits_per_word_mask field in as many drivers as possible. Make related cleanups, such as removing any redundant error-checking, or empty setup callbacks. Signed-off-by: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 23 5月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-