- 24 2月, 2015 2 次提交
-
-
由 Andy Shevchenko 提交于
There is no need to have an additional variable to get a TX level. The patch refactors this piece of code. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Andy Shevchenko 提交于
There is no sense to keep a member assignment in the internal structure inside the condition which reprograms HW. It makes code readability better if kept outside of the condition. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 1月, 2015 2 次提交
-
-
由 Andy Shevchenko 提交于
When autodetection is used it would be useful to know what the FIFO size is. The patch adds a debug message for this purpose. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Andy Shevchenko 提交于
In case of warning message in ->probe() we have to use HW device name instead of master because last is not defined yet. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 1月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Current code tries to find the highest valid fifo depth by checking the value it wrote to DW_SPI_TXFLTR. There are a few problems in current code: 1) There is an off-by-one in dws->fifo_len setting because it assumes the latest register write fails so the latest valid value should be fifo - 1. 2) We know the depth could be from 2 to 256 from HW spec, so it is not necessary to test fifo == 257. In the case fifo is 257, it means the latest valid setting is fifo = 256. So after the for loop iteration, we should check fifo == 2 case instead of fifo == 257 if detecting the FIFO depth fails. This patch fixes above issues. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-and-tested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 07 11月, 2014 1 次提交
-
-
由 Thor Thayer 提交于
An IOCTL call that calls spi_setup() and then dw_spi_setup() will overwrite the persisted last transfer speed. On each transfer, the SPI speed is compared to the last transfer speed to determine if the clock divider registers need to be updated (did the speed change?). This bug was observed with the spidev driver using spi-config to update the max transfer speed. This fix: Don't overwrite the persisted last transaction clock speed when updating the SPI parameters in dw_spi_setup(). On the next transaction, the new speed won't match the persisted last speed and the hardware registers will be updated. On initialization, the persisted last transaction clock speed will be 0 but will be updated after the first SPI transaction. Move zeroed clock divider check into clock change test because chip->clk_div is zero on startup and would cause a divide-by-zero error. The calculation was wrong as well (can't support odd #). Reported-by: NVlastimil Setka <setka@vsis.cz> Signed-off-by: NVlastimil Setka <setka@vsis.cz> Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 09 10月, 2014 1 次提交
-
-
由 Thor Thayer 提交于
The of_node element must be initialized to enable discovery of node children which takes place in the of_register_spi_devices() function. Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 9月, 2014 2 次提交
-
-
由 Andy Shevchenko 提交于
Make comments be surrounded by spaces and move part of code to one line where it suits 80 characters. There is no functional changes. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Andy Shevchenko 提交于
For testing purposes it's good to have a loopback mode enabled. The patch adds necessary bits for that. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 9月, 2014 2 次提交
-
-
由 Andy Shevchenko 提交于
Since driver is used on other platforms and debugfs stuff would be useful there as well let's substitute mrst_ by dw_ where it suits. Additionally let's use SPI master device name when print registers dump. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Andy Shevchenko 提交于
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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 9月, 2014 1 次提交
-
-
由 Jingoo Han 提交于
Fix the following checkpatch warnings. WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required WARNING: min() should probably be min_t(u32, rx_left, dw_readw(dws, DW_SPI_RXFLR)) WARNING: else is not generally useful after a break or return WARNING: Missing a blank line after declarations WARNING: void function return statements are not generally useful Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 9月, 2014 1 次提交
-
-
由 Axel Lin 提交于
device_add() expects that any memory allocated via devm_* API is only done in the device's probe function. Fix below boot warning: WARNING: CPU: 1 PID: 1 at drivers/base/dd.c:286 driver_probe_device+0x2b4/0x2f4() Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.16.0-10474-g835c90b-dirty #160 [<c0016364>] (unwind_backtrace) from [<c001251c>] (show_stack+0x20/0x24) [<c001251c>] (show_stack) from [<c04eaefc>] (dump_stack+0x7c/0x98) [<c04eaefc>] (dump_stack) from [<c0023d4c>] (warn_slowpath_common+0x78/0x9c) [<c0023d4c>] (warn_slowpath_common) from [<c0023d9c>] (warn_slowpath_null+0x2c/0x34) [<c0023d9c>] (warn_slowpath_null) from [<c0302c60>] (driver_probe_device+0x2b4/0x2f4) [<c0302c60>] (driver_probe_device) from [<c0302d90>] (__device_attach+0x50/0x54) [<c0302d90>] (__device_attach) from [<c0300e60>] (bus_for_each_drv+0x54/0x9c) [<c0300e60>] (bus_for_each_drv) from [<c0302958>] (device_attach+0x84/0x90) [<c0302958>] (device_attach) from [<c0301f10>] (bus_probe_device+0x94/0xb8) [<c0301f10>] (bus_probe_device) from [<c03000c0>] (device_add+0x434/0x4fc) [<c03000c0>] (device_add) from [<c0342dd4>] (spi_add_device+0x98/0x164) [<c0342dd4>] (spi_add_device) from [<c03444a4>] (spi_register_master+0x598/0x768) [<c03444a4>] (spi_register_master) from [<c03446b4>] (devm_spi_register_master+0x40/0x80) [<c03446b4>] (devm_spi_register_master) from [<c0346214>] (dw_spi_add_host+0x1a8/0x258) [<c0346214>] (dw_spi_add_host) from [<c0346920>] (dw_spi_mmio_probe+0x1d4/0x294) [<c0346920>] (dw_spi_mmio_probe) from [<c0304560>] (platform_drv_probe+0x3c/0x6c) [<c0304560>] (platform_drv_probe) from [<c0302a98>] (driver_probe_device+0xec/0x2f4) [<c0302a98>] (driver_probe_device) from [<c0302d3c>] (__driver_attach+0x9c/0xa0) [<c0302d3c>] (__driver_attach) from [<c0300f0c>] (bus_for_each_dev+0x64/0x98) [<c0300f0c>] (bus_for_each_dev) from [<c0302518>] (driver_attach+0x2c/0x30) [<c0302518>] (driver_attach) from [<c0302134>] (bus_add_driver+0xdc/0x1f4) [<c0302134>] (bus_add_driver) from [<c03035c8>] (driver_register+0x88/0x104) [<c03035c8>] (driver_register) from [<c030445c>] (__platform_driver_register+0x58/0x6c) [<c030445c>] (__platform_driver_register) from [<c0700f00>] (dw_spi_mmio_driver_init+0x18/0x20) [<c0700f00>] (dw_spi_mmio_driver_init) from [<c0008914>] (do_one_initcall+0x90/0x1d4) [<c0008914>] (do_one_initcall) from [<c06d7d90>] (kernel_init_freeable+0x178/0x248) [<c06d7d90>] (kernel_init_freeable) from [<c04e687c>] (kernel_init+0x18/0xfc) [<c04e687c>] (kernel_init) from [<c000ecd8>] (ret_from_fork+0x14/0x20) Reported-by: NThor Thayer <tthayer@opensource.altera.com> Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 28 8月, 2014 1 次提交
-
-
由 Andy Shevchenko 提交于
The obvious fix after the commit d9c73bb8 "spi: dw: add support for gpio controlled chip select". This patch fixes the issue by using locally defined temporary variable. Fixes: d9c73bb8 (spi: dw: add support for gpio controlled chip select) Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org>
-
- 13 5月, 2014 1 次提交
-
-
由 Axel Lin 提交于
The dw_spi_cleanup() function was removed by commit c63f5da0 "spi: dw: Don't call kfree for memory allocated by devm_kzalloc". commit ec37e8e1 "spi: dw: migrate to generic queue infrastructure" added dw_spi_cleanup() but never use it. So now I got below build warning: CC [M] drivers/spi/spi-dw.o drivers/spi/spi-dw.c:609:13: warning: 'dw_spi_cleanup' defined but not used [-Wunused-function] Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 25 4月, 2014 2 次提交
-
-
由 Baruch Siach 提交于
Also, use this opportunity to let spi_chip_sel() handle chip-select deactivation as well. Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Baruch Siach 提交于
Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 28 3月, 2014 1 次提交
-
-
由 Axel Lin 提交于
With devm_kzalloc, the memory is automatically freed when spi_device detach from the bus. Fixes: commit 43f627ac (spi: dw: fix memory leak on error path) Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stabe@vger.kernel.org
-
- 03 3月, 2014 1 次提交
-
-
由 Axel Lin 提交于
Set master->max_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>
-
- 23 2月, 2014 1 次提交
-
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 31 12月, 2013 2 次提交
-
-
由 Baruch Siach 提交于
Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Baruch Siach 提交于
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: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 12月, 2013 1 次提交
-
-
由 Baruch Siach 提交于
Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 10月, 2013 1 次提交
-
-
由 Jarkko Nikula 提交于
User-visible strings are more difficult to grep from sources if they are separated to multiple source lines. This is worse than over 80 columns long line code style violation. Fix this by making those to single-line strings or by breaking them between variables. While at there, convert if (printk_ratelimit()) dev_warn() to use dev_warn_ratelimited in spi-pxa2xx.c. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.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>
-
- 08 12月, 2012 1 次提交
-
-
由 Grant Likely 提交于
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Bill Pemberton has done most of the legwork on this series. I've used his script to purge the attributes from the drivers/gpio tree. Reported-by: NBill Pemberton <wfp5p@virginia.edu> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 06 4月, 2012 1 次提交
-
-
由 Stephen Boyd 提交于
Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: NIngo Molnar <mingo@elte.hu> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 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>
-
- 21 9月, 2011 1 次提交
-
-
由 H Hartley Sweeten 提交于
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: NH Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 09 7月, 2011 1 次提交
-
-
由 Liu, ShuoX 提交于
Signed-off-by: NShuoX Liu <shuox.liu@intel.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>
-
- 08 4月, 2011 1 次提交
-
-
由 Vasily Khoruzhick 提交于
There's a race condition in stop_queue() in some drivers - if drv_data->queue is empty, but drv_data->busy is still set (or opposite situation) stop_queue will return -EBUSY. So fix loop condition to check that both drv_data->queue is empty and drv_data->busy is not set. This patch affects following drivers: pxa2xx_spi spi_bfin5xx amba-pl022 dw_spi Signed-off-by: NVasily Khoruzhick <anarsoul@gmail.com> Acked-by: NEric Miao <eric.y.miao@gmail.com> Acked-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 31 3月, 2011 5 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
由 Alek Du 提交于
leverage the performance gain by change in low level read/write batch operations Signed-off-by: NAlek Du <alek.du@intel.com> Signed-off-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Alek Du 提交于
Current poll transfer will read/write one word, then wait till the hw is non-busy, it's not efficient. This patch will try to read/write as many words as permitted by hardware FIFO depth. Signed-off-by: NAlek Du <alek.du@intel.com> Signed-off-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Alek Du 提交于
The flush() is used to drain all the left data in rx fifo, currently is is always called together with disabling hw. But from spec, disabling hw will also reset all the fifo, so flush() is not needed. Signed-off-by: NAlek Du <alek.du@intel.com> Signed-off-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Feng Tang 提交于
The original version has many duplicated codes for null/u8/u16 case, so unify them to make it cleaner Signed-off-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 19 3月, 2011 1 次提交
-
-
由 Grant Likely 提交于
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: NGrant Likely <grant.likely@secretlab.ca> Cc: Feng Tang <feng.tang@intel.com> Cc: spi-devel-general@lists.sourceforge.net
-
- 31 12月, 2010 1 次提交
-
-
由 Justin P. Mattock 提交于
Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 24 12月, 2010 1 次提交
-
-
由 Feng Tang 提交于
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: NLinus Walleij <linus.walleij@stericsson.com> Signed-off-by: NFeng Tang <feng.tang@intel.com> [Typo fix and renames to match intel_mid_dma renaming] Signed-off-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-