- 17 7月, 2014 2 次提交
-
-
由 Geert Uytterhoeven 提交于
To function correctly in the presence of an IOMMU, the DMA buffers must be mapped using the DMA channel's device instead of the MSIOF platform device's device. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
As typically a shmobile SoC has less DMA channels than devices that can use DMA, we may want to prioritize access to the DMA channels in the future. This means that dmaengine_prep_slave_single() may start failing arbitrarily. Handle dmaengine_prep_slave_single() failures gracefully by falling back to PIO. This requires moving DMA-specific configuration of the MSIOF device after the call(s) to dmaengine_prep_slave_single(). Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 7月, 2014 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Add DMA support to the MSIOF driver using platform data. As MSIOF DMA is limited to 32-bit words (requiring byte/wordswapping for smaller wordsizes), and the group length is limited to 256 words, DMA is performed on two fixed pages, allocated and mapped at driver initialization time. Performance figures (in Mbps) on r8a7791/koelsch at different SPI clock frequencies for 1024-byte and 4096-byte transfers: 1024 bytes 4096 bytes - 3.25 MHz: PIO 2.1, DMA 2.6 | PIO 2.8, DMA 3.1 - 6.5 MHz: PIO 3.2, DMA 4.4 | PIO 5.0, DMA 5.9 - 13 MHz: PIO 4.2, DMA 6.6 | PIO 8.2, DMA 10.7 - 26 MHz: PIO 5.9, DMA 10.4 | PIO 12.4, DMA 18.4 Note that DMA is only faster than PIO for transfers that exceed the FIFO size (typically 64 words / 256 bytes). Also note that large transfers (larger than the group length for DMA, or larger than the FIFO size for PIO), should use cs-gpio (with the appropriate pinmux setup), as the hardware chipselect will be deasserted in between chunks. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 21 6月, 2014 4 次提交
-
-
由 Geert Uytterhoeven 提交于
- Move buffer pointer and length setup to the top, - Make unsigned values unsigned, - Loop over words and increment pointers instead of recalculating them, which allows to kill bytes_done. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
- Add a timeout when waiting for the transfer complete interrupt, - If sh_msiof_spi_stop() fails, there's no need to clear IER, as the interrupt handler has already done that, - Propagate transfer failures in sh_msiof_transfer_one(). Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Based on an old patch by Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 6月, 2014 1 次提交
-
-
由 Alexander Shiyan 提交于
Drop call to platform_set_drvdata() as driver data is not used anywhere in the driver. Signed-off-by: NAlexander Shiyan <shc_work@mail.ru> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 4月, 2014 1 次提交
-
-
由 Jingoo Han 提交于
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 11 3月, 2014 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 3月, 2014 1 次提交
-
-
由 Axel Lin 提交于
In the implementation of __spi_validate(), spi core will set transfer bits_per_word and max speed as spi device default if it is not set for this transfer. So we can remove the same implementation in this driver. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 27 2月, 2014 6 次提交
-
-
由 Geert Uytterhoeven 提交于
The only remaining feature of spi-bitbang used by this driver is the chipselect() callback, which just does conditional GPIO. This is handled fine by the SPI core's spi_set_cs(), hence switch the driver to use the core message handling through our own transfer_one() method. As the (optional) GPIO CS is no longer deasserted at spi_master.setup() time (through spi_bitbang_setup() and the spi_bitbang.chipselect() callback), we now have to take care of that ourselves. Remove the call to spi_master_put() in sh_msiof_spi_remove(), as our SPI master is now registered using devm_spi_register_master() (spi_bitbang_start() uses the non-managed version). Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Set bits_per_word_mask so the spi core will reject transfers that attempt to use an unsupported bits_per_word value. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Move clock management and pin configuration from the bitbang chipselect() method to the SPI core prepare_message() and unprepare_message() methods. As spi_master.{,un}prepare_message() is guaranteed to be called in matching pairs, the clock management synchronization is no longer needed. As sh_msiof_spi_set_pin_regs() is no longer called at spi_master.setup() time (through spi_bitbang_setup() and the spi_bitbang.chipselect() callback), we now have to take care of that ourselves. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Add support for the MSIOF variant in the R-Car H2 (r8a7790) and M2 (r8a7791) SoCs. Binding documentation: - Add future-proof "renesas,msiof-<soctype>" compatible values, - The default for "renesas,rx-fifo-size" is 256 on R-Car H2 and M2, - "renesas,tx-fifo-size" and "renesas,rx-fifo-size" are deprecated for soctype-specific bindings, - Add example bindings. Implementation: - MSIOF on R-Car H2 and M2 requires the transmission of dummy data if data is being received only (cfr. "Set SICTR.TSCKE to 1" and "Write dummy transmission data to SITFDR" in paragraph "Transmit and Receive Procedures" of the Hardware User's Manual). - As RX depends on TX, MSIOF on R-Car H2 and M2 also lacks the RSCR register (Receive Clock Select Register), and some bits in the RMDR1 (Receive Mode Register 1) and TMDR2 (Transmit Mode Register 2) registers. - Use the recently introduced SPI_MASTER_MUST_TX flag to enable support for dummy transmission in the SPI core, and to differentiate from other MSIOF implementations in code paths that need this. - New DT compatible values ("renesas,msiof-r8a7790" and "renesas,msiof-r8a7791") are added, as well as new platform device names ("spi_r8a7790_msiof" and "spi_r8a7791_msiof"). - The default RX FIFO size is 256 words on R-Car H2 and M2. This is loosely based on a set of patches from Takashi Yoshii <takasi-y@ops.dti.ne.jp>. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
As different variants of MSIOF have different FIFO sizes, move the default FIFO sizes to a new struct sh_msiof_chipdata, pointed to from the device ID data. [Moved ifdef to fix build -- broonie] Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Documentation: - Add missing "interrupt-parent", "#address-cells", "#size-cells", and "clocks" properties, - Add missing default values for "num-cs", "renesas,tx-fifo-size" and "renesas,rx-fifo-size", - Add a reference to the pinctrl documentation. Implementation: - As "num-cs" is marked optional, provide a sensible default. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 2月, 2014 5 次提交
-
-
由 Geert Uytterhoeven 提交于
In current implementation, CS is controlled by GPIO, which is passed through spi->controller_data. However, the MSIOF HW module has a function to output CS by itself, which is already enabled and actual switch will be done by pinmux. Store the GPIO number in the core cs_gpio field, and ignore it if it is an invalid (negative) GPIO number. Loosely based on a patch from Takashi Yoshii <takasi-y@ops.dti.ne.jp>. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Both spi_transfer.speed_hz and spi_master.max_speed_hz are u32 Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
DT doesn't instantiate SPI children if spi_master.dev.of_node is not set up properly. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> 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>
-
- 02 12月, 2013 2 次提交
-
-
由 Takashi Yoshii 提交于
Set hardware CS(CS control function on MSIOF <-> GPIO CS) polarity according to SPI_CS_HIGH flag on spi->mode. Signed-off-by: NTakashi Yoshii <takasi-y@ops.dti.ne.jp> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Takashi Yoshii 提交于
Truncation on integer division in sh_msiof_spi_set_clk_regs() results in insufficient transfer frequency (> max_speed_freq). For example, source 52MHz, required max 6MHz 52/6 = 8.6 --> 8, then 1/8 table selected, and result in 52/8 = 6.5 MHz (>6MHz) Rounding it up is a simple solution. 52/6 = 8.6 --> 9, then 1/16 table selected, and result in 52/16 = 3.25 MHz Signed-off-by: NTakashi Yoshii <takasi-y@ops.dti.ne.jp> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 28 11月, 2013 2 次提交
-
-
由 Laurent Pinchart 提交于
Get the driver ready for the migration to the common clock framework by calling clk_prepare() and clk_unprepare(). The calls are added in the probe and remove handlers as the clk_enable() and clk_disable() calls are located in atomic context and there's no callback function in non-atomic context that can be used to prepare/unprepare the clock. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Laurent Pinchart 提交于
This simplifies error and cleanup code paths. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 27 11月, 2013 1 次提交
-
-
由 Laurent Pinchart 提交于
Cast pointers to uintptr_t instead of unsigned int. This fixes warnings on platforms where pointers have a different size than int. Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 11月, 2013 1 次提交
-
-
由 Wolfram Sang 提交于
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.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>
-
- 29 7月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Previously the runtime PM API insisted on having callbacks for everything but this requirement was removed a while ago so the empty callbacks can also be removed. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 4月, 2013 1 次提交
-
-
由 Sachin Kamat 提交于
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 05 2月, 2013 1 次提交
-
-
由 Bastian Hecht 提交于
This adds the capability to retrieve setup data from the device tree node. The usage of platform data is still available. Signed-off-by: NBastian Hecht <hechtb+renesas@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 06 12月, 2012 1 次提交
-
-
由 Bastian Hecht 提交于
clk_get() no longer needs a character string for associating the right clock as this is done via the device struct now. Signed-off-by: NBastian Hecht <hechtb@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 01 11月, 2011 1 次提交
-
-
由 Paul Gortmaker 提交于
We are clipping down the presence of module.h, since it was everywhere. If you really need it, you better call it out, as per this changeset. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 25 10月, 2011 1 次提交
-
-
由 Grant Likely 提交于
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Reviewed-by: NMagnus Damm <magnus.damm@gmail.com> Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 24 10月, 2011 1 次提交
-
-
由 Yong Zhang 提交于
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: NYong Zhang <yong.zhang0@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 06 6月, 2011 1 次提交
-
-
由 Grant Likely 提交于
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 22 1月, 2011 2 次提交
-
-
由 Guennadi Liakhovetski 提交于
Instead of sending data 8 bits at a time in 8-bit SPI mode, swap bytes and send and receive them 32 bits at a time. Tested with an SD-card, with which this patch reduced the number of interrupts by 50%, when reading 5MiB of data (there are also small service packets, the number of interrupts, produced by 512-byte sectors should, of course, drop by 75%), and improved throughput by more than 40%. Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Guennadi Liakhovetski 提交于
1. sort headers alphabetically 2. use fixed-size types u8, u16, u32 for register values and transferred data 3. simplify some arithmetic operations Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> [grant.likely@secretlab.ca: removed label indentation change] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-