summaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)Author
2011-10-24spi/pl022: skip default configuration before suspendingVirupax Sadashivpetimath
The loading of the default configuration before suspending has been in the driver since its inception, but it is not really needed. Especially so since we take to all the trouble of enabling and disabling power and clock just to do this. Let's scrap this now. Change-Id: I69c9f5999ba0026f4b82be30f1ffd0a8b1c8ac85 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35019 Reviewed-by: Avinash A <avinash.a@stericsson.com> Tested-by: Avinash A <avinash.a@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-24spi/pl022: disable the PL022 block when unusedVirupax Sadashivpetimath
Make sure we clear the enable bit when the block is not used. This will save some energy in certain hardware versions. Change-Id: I7b1fc03cdd60b56657ae58742273650d1d94a032 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35018 Reviewed-by: Avinash A <avinash.a@stericsson.com> Tested-by: Avinash A <avinash.a@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-24spi/pl022: fix build warningsJonas Aaberg
The driver build complains with newer compilers unless you initialize this struct properly. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Change-Id: Id297b0a9c9cd3fe600b4dbfb1c1f0e7e1c1fcc66 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35017 Reviewed-by: Avinash A <avinash.a@stericsson.com> Tested-by: Avinash A <avinash.a@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-24spi/pl022: only enable RX interrupts when TX is completeChris Blair
For interrupt mode transfers, start with only TX interrupts enabled to reduce the overall number of interrupts received. Once TX is complete, enable RX interrupts to complete the transfer. Change-Id: I8184d865da3f6eacca03d0fa219e862d40b6a797 Signed-off-by: Chris Blair <chris.blair@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35016 Reviewed-by: Avinash A <avinash.a@stericsson.com> Tested-by: Avinash A <avinash.a@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
2011-10-21spi/pl022: Enable clock in probe an use runtime_idleUlf Hansson
Since we are always runtime resumed when leaving probe the clock must be enabled. To accomplish that we are able to be runtime suspended after probe in the case when no request is going to be recieved, a runtime_idle function has been implemented. Change-Id: I6cb86f2cad30ecaab16f512daf4674b039b18213 Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34447
2011-10-20ARM: 7079/1: spi: Fix builderror in spi-pl022.cPeter Hüwe
This patch fixes a build error, introduced by commit (67fc8b9f, "PM: add runtime PM support to core Primecell driver") which unfortunately was a little bit incomplete and did contain a typo (11 instead of 22). I'm not sure how this patch could have been tested back then, if it doesn't even compile ;) The build failure was: drivers/spi/spi-pl022.c:2292: error: 'adev' undeclared (first use in this function) drivers/spi/spi-pl022.c:2344: error: 'pl022_suspend' undeclared here (not in a function) The build failure appears e.g. for the u8500 and realview defconfig. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Change-Id: I01cdbe9b4c1108011bda408a9b28b35f058547bd Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34446 Reviewed-by: Christopher BLAIR <chris.blair@stericsson.com> Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
2011-10-20PM: add runtime PM support to core Primecell driverRussell King
Add runtime PM support to the core Primecell driver, following the PCI model of how this is done. Rather than having every driver fiddle about with enabling runtime PM, that's dealt with in the core and instead, drivers just do a put() in their probe and a balancing get() in their remove function to activate runtime PM for the device. As we're dealing with enabling runtime PM in the core, fix up spi-pl022 as it must not enable and disable runtime PM itself anymore. Tested-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Change-Id: Ia53383b68fdc189823f79445ddea0fceae127238 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34445 Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com> Reviewed-by: Christopher BLAIR <chris.blair@stericsson.com>
2011-10-17spi/spi-pl022: Call pl022_dma_remove(pl022) only if enable_dma is trueViresh Kumar
pl022_dma_remove() should be called only if enable_dma is true. There is no point calling it when pl022_dma_probe() is not called, which again depends on enable_dma. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: Ib39b55c55a657ceab8b2782fd95c6d396a767171 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34215 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/spi-pl022: calculate_effective_freq() must set rate <= requested rateViresh Kumar
There were few issues with calculate_effective_freq() routine: - It was returning first rate found >= requested rate. Now, if system have spi's rate as 83 MHz, with possible prescaled rates as 83, 41.5, 20.75, 13.83 (as we can prescale with multiples of 2). If user has given rate to be programmed as 22 MHz, then driver programmes it to 41.5 MHz. This looks to be incorrect, as user might have given the upper limit of the device, and we are programming it above it. - Driver finds the first satisfying rate and programmes it, but with other values of scr & cpsdvsr, it is possible to get more closer rate. This patch fixes these two issues, with some reformatting inside the code. This also creates a inline routine to calculate prescaled rate based on spi's rate, cpsdvsr and scr. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: If7f0d672d9b82a1d15eecd8ac92d95d9ff064bf2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34214 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/spi-pl022: Don't allocate more sg than required.Viresh Kumar
In routine configure_dma(), if transfer->len = PAGE_SIZE, then pages is one more than required. While leads to one more sg getting allocated. This is wrong. Correct this to allocate correct number of sg. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: I853c92d0efae2dab32a76e21d4319fa172317331 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34213 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/spi-pl022: Use GFP_ATOMIC for allocation from taskletViresh Kumar
tasklets don't allow invocation to sleeping routines. In configure_dma() routine, sg_alloc_table() was called with GFP_KERNEL flag and so this causes crash when called from tasklet. Replace GFP_KERNEL with GFP_ATOMIC to get this fixed. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: I15b94ca35abbd099712cb0789e1f196a762b5095 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34212 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/spi-pl022: Resolve formatting issuesViresh Kumar
There were few formatting related issues in code. This patch fixes them. Fixes include: - Remove extra blank lines - align code to 80 cols - combine several lines to one line - Replace multiple spaces with tabs - Remove spaces before labels Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: Id0d608fb8ad47c260b882819f85566eacfd187b4 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34211 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/pl022: remove function cannot exitLinus Walleij
The remove function in the PL022 driver cannot abort the remove function any way, so restructure the code so as not to make that assumption. Remove will now proceed no matter whether it can stop the transfer queue or not. Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: Iaa06640f339228657b0b0e20af96284c77180eba Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34210 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/pl022: strengthen FIFO watermark level checksLinus Walleij
The platform configuration can select custom FIFO watermarks, but these may conflict the actual FIFO size of the PL022 variant if set too high. So strengthen the sanity checks to deny any conflicting settings. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: Ia74a7eb3fcaa269aafef53daf7cc7c249d96594d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34209 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/pl022: support runtime PMRabin Vincent
Insert notifiers for the runtime PM API. With this the runtime PM layer kicks in to action where used. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> [Rebased to Linux 3.0-rc3, edit description] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: I4852e8975337dd07ed5d410ee9a79481a153e09c Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34208 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17spi/pl022: initialize burstsize from FIFO trigger levelLinus Walleij
Configure the DMA burstsize from the FIFO trigger level supplied with the controller configuration data. This is based on a patch from Virupax, but I rewrote it differently. Reported-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: I7a47f731dc7ef00bb905966b816a40d41ef967ee Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34207 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17Ugly-rename amba-pl022 to spi-pl022Linus Walleij
This ugly renaming of the file amba-pl022 to spi-pl022 is done in order to be able to apply PL022 patches from the mainline kernel without hazzle. Grant reorganized all the drivers but to apply his original renaming patch we would have to bring in all patches to all *other* drivers up to that point, which would in turn bring in a large portion of the kernel 3.1 baseline - let's not go there. This is ugly but the alternatives are uglier. When rebasing to a kernel later than this one, remove this patch and use mainline commits as far as possible. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Change-Id: If5a453371f46b09af88febdd03319d1f2fcb612b Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34206
2011-10-17Revert "amba-pl022: Initialize burstsize from FIFO trigger level"Linus Walleij
This reverts commit 7e591da7370c8b843a60ad55a0db944abedb094a. Change-Id: Icb189c8a4f5d3e45d78d0eef6e8f32a6d97a944f Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34205 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17Revert "amba-pl022: Add loopback support for the SPI on 5500"Linus Walleij
This reverts commit 437147f07146843488860f40cafdee22c1ba353f. Change-Id: I239e010168f7a55ba7f1db9d343670948b4dd5dc Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34204 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17Revert "amba-pl022: Clear SSE once the transfer is completed"Linus Walleij
This reverts commit 015a0108f545d8ccd0b961bfcf56a3a1bcdd502d. Change-Id: Ibd21c4e21dd919395874ab13d16f9074105fff1a Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34203 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-10-17Revert "SPI: amba-pl022: Fix build warnings"Linus Walleij
This reverts commit e9bbf70410a2472c75619370e3ac40c344889553. Change-Id: Ic6b0187765169638a11aa4ffd1c2fa57b6809e6d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34202 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
2011-09-19SPI: amba-pl022: Fix build warningsJonas Aaberg
ST-Ericsson Linux next: Not tested, ask SSM for ER ST-Ericsson ID: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iaa6b6064e2f55081ffed82d3791ecfbb2e6dd9b4 Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
2011-09-19amba-pl022: Clear SSE once the transfer is completedVirupax Sadashivpetimath
Clear SSE after the xfer completion and remove the not needed default register restoration in suspend. ST-Ericsson ID: ER 316546 Change-Id: I73368e18bd55abdff6b1909239bcf5b64583b452 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
2011-09-19ux500: Fix warningsPhilippe Langlais
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
2011-09-19amba-pl022: Add loopback support for the SPI on 5500Philippe Langlais
Add new amba-pl022 vendor for the DB5500 pl023, as the pl023 on db8500 and db5500 vary. Signed-off-by: Prajadevi H <prajadevi.h@stericsson.com> Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
2011-09-19mach-ux500: delete SSP PrimeCell IDPhilippe Langlais
This is redundant. The correct ID number is right there in the hardware anyway. We will introduce a mechanism later to hard-code this for deviant cells. Signed-off-by: Linus Walleij <linux.walleij@linaro.org>
2011-09-19spi: add stm msp driverRobert Marklund
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
2011-09-19amba-pl022: Initialize burstsize from FIFO trigger levelRobert Marklund
amba-pl022: support runtime PM Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
2011-07-21spi/tegra: add devicetree supportGrant Likely
Allow the tegra spi driver to obtain populate the spi bus with devices from the device tree. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-06spi/s3c64xx: Bug fix for SPI with different FIFO levelPadmavathi Venna
The existing macro fails for following scenarios. 1) S5P64X0 channel 1 2) S5PV210 channel 1 The FIFO data level supported in the above SoCs either 64 or 256 bytes depending on the channel. Because of this the TX_DONE is the 25 bit in the status register. The existing macro works for the following scenarios 1) S3C6410 all channels 2) S5PC100 all channels The FIFO data level supported in the above SoCs 64 bytes on all the channels. Because of this the TX_DONE is the 21 bit in the status register. So when we use the existing macro for the non-working SoCs it is not anding with the TX_DONE bit for transmission status check. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-06-17spi/bfin_spi: fix handling of default bits per word settingMike Frysinger
The default bits per word setting should be 8 bits, but since most of our devices have been explicitly setting this up, we didn't notice when the default stopped working. At the moment, any default transfers without an explicit bit size setting error out with: bfin-spi bfin-spi.0: transfer: unsupported bits_per_word So in the transfer logic, have a bits_per_word setting of 0 fall into the 8 bit transfer logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-13spi-pl022: Add missing return value updateVirupax Sadashivpetimath
Return error on out of range cpsdvsr value. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-03spi/omap2: fix uninitialized variableGovindraj.R
fixes below compilation warning. The variable doesn't actual ever get used uninitialized, but that's no reason to be sloppy. drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma': drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this function Signed-off-by: Govindraj.R <govindraj.raja@ti.com> [grant.likely: amended description] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-27spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheralCliff Cai
The Blackfin SPORT peripheral is a pretty flexible device. With enough coaching, we can make it generate SPI compatible waveforms. This is desirable as the SPORT can run at much higher clock frequencies than the dedicated on-chip SPI peripheral, and it can do full duplex DMA. It also opens up the possibility of multiple SPI buses in case someone wants to dedicate a whole bus to a specific part that does not play well with others. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26spi/tle620x: add missing device_remove_file()Axel Lin
This patch includes below fixes: 1. Add missing device_remove_file for dev_attr_status_show in tle62x0_remove. 2. Fix tle62x0_probe error handling: Currently, if the error happens when ptr > 0, gpio_attrs[0] is not properly remove. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-26Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (57 commits) regulator: Fix 88pm8607.c printk format warning input: Add support for Qualcomm PMIC8XXX power key input: Add Qualcomm pm8xxx keypad controller driver mfd: Add omap-usbhs runtime PM support mfd: Fix ASIC3 SD Host Controller Configuration size mfd: Fix omap_usbhs_alloc_children error handling mfd: Fix omap usbhs crash when rmmoding ehci or ohci mfd: Add ASIC3 LED support leds: Add ASIC3 LED support mfd: Update twl4030-code maintainer e-mail address mfd: Correct the name and bitmask for ab8500-gpadc BTempPullUp mfd: Add manual ab8500-gpadc batt temp activation for AB8500 3.0 mfd: Provide ab8500-core enumerators for chip cuts mfd: Check twl4030-power remove script error condition after i2cwrite mfd: Fix twl6030 irq definitions mfd: Add phoenix lite (twl6025) support to twl6030 mfd: Avoid to use constraint name in 88pm860x regulator driver mfd: Remove checking on max8925 regulator[0] mfd: Remove unused parameter from 88pm860x API mfd: Avoid to allocate 88pm860x static platform data ...
2011-05-26Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails spi/spi_s3c24xx: Use spi_bitbang_stop instead of spi_unregister_master in s3c24xx_spi_remove spi/spi_nuc900: Use spi_bitbang_stop instead of spi_unregister_master in nuc900_spi_remove spi/spi_tegra: use spi_unregister_master() instead of spi_master_put() spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path spi: Use void pointers for data in simple SPI I/O operations spi/pl022: use cpu_relax in the busy loop spi/pl022: mark driver non-experimental spi/pl022: timeout on polled transfer v2 spi/dw_spi: improve the interrupt mode with the batch ops spi/dw_spi: change poll mode transfer from byte ops to batch ops spi/dw_spi: remove the un-necessary flush() spi/dw_spi: unify the low level read/write routines
2011-05-26mfd: Use mfd cell platform_data for timberdale cells platform bitsSamuel Ortiz
With the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-24coldfire_qspi compile fixSteven King
The m68k/m68knommu merge broke the qspi build. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-20spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe failsViresh Kumar
If pl022_dma_probe fails, we can try to transfer data in polling or interrupt mode. Also, set platform_info->enable_dma to 0, so that no other code tries to use dma. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/spi_s3c24xx: Use spi_bitbang_stop instead of spi_unregister_master in ↵Axel Lin
s3c24xx_spi_remove Calling spi_bitbang_stop() will also destroy bitbang->workqueue, which is created by calling spi_bitbang_start() in s3c24xx_spi_probe(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/spi_nuc900: Use spi_bitbang_stop instead of spi_unregister_master in ↵Axel Lin
nuc900_spi_remove Calling spi_bitbang_stop() will also destroy bitbang->workqueue, which is created by calling spi_bitbang_start() in nuc900_spi_probe(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/spi_tegra: use spi_unregister_master() instead of spi_master_put()Axel Lin
spi_master_put() should only be used in error handling. Once spi_register_master() returns success, we should call spi_unregister_master() instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove pathAxel Lin
spi_master_put() should only be used in error handling. Once spi_register_master() returns success, we should call spi_unregister_master() instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi: Use void pointers for data in simple SPI I/O operationsMark Brown
Currently the simple SPI I/O operations all take pointers to u8 * buffers to operate on. This creates needless type compatibility issues and the underlying spi_transfer structure uses void pointers anyway so convert the API over to take void pointers too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/pl022: use cpu_relax in the busy loopLinus Walleij
This relaxes the cpu in the polling busy-wait loop. Reported-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/pl022: mark driver non-experimentalLinus Walleij
This driver has no TODO, and is now used on several platforms: ARM, U300, Ux500, SPEAr and more. So drop the EXPERIMENTAL requirement. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20spi/pl022: timeout on polled transfer v2Magnus Templing
This adds the missing handling of polling timeouts and deletes our last todo. Signed-off-by: Magnus Templing <magnus.templing@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> [Fixups from review by Wolfram Sang] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-20Merge commit 'v2.6.39' into spi/nextGrant Likely
2011-05-18Haavard Skinnemoen has left AtmelJean Delvare
Haavard's e-mail address at Atmel is no longer valid. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>