summaryrefslogtreecommitdiffstats
path: root/drivers/spi
Commit message (Collapse)AuthorAgeFilesLines
*-----. Merge remote-tracking branches 'spi/fix/bcm63xx', 'spi/fix/doc', ↵Mark Brown2015-11-304-16/+43
|\ \ \ \ | | | | | | | | | | | | | | | 'spi/fix/mediatek' and 'spi/fix/pl022' into spi-linus
| | | | * spi: pl022: handle EPROBE_DEFER for dmaRabin Vincent2015-11-231-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle EPROBE_DEFER explicitly so that we ensure that we get the DMA channel specified in the device tree, instead of depending on the DMA controller getting probed before us. Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: mediatek: single device does not require cs_gpiosNicolas Boichat2015-11-161-8/+18
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When only one device is present, it is not necessary to specify cs_gpios, as the CS line can be controlled by the hardware module. Without this patch, older device tree bindings used before 37457607 "spi: mediatek: mt8173 spi multiple devices support" would cause a panic on boot. This fixes the crash, and re-introduces backward compatibility. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Acked-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: Add missing kerneldoc description for parameterThierry Reding2015-11-101-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ca5d24854210 ("spi: Add THIS_MODULE to spi_driver in SPI core") adds the new __spi_register_driver() function, but keeps the kerneldoc for the spi_register_driver() function in place and forgets to add the description for the new owner parameter. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: bcm63xx: use correct format string for printing a resourceArnd Bergmann2015-11-161-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | With a 64-bit resource_size_t, we get a build warning on bcm63xx_spi_probe: drivers/spi/spi-bcm63xx.c:565:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] As we are printing a resource, we can just use the %pr format specifier that pretty-prints the address and avoids the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: bugfix: spi_message.transfer_length does not get resetMartin Sperl2015-11-271-0/+1
|/ | | | | | | | | | When submitting an identical spi_message multiple times via spi_sync the spi_message.frame_length does not get reset to 0 in __spi_validate before adding up all spi_transfer.len resulting in frame_length > actual_length on all but the first spi_sync call. Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*---. Merge remote-tracking branches 'spi/topic/s3c64xx', 'spi/topic/ti-qspi' and ↵Mark Brown2015-11-043-80/+53
|\ \ \ | | | | | | | | | | | | 'spi/topic/txx9' into spi-next
| | | * spi: txx9: Use transfer speed unconditionallyJarkko Nikula2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core validates the transfer speed and defaults to spi->max_speed_hz in case the transfer speed is not set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: ti-qspi: improve ->remove() callbackFelipe Balbi2015-10-301-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there's no need to call pm_runtime_get_sync() followed by pm_runtime_put(). We should, instead, just call pm_runtime_put_sync() and pm_runtime_disable(). Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: spi-ti-qspi: switch to polling mode for better r/w performanceVignesh R2015-10-161-54/+20
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently word completion interrupt is fired for transfer of every word(8bit to 128bit in size). This adds a lot of overhead, and decreases r/w throughput. It hardly takes 3us(@48MHz) for 128bit r/w to complete, hence its better to poll on word complete bit to be set in QSPI_SPI_STATUS_REG instead of using interrupts. This increases the throughput by 30% in both read and write case. So, switch to polling mode instead of interrupts to determine completion of word transfer. Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: s3c64xx: Use transfer speed unconditionallyJarkko Nikula2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | SPI core validates the transfer speed and defaults to spi->max_speed_hz in case the transfer speed is not set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: s3c64xx: replace clock disabling with runtime PM suspend call in remove ↵Heiner Kallweit2015-09-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function Simplify s3c64xx_spi_remove by replacing the clock disabling with calling runtime PM suspend which does the same. Waking up the device if it was suspended wouldn't be strictly needed for this driver but using pm_runtime_get_sync is cleaner and makes s3c64xx_spi_remove more consistent with the runtime PM handling in s3c64xx_spi_setup. pm_runtime_force_suspend does most of the work for us: disabling the clocks, disabling runtime PM and setting it to "suspended" state. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: s3c64xx: simplify suspend / resume handlersHeiner Kallweit2015-09-141-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime PM suspend / resume handlers take care of the enabling/ disabling the clocks already. Therefore replace the duplicated clock handling with pm_runtime_force_suspend/resume. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: s3c64xx: extend driver to make full use of runtime PM autosuspendHeiner Kallweit2015-09-141-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the driver to make full use of runtime PM autosuspend. Before only the SPI core was instructed to use autosuspend by setting master->auto_runtime_pm. Nevertheless due to the missing pm_runtime_use_autosuspend call autosuspend wasn't active. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: s3c64xx: clean up runtime PM if driver registration failsHeiner Kallweit2015-09-141-1/+4
| |/ | | | | | | | | | | | | | | Fix missing runtime PM cleanup if driver registration fails. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
| \
| \
| \
| \
*-------. \ Merge remote-tracking branches 'spi/topic/omap-100k', ↵Mark Brown2015-11-048-138/+174
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'spi/topic/omap-uwire', 'spi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next
| | | | | * | spi: pxa2xx: Rework self-initiated platform data creation for non-ACPIJarkko Nikula2015-10-301-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the pxa2xx_spi_acpi_get_pdata() so that it can create platform data also on platforms that do not support ACPI or if CONFIG_ACPI is not set. Now it is expected that "pxa2xx-spi" platform device is either created with explicit platform data or has an ACPI companion device. However there is only little in pxa2xx_spi_acpi_get_pdata() that is really dependent on ACPI companion and it can be reworked to cover also cases where "pxa2xx-spi" device doesn't have ACPI companion and is created without platform data. Do this by renaming the pxa2xx_spi_acpi_get_pdata(), moving it outside of CONFIG_ACPI test and changing a few runtime tests there to support non-ACPI case. Only port/bus ID setting based on ACPI _UID is dependent on ACPI and is moved to own function inside CONFIG_ACPI. Purpose of this to support non-ACPI case for those PCI enumerated compound devices that integrate both LPSS SPI host controller and integrated DMA engine under the same PCI ID and which are registered in MFD layer instead of in spi-pxa2xx-pci.c. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Add support for Intel BroxtonJarkko Nikula2015-10-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LPSS SPI in Intel Broxton is otherwise the same than in Intel Sunrisepoint but it supports up to four chip selects per port and has different FIFO thresholds. Patch adds support for two Broxton SoC variants. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signalsJarkko Nikula2015-10-301-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI capabilities register located in private registers space of newer Intel LPSS SPI host controllers tell in register bits 12:9 which chip select signals are enabled. Use that information for detecting the number of chip selects. For simplicity we assume chip selects are enabled one after another without disabled chip selects between. For instance CS0 | CS1 | CS2 but not CS0 | CS1 | CS3. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Add output control for multiple Intel LPSS chip selectsJarkko Nikula2015-10-301-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel LPSS SPI host controllers in upcoming Intel platforms can have up to 4 chip selects per port. Extend chip select control in lpss_ssp_cs_control() by adding a code that selects the active chip select output prior to changing the state. Detection for number of enabled chip select signals will be added by another patch. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specificJarkko Nikula2015-10-301-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename a few defines that are specific to Intel LPSS SPI private registers with LPSS prefix. It makes easier to distinguish them from common defines. Suggested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Align a few definesJarkko Nikula2015-10-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add more indentation to define lines for making them aligned with the longest one. They would look messy after adding more long defines. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip selectJarkko Nikula2015-10-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upcoming Intel platforms use LPSS SPI_CS_CONTROL register bits 15:12 for configuring the chip select polarities. Touch only chip select SW mode and state bits when enabling the software chip select control in order to not clear any other bits in the register. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Convert unique ID string of ACPI device as unsigned integerJarkko Nikula2015-10-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andy noticed numeric unique device ID is unsigned integer so convert it using kstrtouint(). Actually integer in ACPI 2.0 and later is 64 bits litte-endian unsigned integer but quite certainly having so big value here would mean something extra than just the SPI bus number so it won't hurt to assume only lower 32 bits carry the bus number for now. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: derive struct chip_data from struct drv_dataAndy Shevchenko2015-10-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we call pxa2xx_ssp_get_clk_div() from pump_transfers() we may derive pointer to struct chip_data from struct drv_data like it's done in the rest of the functions. This will make it less errorprone. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: move debug messages to pump_transfer()Andy Shevchenko2015-10-231-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The speed can be changed from transfer to transfer, that's why the messages do not depict the actual values during ->setup(). Move debug messages from ->setup() to pump_transfers(). Get rid of leftovers as well. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: choose closest lower speedAndy Shevchenko2015-10-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per discussion [1] the best choice is to set closest speed which is not going over the asked one. Do the same approach for Intel Quark boards. [1] http://www.spinics.net/lists/linux-spi/msg03389.html Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Remove empty function pxa2xx_spi_dma_resume()Mika Westerberg2015-10-013-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was leftover from the legacy pxa2xx DMA implementation and not needed anymore so remove it. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Use ACPI_COMPANION() instead of acpi_bus_get_device()Jarkko Nikula2015-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get pointer to the struct acpi_device by using ACPI_COMPANION() macro. This is more efficient than using ACPI_HANDLE() and acpi_bus_get_device(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Set the max_speed_hz of the masterJarkko Nikula2015-09-252-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Carry input clock of the controller in max_speed_hz of struct spi_master instead of in own driver data. They mean the same thing and more over now the max_speed_hz is not even set here. As an added bonus this allows SPI core to validate that transfer speed is not beyond the maximum input clock. This is not a problem in spi-pxa2xx as the driver doesn't use transfer speed parameter directly but via input clock divider calculation which will top at divide by one. However it's better to validate speed before passing it here. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Remove cr0 variable from struct chip_dataJarkko Nikula2015-09-172-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There hasn't been need to carry chip->cr0 after SPI core started to validate speed_hz and bits_per_word transfer parameters. That effectively caused that pump_transfers() always recalculated it and practically chip->cr0 is used locally in setup() for debug prints only. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Remove if statement that is always true in pump_transfers()Jarkko Nikula2015-09-171-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is continuation to previous commit by separating unindentation from variable removal done in previous commit. As said SPI core have validated both the speed_hz and bits_per_word and the if statement here evaluates always to true. Remove the test and unindent the code block accordingly. While at it remove also needless "cr0 = chip->cr0" as cr0 will be overwritten anyway and fix block comment style. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: pxa2xx: Remove two variables from struct chip_dataJarkko Nikula2015-09-172-12/+2
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to carry spi->max_speed_hz and spi->bits_per_word from setup() in "struct chip_data" since pump_transfers() will anyway take the transfer parameters from "struct spi_transfer". This is since SPI core validates both bits_per_word and speed_hz transfer parameters and defaults to spi->bits_per_word and spi->max_speed_hz in case these per transfer parameters are not set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi: pxa2xx: Remove unused psp member variable from struct chip_dataJarkko Nikula2015-10-021-1/+0
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not used since commit 8d94cc50aa4f ("[PATCH] spi: stabilize PIO mode transfers on PXA2xx systems"). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: Drop owner assignment from spi_driversAndrew F. Davis2015-10-282-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: Add THIS_MODULE to spi_driver in SPI coreAndrew F. Davis2015-10-281-3/+4
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add spi_register_driver helper macro that adds THIS_MODULE to spi_driver for the registering driver. We rename and modify the existing spi_register_driver to enable this. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: omap-uwire: Remove needless bits_per_word and speed_hz testsJarkko Nikula2015-09-171-3/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core validates both bits_per_word and speed_hz transfer parameters and defaults to spi->bits_per_word and spi->max_speed_hz in case these per transfer parameters are not set. This allows to remove two needless tests from uwire_txrx() and uwire_setup_transfer(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: omap-100k: Rely on validations done by spi coreJarkko Nikula2015-09-171-18/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core validates both bits_per_word and speed_hz transfer parameters and defaults to spi->bits_per_word and spi->max_speed_hz in case these per transfer parameters are not set. This allows to remove a few if statements around per transfer bits_per_word and speed_hz tests as they evaluate always to true. Also defaulting word_len to 8 is needless since spi_setup() has already made sure spi->bits_per_word is 8 in case it is not set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
| \
| \
| \
| \
*-------. \ Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/mpc512x', ↵Mark Brown2015-11-046-65/+93
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'spi/topic/mtk', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
| | | | | * | spi: octeon: Use transfer speed unconditionallyJarkko Nikula2015-09-161-1/+1
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core validates the transfer speed and defaults to spi->max_speed_hz in case the transfer speed is not set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi: oc-tiny: Use of_property_read_u32 instead of open-coding itTobias Klauser2015-09-161-9/+5
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of_property_read_u32 instead of of_get_property with return value checks and endianness conversion. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: mediatek: mt8173 spi multiple devices supportLeilk Liu2015-10-271-13/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mt8173 IC spi HW has 4 gpio group, it's possible to support max <= 4 slave devices, even mtk spi HW is not congruent to spi core. 1. When a device do a spi_message transfer, spi HW should know which pad-group this device is on, and then writes pad-select register. 2. Mtk pad-select register just selects which MISO pin HW will receive data. For example, pad-select=1(select spi1 pins), HW just receives data from spi1 MISO, but it still send waveform to all 4 group cs/clk/mosi. If cs pin in other groups is still spi mode, after spi1 is selected(by active cs pin), devices on other group will also be selected. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: mediatek: handle controller_data in mtk_spi_setupLeilk Liu2015-10-271-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | controller_data is related with device, so move to master->setup function. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: mediatek: remove mtk_spi_configLeilk Liu2015-10-271-33/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtk_spi_config() and mtk_spi_prepare_message() both initialize spi register, so remove mtk_spi_config() and init all register in mtk_spi_prepare_message(). Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | spi: mpc512x: Call mpc512x_psc_spi_transfer_setup() unconditionallyJarkko Nikula2015-09-171-5/+3
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core validates both bits_per_word and speed_hz transfer parameters and thus the if statement here is needless as it will always call the mpc512x_psc_spi_transfer_setup(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | spi: Add DSPI support for layerscape familyYuan Yao2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LS1043a and LS2080A in the Layerscape family also support DSPI, make DSPI selectable for these hardwares. Signed-off-by: Yuan Yao <yao.yuan@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | spi: spi-fsl-dspi: Remove duplicated register writeJarkko Nikula2015-09-171-3/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI core makes sure that transfer speed is always set so code here writes the same register with the same value twice. Code has been doing this from the beginning. This looks to me some sort of copy paste error so I'm removing the second write. If this is not the case we can bring it back with a comment. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'spi/topic/coldfire' and 'spi/topic/dw' into ↵Mark Brown2015-11-045-100/+53
|\ \ \ \ | | | | | | | | | | | | | | | spi-next
| | * | | spi: dw: replace magic constant by DW_SPI_DRAndy Shevchenko2015-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The offset 0x60 is the offset of the data register defined as DW_SPI_DR in the header file. Use it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | spi: dw: remove a NULL check when call ->remove()Andy Shevchenko2015-10-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all users aware about calling dw_spi_remove_host() with properly set parameter. Remove unneeded check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud