- 18 8月, 2010 1 次提交
-
-
由 Greg Ungerer 提交于
Using the coldfire qspi driver, I get the following error: drivers/spi/coldfire_qspi.c: In function 'mcfqspi_irq_handler': drivers/spi/coldfire_qspi.c:166: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/spi/coldfire_qspi.c:166: error: (Each undeclared identifier is reported only once It is solved by adding the following include to coldfire_sqpi.c: #include <linux/sched.h> Fix suggested by Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com> Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
-
- 06 8月, 2010 1 次提交
-
-
由 Grant Likely 提交于
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Reviewed-by: NDavid S. Miller <davem@davemloft.net>
-
- 01 8月, 2010 2 次提交
-
-
由 Grant Likely 提交于
This patch moves the declaration of of_get_address(), of_get_pci_address(), and of_pci_address_to_resource() out of arch code and into the common linux/of_address header file. This patch also fixes some of the asm/prom.h ordering issues. It still includes some header files that it ideally shouldn't be, but at least the ordering is consistent now so that of_* overrides work. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Kevin Wells 提交于
Probe and remove hooks belong in the __devinit and __devexit sections respectively. This patch fixes incorrect annotations on the pl022 spi driver. Signed-off-by: NKevin Wells <wellsk40@gmail.com> Acked-by: NLinus Walleij <linus.walleij@stericsson.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 30 7月, 2010 1 次提交
-
-
由 Anatolij Gustschin 提交于
Move of_register_spi_devices() call from drivers to spi_register_master(). Also change the function to use the struct device_node pointer from master spi device instead of passing it as function argument. Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 12 7月, 2010 1 次提交
-
-
由 Anton Vorontsov 提交于
spi_t was removed in commit 644b2a68 ("powerpc/cpm: Remove SPI defines and spi structs"), the commit assumed that spi_t isn't used anywhere outside of the spi_mpc8xxx driver. But it appears that the struct is needed for micropatch code. So, let's reintroduce the struct. Fixes the following build issue: CC arch/powerpc/sysdev/micropatch.o micropatch.c: In function 'cpm_load_patch': micropatch.c:629: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token micropatch.c:629: error: 'spp' undeclared (first use in this function) micropatch.c:629: error: (Each undeclared identifier is reported only once micropatch.c:629: error: for each function it appears in.) Reported-by: NLEROY Christophe <christophe.leroy@c-s.fr> Reported-by: NTony Breeds <tony@bakeyournoodle.com> Cc: <stable@kernel.org> [ .33, .34 ] Signed-off-by: NAnton Vorontsov <avorontsov@mvista.com> Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
-
- 06 7月, 2010 1 次提交
-
-
由 Anatolij Gustschin 提交于
Change annotations from __init/__exit to __devinit/__devexit to get rid of section mismatch warning. Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 04 7月, 2010 4 次提交
-
-
由 Brian Niebuhr 提交于
This patch fixes the setup_transfer logic to account for the case where multiple messages to different SPI devices are in the queue simultaneously. With the current logic, the second message in the queue will end up using the transfer parameters for the previous message in the queue. The fix is to reinitialize the transfer parameters for each message rather than only once on the first message. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Marek Szyprowski 提交于
There are some boards that do not strictly follow SPI standard and use only 3 wires (SCLK, MOSI or MISO, SS) for connecting some simple auxiliary chips and controls them with GPIO based 'spi controller'. In this configuration the MISO or MOSI line is missing (it is not required if the chip does not transfer any data back to host or host only reads data from chip). This patch adds support for such non-standard configuration in GPIO-based SPI controller. It has been tested in configuration without MISO pin. Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Marek Szyprowski 提交于
This patch adds a new flags argument to bitbang_txrx_be_cpha0 and bitbang_txrx_be_cpha1 transfer functions. This enables support for SPI_MASTER_NO_{TX,RX} transfer modes. The change should have no impact on speed of the existing drivers. bitbank_txrx_* functions are usually inlined into the drivers. When the argument is equal to constant zero, the optimizer would be able to eliminate the dead code (flags checks) easily. Tested on ARM and GCC 4.4.x and in all cases the checks were eliminated in the inlined function. Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Cory Maccarrone 提交于
This change fixes 8-bit transfers and RX-only transfers. The SPI100k framework requires minimum 16-bit words to be written, so 8-bit transfers must be shited by 8 bits and sent out as a 16-bit word. Additionally, receive-only transfers were failing due to the perceived need to fill the TX buffer with something. This is in fact not needed. Signed-off-by: NCory Maccarrone <darkstar6262@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 29 6月, 2010 1 次提交
-
-
由 Ernst Schwab 提交于
SPI bus locking API to allow exclusive access to the SPI bus, especially, but not limited to, for the mmc_spi driver. Coded according to an outline from Grant Likely; here is his specification (accidentally swapped function names corrected): It requires 3 things to be added to struct spi_master. - 1 Mutex - 1 spin lock - 1 flag. The mutex protects spi_sync, and provides sleeping "for free" The spinlock protects the atomic spi_async call. The flag is set when the lock is obtained, and checked while holding the spinlock in spi_async(). If the flag is checked, then spi_async() must fail immediately. The current runtime API looks like this: spi_async(struct spi_device*, struct spi_message*); spi_sync(struct spi_device*, struct spi_message*); The API needs to be extended to this: spi_async(struct spi_device*, struct spi_message*) spi_sync(struct spi_device*, struct spi_message*) spi_bus_lock(struct spi_master*) /* although struct spi_device* might be easier */ spi_bus_unlock(struct spi_master*) spi_async_locked(struct spi_device*, struct spi_message*) spi_sync_locked(struct spi_device*, struct spi_message*) Drivers can only call the last two if they already hold the spi_master_lock(). spi_bus_lock() obtains the mutex, obtains the spin lock, sets the flag, and releases the spin lock before returning. It doesn't even need to sleep while waiting for "in-flight" spi_transactions to complete because its purpose is to guarantee no additional transactions are added. It does not guarantee that the bus is idle. spi_bus_unlock() clears the flag and releases the mutex, which will wake up any waiters. The difference between spi_async() and spi_async_locked() is that the locked version bypasses the check of the lock flag. Both versions need to obtain the spinlock. The difference between spi_sync() and spi_sync_locked() is that spi_sync() must hold the mutex while enqueuing a new transfer. spi_sync_locked() doesn't because the mutex is already held. Note however that spi_sync must *not* continue to hold the mutex while waiting for the transfer to complete, otherwise only one transfer could be queued up at a time! Almost no code needs to be written. The current spi_async() and spi_sync() can probably be renamed to __spi_async() and __spi_sync() so that spi_async(), spi_sync(), spi_async_locked() and spi_sync_locked() can just become wrappers around the common code. spi_sync() is protected by a mutex because it can sleep spi_async() needs to be protected with a flag and a spinlock because it can be called atomically and must not sleep Signed-off-by: NErnst Schwab <eschwab@online.de> [grant.likely@secretlab.ca: use spin_lock_irqsave()] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Tested-by: NMatt Fleming <matt@console-pimps.org> Tested-by: NAntonio Ospite <ospite@studenti.unina.it>
-
- 03 6月, 2010 2 次提交
-
-
由 Anatolij Gustschin 提交于
Fixes build errors caused by the: - OF device_node pointer being moved into struct device - removal of the match_table field from struct of_platform_driver Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
This patch fixes a build error caused by the OF device_node pointer being moved into struct device. Fixes bug introduced by commit 61c7a080 (of: Always use 'struct device.of_node' to get device node pointer) Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> CC: Sean MacLennan <smaclennan@pikatech.com> CC: spi-devel-general@lists.sourceforge.net CC: devicetree-discuss@lists.ozlabs.org
-
- 25 5月, 2010 13 次提交
-
-
由 Grant Likely 提交于
Commit 58f9b0b0, "of: eliminate of_device->node and dev_archdata->{of,prom}_node" changed the location of the device_node pointer. Most drivers were converted to the new location, but the xilinx_spi_of driver was missed and now fails to compile. This patch fixes up the xilinx_spi_of driver to use the new location. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Thomas Koeller 提交于
Computation of the clock prescaler value returned bogus results if the requested SPI clock was impossible to set. It now sets either the maximum or minimum clock frequency, as appropriate. Signed-off-by: NThomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 hartleys 提交于
A number of files in drivers/spi fail checkincludes.pl due to the double include of <linux/spi/spi_bitbang.h>. The first include is needed to get the struct spi_bitbang definition and the spi_bitbang_* function prototypes. The second include happens after defining EXPAND_BITBANG_TXRX to get the inlined bitbang_txrx_* utility functions. The <linux/spi/spi_bitbang.h> header is also included by a number of other spi drivers, as well as some arch/ code, in order to use struct spi_bitbang and the associated functions. To fix the double include, and remove any potential confusion about it, move the inlined bitbang_txrx_* functions to a new private header in drivers/spi and also remove the need to define EXPAND_BITBANG_TXRX. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Anatolij Gustschin 提交于
Signed-off-by: NJohn Rigby <jcrigby@gmail.com> Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Mika Westerberg 提交于
This patch adds an SPI master driver for the Cirrus EP93xx SPI controller found in EP93xx chips. Signed-off-by: NMika Westerberg <mika.westerberg@iki.fi> Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Scott Ellis 提交于
Check spi->chip_select for range before use. Signed-off-by: NScott Ellis <scott@jumpnowtek.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Roman Tereshonkov 提交于
Turbo mode allows to read data to shift register when rx-buffer is full thus improving the perfomance. This feature is available for RX-only mode. In PIO turbo mode when the penultimate word is available in RX-buffer the controller should be disabled before reading data to prevent the next transaction triggering. The controller itself handles the last word to be correctly loaded to shift-register and then transferred to RX-buffer. The turbo mode is enabled by setting turbo_mode parameter to 1. This parameter is a part of omap2_mcspi_device_config structure which is passed through the spi_device controller_data pointer. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Roman Tereshonkov 提交于
The value 160 has been obtained as optimal in testing it for wl1271 which use spi for communication. In some sense this change might also influence on other spi devices connected to omap2_mcspi controller. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grzegorz Sygieda 提交于
This fix prevents queue being marked as "stopped", if data exists in the queue list. Signed-off-by: NGrzegorz Sygieda <grzegorz.sygieda@tieto.com> Signed-off-by: NLukasz Baj <lukasz.baj@tieto.com> Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Linus Walleij 提交于
This adds support for a further ST variant of the PL022 called PL023. Some differences in the control registers due to being stripped down to SPI mode only, and a new clock feedback sample delay config setting is available. Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Linus Walleij 提交于
The PL022 SPI driver did not cleanly separate between the original unmodified ARM version and the ST Microelectronics versions. Split this more cleanly and fix some whitespace moaning from checkpatch at the same time. Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Joakim Tjernlund 提交于
This fixes a typo were map_tx_dma is used instead of map_rx_dma, casing the driver to unmap rx_dma when it shouldn't. Signed-off-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Joakim Tjernlund 提交于
QE mode uses Little Endian so words > 8 bits are byte swapped. Workaround this by always enforcing wordsize 8 for words > 8 bits. Unfortunately this will not work for LSB transfers where wordsize is > 8 bits so disable these for now. Also move the different quirks into its own function to keep mpc8xxx_spi_setup_transfer() sane. Signed-off-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 22 5月, 2010 2 次提交
-
-
由 Joakim Tjernlund 提交于
tx_dma/rx_dma are already set to a dummy buffer when no tx/rx buffer and t->tx_dma/t->rx_dma does not contain a dma address, but NULL. This may lead to corruption of kernel memory. Fix this by leaving tx_dma/rx_dma alone. Do not INIT_TX_RX while controller is enabled, this is bad according to the MPC8321 manual. Signed-off-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NSean MacLennan <smaclennan@pikatech.com>
-
- 21 5月, 2010 1 次提交
-
-
由 Syed Rafiuddin 提交于
Change dependency to ARCH_OMAP2PLUS to allow systems based on omap24xx, omap34xx or omap44xx Cc: spi-devel-general@lists.sourceforge.net Signed-off-by: NSyed Rafiuddin <rafiuddin.syed@ti.com> Signed-off-by: NAbraham Arce <x0066660@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 19 5月, 2010 1 次提交
-
-
由 Grant Likely 提交于
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 11 5月, 2010 4 次提交
-
-
由 Haojian Zhuang 提交于
In order to prevent code ambiguous, add namespace on functions in ssp driver. Signed-off-by: NHaojian Zhuang <haojian.zhuang@marvell.com> Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
-
由 Haojian Zhuang 提交于
Signed-off-by: NHaojian Zhuang <haojian.zhuang@marvell.com> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
-
由 Eric Miao 提交于
No need to separate them as they should be together from the begining. Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
-
由 Eric Miao 提交于
The previous definitions of SSCR0_SCR and SSCR0_SerClkDiv() prevented them being used simultaneously when supporting multiple PXA SoCs, esp. in drivers/spi/pxa2xx_spi.c, make them correct. The change from SSCR0_SerClkDiv(2) to SSCR0_SCR(2), will make the result a little bit different in pxa2xx_spi_probe(), however, since that's only used as a default initialization value, it's acceptable. Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
-
- 28 4月, 2010 4 次提交
-
-
由 Roman Tereshonkov 提交于
Replaces %04x by %08x for 32-bits data output. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Roman Tereshonkov 提交于
mcspi_write_chconf0 is used to control rx/tx triggering. Post-write flushing is needed to get the immediate effect. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Roman Tereshonkov 提交于
The memory for dev variable is allocated as a part of spi_device structure memory which the dev belongs to. Thus when the memory is released the right pointer is used. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Roman Tereshonkov 提交于
In success case the function bus_find_device_by_name calls get_device. In our context put_device should be called to decrease the device count usage. Signed-off-by: NRoman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 30 3月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: NTejun Heo <tj@kernel.org> Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-