- 06 Mar, 2015 1 commit
-
-
Andy Shevchenko authored
The error handling is partially broken since the controller is disabled on error and is not re-enabled until condition occurs, i.e. mode (poll, PIO/DMA), chip (cs_change), or speed (clk_div) is changed. In the result of these changes we will have a predictable state of the SPi controller independently on how successfull was a previous transfer. The patch disables interrupts and re-enables the SPI controller wherever it needs to be done. Thus most of the time the SPI controller is kept enabled. The runtime PM, when it will be implemented, must take care of the controller disabling and re-enabling. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- 28 Oct, 2014 1 commit
-
-
Andy Shevchenko authored
Currently driver wouldn't work properly if user asked for simplex transfer. The patch separates DMA rx and tx callbacks and finishes transfer correctly in any case. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- 02 Oct, 2014 1 commit
-
-
Andy Shevchenko authored
Instead of using magic numbers in the code we create a bit map definition of the DMACR register and use it. There is no functional change. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- 13 Sep, 2014 2 commits
-
-
Andy Shevchenko authored
Instead of using that member we prefer to use dma_dev which represents actual struct device of the DMA device. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
There is no need to keep FSF address in the head of the file. While here, fix few typos in the header. There is no functional change. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- 24 Apr, 2014 2 commits
-
-
Baruch Siach authored
Also, use this opportunity to let spi_chip_sel() handle chip-select deactivation as well. Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Baruch Siach authored
Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 31 Dec, 2013 1 commit
-
-
Baruch Siach authored
Migrate mmio code and core driver to managed resources to reduce boilerplate error handling code. Also, handle clk_enable() failure while at it, and drop unused dw_spi iolen field. Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 30 Dec, 2013 1 commit
-
-
Baruch Siach authored
Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- 21 Sep, 2011 1 commit
-
-
H Hartley Sweeten authored
The dw_{read,write}[lw] macros produce sparse warnings everytime they are used. The "read" ones cause: warning: cast removes address space of expression warning: incorrect type in argument 1 (different address spaces) expected void const volatile [noderef] <asn:2>*addr got unsigned int *<noident> And the "write" ones: warning: cast removes address space of expression warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] <asn:2>*addr got unsigned int *<noident> Fix this by removing struct dw_spi_reg and converting all the register offsets to #defines. Then convert the macros into inlined functions so that proper type checking can occur. While here, also fix the three sparse warnings in spi-dw-mid.c due to the return value of ioremap_nocache being stored in a u32 * not a void __iomem *. With these changes the spi-dw* files all build with no sparse warnings. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by:
Feng Tang <feng.tang@intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 08 Jul, 2011 1 commit
-
-
Liu, ShuoX authored
Signed-off-by:
ShuoX Liu <shuox.liu@intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 06 Jun, 2011 1 commit
-
-
Grant Likely authored
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:
Grant Likely <grant.likely@secretlab.ca> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 31 Mar, 2011 2 commits
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
Feng Tang authored
The original version has many duplicated codes for null/u8/u16 case, so unify them to make it cleaner Signed-off-by:
Feng Tang <feng.tang@intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 18 Mar, 2011 2 commits
-
-
Grant Likely authored
include/linux/dw_spi.h only includes driver internal data. It doesn't expose a platform_data configuration structure or similar (at least nothing in-tree). This patch moves the header into drivers/spi so that the scope is limited to only the dw_spi_*.c driver files Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Cc: Feng Tang <feng.tang@intel.com> Cc: spi-devel-general@lists.sourceforge.net
-
Jiri Slaby authored
Currently, build on PPC dies with: In file included from drivers/spi/dw_spi_mmio.c:16: include/linux/spi/dw_spi.h:147: error: field ‘tx_sgl’ has incomplete type include/linux/spi/dw_spi.h:149: error: field ‘rx_sgl’ has incomplete type Add linux/scatterlist.h include to dw_spi.h, because we need to know the contents of the structure. Signed-off-by:
Jiri Slaby <jslaby@suse.cz> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 24 Dec, 2010 1 commit
-
-
Feng Tang authored
dw_spi driver in upstream only supports PIO mode, and this patch will support it to cowork with the Designware dma controller used on Intel Moorestown platform, at the same time it provides a general framework to support dw_spi core to cowork with dma controllers on other platforms It has been tested with a Option GTM501L 3G modem and Infenion 60x60 modem. To use DMA mode, DMA controller 2 of Moorestown has to be enabled Also change the dma interface suggested by Linus Walleij. Acked-by:
Linus Walleij <linus.walleij@stericsson.com> Signed-off-by:
Feng Tang <feng.tang@intel.com> [Typo fix and renames to match intel_mid_dma renaming] Signed-off-by:
Vinod Koul <vinod.koul@intel.com> Signed-off-by:
Alan Cox <alan@linux.intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 08 Sep, 2010 1 commit
-
-
Feng Tang authored
commit 052dc7c4i "spi/dw_spi: conditional transfer mode change" introduced cs_control code, which has a bug by using bit offset for spi mode to set transfer mode in control register. Also it forces devices who don't need cs_control to re-configure the control registers for each spi transfer. This patch will fix them Signed-off-by:
Feng Tang <feng.tang@intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 21 Jan, 2010 1 commit
-
-
George Shore authored
The driver core allows for a platform-specific chipselect assert/deassert function, however the chipselect function in the core doesn't take advantage of this fact. This enables the use of a custom function, should it be defined. Signed-off-by:
George Shore <george@georgeshore.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 20 Jan, 2010 1 commit
-
-
Feng Tang authored
Now dw_spi core fully supports 3 transfer modes: pure polling, DMA and IRQ mode. IRQ mode will use the FIFO half empty as the IRQ trigger, so each interface driver need set the fifo_len, so that core driver can handle it properly Signed-off-by:
Feng Tang <feng.tang@intel.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- 17 Dec, 2009 1 commit
-
-
Feng Tang authored
Driver for the Designware SPI core, it supports multipul interfaces like PCI/APB etc. User can use "dw_apb_ssi_db.pdf" from Synopsys as HW datasheet. [randy.dunlap@oracle.com: fix build] [akpm@linux-foundation.org: build fix] Signed-off-by:
Feng Tang <feng.tang@intel.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by:
Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-