- 18 11月, 2010 7 次提交
-
-
由 Brian Niebuhr 提交于
Let davinci_spi_chipselect() perform both activation and deactivation of chip selects. This lets spi_bitbang fully control chip select activation, as intended by the SPI API. With this change, the chip select activation code need not be duplicated in davinci_spi_bufs_{pio|dma}(). Also, keeping chip select active control is removed as a platform data and simply controlled using information from spi_bitbang on whether chip slect should be activated or de-activated. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Quit writing the same constant value determining the chip-select mode when no transmissions are in progress in davinci_spi_chipelect(). Instead just setup the SPIDEF register once during probe. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Sekhar Nori 提交于
The typecasting of SPI base address to davinci_spi_reg is unused. Remove it. Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Tested-By: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Sekhar Nori 提交于
Remove unused defines from code which should help in easy reading of code. Also, use the opportuinity to keep the SPIGCR1 register defines together. Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Tested-By: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
The 'pdata' variable is unused in couple of routines. Remove such occurences. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Cleanup unnecessary white space from various parts of the file. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Fix the following checkpatch error: WARNING: unnecessary whitespace before a quoted newline + dev_info(&pdev->dev, "Controller at 0x%p \n", davinci_spi->base); Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
- 26 10月, 2010 1 次提交
-
-
由 Erik Gilling 提交于
avoids derefencing an uninitialized pointer Change-Id: Icf528441ae481e9f6f5ddc0be32c7c217fa49701 Signed-off-by: NErik Gilling <konkers@android.com>
-
- 22 10月, 2010 5 次提交
-
-
由 Linus Walleij 提交于
This patch removes convention of passing a static string as a parameter to another static string. The convention is intended to reduce text usage by sharing the common bits of the string, but the implementation is inherently fragile (a change to one format string but not the other will nullify any possible advantage), it isn't necessarily a net win depending on what this compiler does, and it it reduces code readability. Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com> [grant.likely@secretlab.ca: removed dev_dbg->dev_err hunk] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Michael Hennerich 提交于
The gpiolib code does not allow people to do gpio_request() on a GPIO once it has already been requested. So make sure we only request the pin on the first setup of a SPI device. Otherwise, if you attempts to reconfigure a SPI device on the fly (like change bit sizes), the setup function incorrectly fails. Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Michael Hennerich 提交于
The error interrupt on the BF537 SIC cannot be enabled on a per-peripheral basis. Once the error interrupt is enabled for one peripheral, it is automatically enabled for all. So in the Blackfin on-chip SPI driver, we need to clear out these known errors in the data interrupt once we've successfully finished processing all of the pending data. Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Feng Tang 提交于
Currently spi_register_board_info() has to be called before its related spi_master be registered, otherwise these board info will be just ignored. This patch will remove this order limit, it adds a global spi master list like the existing global board info listr. Whenever a board info or a spi_master is registered, the spi master list or board info list will be scanned, and a new spi device will be created if there is a master-board info match. Signed-off-by: NFeng Tang <feng.tang@intel.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Erik Gilling 提交于
v2 changes: from Thierry Reding: * add "select TEGRA_SYSTEM_DMA" to Kconfig from Grant Likely: * add oneline description to header * inline references to DRIVER_NAME * inline references to BUSY_TIMEOUT * open coded bytes_per_word() * spi_readl/writel -> spi_tegra_readl/writel * move transfer validation to spi_tegra_transfer * don't request_mem_region iomem as platform bus does that for us * __exit -> __devexit v3 changes: from Russell King: * put request_mem_region back int from Grant Likely: * remove #undef DEBUG * add SLINK_ to register bit defines * remove unused bytes_per_word * make spi_tegra_readl/writel static linine * various refactoring for clarity * mark err if BSY bit is not cleared after 1000 retries * move spinlock to protect setting of RDY bit * subsys_initcall -> module_init v3 changes: from Grant Likely: * update spi_tegra to use PTR_ERRless dma API v4 changes: from Grant Likely: * remove empty spi_tegra_cleanup fucntion * allow device ids of -1 Signed-off-by: NErik Gilling <konkers@android.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Thierry Reding <thierry.reding@avionic-design.de> Cc: Russell King <linux@arm.linux.org.uk> spi: tegra: cleanups from upstream review Change-Id: Icecf7e64efcb39de072a15234ba1faa4bad40d25 Signed-off-by: NErik Gilling <konkers@android.com>
-
- 21 10月, 2010 2 次提交
-
-
由 Ilkka Koskinen 提交于
In case of TX only with DMA, the driver assumes that the data has been transferred once DMA callback in invoked. However, SPI's shift register may still contain data. Thus, the driver is supposed to verify that the register is empty and the end of the SPI transfer has been reached. Signed-off-by: NIlkka Koskinen <ilkka.koskinen@nokia.com> Tested-by: NTuomas Katila <ext-tuomas.2.katila@nokia.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Jason Wang 提交于
In the TX_ONLY transfer, the SPI controller also receives data simultaneously and saves them in the rx register. After the TX_ONLY transfer, the rx register will hold the random data received during the last tx transaction. If the direct following transfer is RX_ONLY, this random data has the possibility to affect this transfer like this: When the SPI controller is changed from TX_ONLY to RX_ONLY, the random data makes the rx register full immediately and triggers a dummy write automatically(in SPI RX_ONLY transfers, we need a dummy write to trigger the first transaction). So the first data received in the RX_ONLY transfer will be that random data instead of something meaningful. We can avoid this by inserting a Disable/Re-enable toggle of the channel after the TX_ONLY transfer, since it purges the rx register. Signed-off-by: NJason Wang <jason77.wang@gmail.com> Tested-by: NGrazvydas Ignotas <notasas@gmail.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 18 10月, 2010 25 次提交
-
-
由 Mike Frysinger 提交于
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Michael Hennerich 提交于
Some systems using this bus sometimes have very basic devices on them such as regulators. So we need to be loaded even earlier in case the devices are used by things such as early board init code. Therefore register in subsys_initcall(). Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Bob Liu 提交于
Currently, if the bits_per_word when doing a transfer is not 8bits, we always treat it as 16bits when we should actually be returning an error. Signed-off-by: NBob Liu <lliubbo@gmail.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
When the hardware is controlling the CS, there are some SPI options we are unable to support. So issue a warning in the hopes that the user will change to a SPI mode where we can support things sanely. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Rob Maris 提交于
Signed-off-by: NRob Maris <maris.rob@vdi.de> Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Rob Maris 提交于
Signed-off-by: NRob Maris <maris.rob@vdi.de> Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
Who knows what people will try! Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
Using disable_irq() on the IRQ whose handler we are currently executing in can easily lead to a hang. So use the nosync variant here. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
While combining things, also switch to the proper SPI bit define names. This lets us punt the rarely used SPI defines. Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
During runtime, the spi setup function may be called multiple times on the same device in order to reconfigure some settings on the fly. When this happens, we need to reset the ctl_reg bits so that changing the mode works as expected. Reported-by: NAndy Getzendanner <james.getzendanner@students.olin.edu> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
This reduces duplication between the setup/transfer functions and keeps values cached during setup from overriding values changed on a transfer basis (like bits_per_word). Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Yi Li 提交于
Using disable_irq() on the IRQ whose handler we are currently executing in can easily lead to a hang. So use the nosync variant here. Signed-off-by: NYi Li <yi.li@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
Sometimes under load, the Blackfin core is able to send SPI register updates out before the controller is actually disabled. So when we go to reprogram the entire state (to switch to a different slave), make sure we sync after disabling the controller. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
We can't rely on the SPI_CTL/SPI_FLG registers retaining their state when suspending, so save/restore their entire values. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
The common SPI layers take care of detecting CS conflicts and preventing two devices from claiming the same CS. This causes problems for the GPIO CS support we currently have as we are using CS0 to mean "GPIO CS". But if we have multiple devices using a GPIO CS, the common SPI layers see multiple devices using the virtual "CS0" and reject any such attempts. To make both work, we introduce an offset define. This represents the max number of hardware CS values that the SPI peripheral supports. If the CS is below this limit, we know we can use the hardware CS. If it's above, we treat it as a GPIO CS. This keeps the CS unique as seen by the common code and prevents conflicts. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
This lets us push the short SPI MMR bit names out of the global namespace. Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
The driver that we based ours on uses a little extra memory behind the normal driver state, but we don't. So drop this useless bit of memory. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
The current structure names are a bit confusing as to what they represent, so use better names. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
Rather than having to look up the same 3 sets of functions at the same time, just use an ops structure so we only need to set one pointer. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
No point in creating our own version of true/false defines when there is already a standard stdbool available to us. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
The chip ops should always be initialized, so having null fallback functions are useless. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Mike Frysinger 提交于
As David points out, the cs_change_per_word option isn't standard, nor is anyone actually using it. So punt all of the dead code considering it makes up ~10% of the code size. Reported-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Barry Song 提交于
The CS helper functions were toggling both the Flag Enable and the Flag Value bits, but the Flag Value bit is ignored if the corresponding Flag Enable bit is cleared. So under high speed transactions, the CS sometimes would not toggle properly. Since it makes no sense to toggle the Flag Enable bit dynamically when we actually want to control the Flag Value, do this when setting up the device and then only handle toggling of the CS value during runtime. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-
由 Yi Li 提交于
The current behavior in PIO mode is to poll the SPI status registers which can obviously lead to higher latencies when doing a lot of SPI traffic. There is a SPI interrupt which can be used instead to signal individual completion of transactions. Signed-off-by: NYi Li <yi.li@analog.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
-