summaryrefslogtreecommitdiffstats
path: root/drivers/spi
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'spi/fix/spidev' and 'spi/fix/xtfpga' into ↵Mark Brown2015-09-222-3/+4
|\ \ | | | | | | | | | spi-linus
| | * spi: xtensa-xtfpga: fix register endiannessMax Filippov2015-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | XTFPGA SPI controller has native endian registers. Fix register acessors so that they work in big-endian configurations. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| * | spi: spidev: fix possible NULL dereferenceSudip Mukherjee2015-09-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the last close we are freeing spidev if spidev->spi is NULL, but just before checking if spidev->spi is NULL we are dereferencing it. Lets add a check there to avoid the NULL dereference. Fixes: 9169051617df ("spi: spidev: Don't mangle max_speed_hz in underlying spi device") Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-----------. \ \ Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bcm2835', ↵Mark Brown2015-09-226-35/+34
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | 'spi/fix/doc', 'spi/fix/mediatek', 'spi/fix/meson', 'spi/fix/mtk' and 'spi/fix/pxa2xx' into spi-linus
| | | | | | | * | spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabledTan, Jui Nee2015-09-021-0/+4
| | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Intel Baytrail, there is case when interrupt handler get called, no SPI message is captured. The RX FIFO is indeed empty when RX timeout pending interrupt (SSSR_TINT) happens. Use the BIOS version where both HSUART and SPI are on the same IRQ. Both drivers are using IRQF_SHARED when calling the request_irq function. When running two separate and independent SPI and HSUART application that generate data traffic on both components, user will see messages like below on the console: pxa2xx-spi pxa2xx-spi.0: bad message state in interrupt handler This commit will fix this by first checking Receiver Time-out Interrupt, if it is disabled, ignore the request and return without servicing. Signed-off-by: Tan, Jui Nee <jui.nee.tan@intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| | | | | | * | spi: mediatek: fix spi cs polarity errorLeilk Liu2015-09-071-20/+7
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mediatek spi HW can't set cs inactive(keep cs high) directly. Instead, it supplies pause mode to do it indirectly. If driver unsets SPI_CMD_PAUSE_MODE in CMD_REG, it also needs to reset internal state machine to let cs inactive at once. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | spi: meson: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-191-0/+1
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi: mediatek: fix wrong error return value on probeJavier Martinez Canillas2015-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit adcbcfea15d62 ("spi: mediatek: fix spi clock usage error") added a new sel_clk but introduced bugs in the error paths since the wrong struct clk pointers are passed to PTR_ERR(). Fixes: adcbcfea15d62 ("spi: mediatek: fix spi clock usage error") Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi: mediatek: fix spi clock usage errorLeilk Liu2015-08-311-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spi clock manages flow: CLK_TOP_SYSPLL3_D2 ---> CLK_TOP_SPI_SEL ---> CLK_PERI_SPI0 (source clock) (clock mux) (clock gate) spi driver should choose source clock by clock mux, then enable clock gate. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi: mediatek: remove clk_disable_unprepare()Leilk Liu2015-08-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes clk_disable_unprepare() in mtk_spi_remove(). clk_disable_prepare/unprepare must be balance, spi-clk is disabled in mtk_spi_probe, so not needs to disable again. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | Merge tag 'v4.3-rc1' into spi-fix-docMark Brown2015-09-1635-223/+1917
| | | |\ \ \ | |_|_|/ / / |/| | | | | | | | | | | Linux 4.3-rc1
| | | * | | spi: Fix documentation of spi_alloc_master()Guenter Roeck2015-09-061-2/+1
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually, spi_master_put() after spi_alloc_master() must _not_ be followed by kfree(). The memory is already freed with the call to spi_master_put() through spi_master_class, which registers a release function. Calling both spi_master_put() and kfree() results in often nasty (and delayed) crashes elsewhere in the kernel, often in the networking stack. This reverts commit eb4af0f5349235df2e4a5057a72fc8962d00308a. Link to patch and concerns: https://lkml.org/lkml/2012/9/3/269 or http://lkml.iu.edu/hypermail/linux/kernel/1209.0/00790.html Alexey Klimov: This revert becomes valid after 94c69f765f1b4a658d96905ec59928e3e3e07e6a when spi-imx.c has been fixed and there is no need to call kfree() so comment for spi_alloc_master() should be fixed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| | * | | spi: bcm2835: BUG: fix wrong use of PAGE_MASKMartin Sperl2015-09-101-3/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug in the alignment checking of transfers, that results in DMA not being used for un-aligned transfers that do not cross page-boundries, which is valid. This is due to a missconception of the meaning PAGE_MASK when implementing that check originally - (PAGE_SIZE - 1) should have been used instead. Also fixes a copy/paste error. Reported-by: <robert@axium.co.nz> Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| * | | spi: atmel: remove warning when !CONFIG_PM_SLEEPAlexandre Belloni2015-09-101-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_PM is defined but not CONFIG_PM_SLEEP (this happens when CONFIG_SUSPEND is not defined), there is the following warning: drivers/spi/spi-atmel.c:1723:12: warning: ‘atmel_spi_suspend’ defined but not used [-Wunused-function] drivers/spi/spi-atmel.c:1741:12: warning: ‘atmel_spi_resume’ defined but not used [-Wunused-function] Enclose both atmel_spi_suspend and atmel_spi_resume in #ifdef CONFIG_PM_SLEEP/#endif to solve that. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/xcomm' and ↵Mark Brown2015-08-315-5/+499
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'spi/topic/xlp' into spi-next
| | | * | | spi/xlp: SPI controller driver for Netlogic XLP SoCsKamlakant Patel2015-08-283-0/+468
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SPI Master controller driver for the SPI interface on XLP8XX, XLP3XX, XLP2XX, XLP9XX and XLP5XX family of Netlogic XLP MIPS64 processors. Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | spi: xcomm: Export I2C module alias informationJavier Martinez Canillas2015-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | spi: xcomm: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-141-1/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | spi: ti-qspi: use 128 bit transfer mode where possibleVignesh R2015-08-201-4/+30
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TI QSPI has four 32 bit data regsiters which can be used to transfer 16 bytes of data at once. The register group QSPI_SPI_DATA_REG_3, QSPI_SPI_DATA_REG_2, QSPI_SPI_DATA_REG_1 and QSPI_SPI_DATA_REG is treated as a single 128-bit word for shifting data in and out. The bit at QSPI_SPI_DATA_REG_3[31] position is the first bit to be shifted out in case of 128 bit transfer mode. Therefore the first byte to be written to flash should be at QSPI_SPI_DATA_REG_3[31-25] position. Instead of writing 1 byte at a time when interacting with spi-nor flash, make use of all the four registers so that 16 bytes can be transferred in one go. This reduces number of register writes and Word Complete interrupts for a given transfer message size, thereby increasing the write performance. Without this patch the raw flash write speed is ~100KB/s, with this patch the write speed increases to ~400 kB/s on DRA74 EVM. Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'spi/topic/s3c64xx', 'spi/topic/sg', ↵Mark Brown2015-08-314-23/+193
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'spi/topic/sh-msiof', 'spi/topic/spidev' and 'spi/topic/stats' into spi-next
| | | | | * | | spi: expose spi_master and spi_device statistics via sysfsMartin Sperl2015-07-071-3/+165
| | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | per spi-master statistics accessible as: /sys/class/spi_master/spi*/statistics/* per spi-device statistics accessible via: /sys/class/spi_master/spi*/spi*.*/statistics/* The following statistics are exposed as separate "files" inside these directories: * messages number of spi_messages * transfers number of spi_transfers * bytes number of bytes transferred * bytes_rx number of bytes transmitted * bytes_tx number of bytes received * errors number of errors encounterd * timedout number of messages that have timed out * spi_async number of spi_messages submitted using spi_async * spi_sync number of spi_messages submitted using spi_sync * spi_sync_immediate number of spi_messages submitted using spi_sync, that are handled immediately without a context switch to the spi_pump worker-thread Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | spi: spidev: fix inconsistent indentingColin Ian King2015-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix inconsistent indenting in spidev_open, no functional change. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | spi: spidev: Fix typoFabio Estevam2015-07-161-1/+1
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the typo in "compatible". Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | spi: sh-msiof: Fix FIFO size to 64 word from 256 wordKoji Matsuoka2015-08-311-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upper limit of Tx/Rx FIFO size is 64 word by the specification of H/W. This patch corrects to 64 word from 256 word. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
| | | * | | spi: sh-msiof: Remove obsolete spi_r8a779x_msiof platform_device_id entriesGeert Uytterhoeven2015-07-071-5/+0
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy board support"), R-Car Gen2 SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | spi: Fix per-page mapping of unaligned vmalloc-ed bufferAndrew Gabbasov2015-07-071-3/+13
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spi_map_buf() processes mapping of vmalloc-ed buffers in a special way, making mapping of every page separately. However, if the buffer is not aligned to page boundary (e.g. sub-array in a vmalloc-ed array), it fills the scatter table with page-size unaligned pieces, that cross page boundaries. This is incorrect and can, for example, cause memory corruption and various crashes when working with ubifs on spi-nor chips (though those drivers are themselves buggy in that they should be providing DMAable memory to the SPI framework). Fix this by using proper scatter table size and intra-page buffer lengths, so that the whole buffer splits into separate scatter table entries on page boundaries. Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | spi: s3c64xx: print fifo size on probe.Michal Suchanek2015-07-281-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Printing the FIFO depth does not add much noise in the log and can be useful for debugging transfer issues. Signed-off-by: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'spi/topic/mtk', 'spi/topic/pxa2xx', ↵Mark Brown2015-08-319-26/+803
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | 'spi/topic/qspi', 'spi/topic/rockchip' and 'spi/topic/s3c24xx' into spi-next
| | | | | * | spi/s3c24xx: remove unnecessary memset of s3c24xx_spiAlexey Klimov2015-07-071-1/+0
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory for this struct is allocated by spi_alloc_master() using kzalloc() so it doesn't need to be set to 0 one more time. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | spi/rockchip: remove unnecessary memset of rockchip_spiAlexey Klimov2015-07-071-1/+0
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memory for struct rockchip_spi is allocated by spi_alloc_master() using kzalloc() so it doesn't need to be set to 0 one more time. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: rspi: Make qspi_set_send_trigger() return "unsigned int"Geert Uytterhoeven2015-07-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qspi_set_send_trigger() returns an unsigned value, so make it return "unsigned int". Update the loop variables qspi_trigger_transfer_out_int() to match the above. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | spi: rspi: Drop variable "error" in qspi_trigger_transfer_out_in()Geert Uytterhoeven2015-07-031-7/+6
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Just use "ret" instead, for consistency with other similar functions. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: spi-pxa2xx: Remove unused legacy null dma buffer and allocation for itJarkko Nikula2015-08-052-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove null_dma_buf variable and extra allocation for it. It is not needed since commit 6356437e65c2 ("spi: spi-pxa2xx: remove legacy PXA DMA bits"). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: pxa2xx: Add terminating entry for pxa2xx_spi_pci_compound_matchAxel Lin2015-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: spi-pxa2xx: Remove unused legacy PXA DMA API channel numbersJarkko Nikula2015-08-032-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These became unused by the commit 6356437e65c2 ("spi: spi-pxa2xx: remove legacy PXA DMA bits"). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: pxa2xx: Add support for Intel SunrisepointJarkko Nikula2015-07-311-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major difference in LPSS SPI between Intel Sunrisepoint PCH and earlier platforms is an integrated DMA (iDMA) engine. iDMA is an IP that is private for each LPSS host controller (UART/SPI/I2C). Other differences are private register space offset, a few private registers that are in different location and FIFO thresholds. Intel Sunrisepoint LPSS SPI and iDMA devices are probed and registered in MFD layer as platform devices. Here these compound devices are detected by matching against known PCI IDs. This allows us to share pxa2xx_spi_acpi_get_pdata() for setting up the platform data instead of duplicating it in MFD part. This patch adds configuration for Intel Sunrisepoint LPSS SPI, above detection and DMA filter function that picks the DMA channel only from an associated iDMA block. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | spi: spi-pxa2xx: Remove clk.h includeStephen Boyd2015-07-151-1/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clock provider drivers generally shouldn't include clk.h because it's the consumer API. Remove the include here because this is a provider driver. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: fix SPI_CMD_PAUSE_IE macro errorLeilk Liu2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | enable pause interrupt should use SPI_CMD_PAUSE_IE MACRO, so fix it. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: replace *_time nameLeilk Liu2015-08-251-12/+8
| | | | | | | | | | | | | | | | | | | | | This patch replaces *_time name in mtk_spi_prepare_transfer(). Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: add PM clk_prepare_enable fail flowLeilk Liu2015-08-251-2/+11
| | | | | | | | | | | | | | | | | | | | | This patch adds PM clk_prepare_enable fail flow. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: replace int with u32, delete TAB and define ↵Leilk Liu2015-08-251-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTK_SPI_PAUSE_INT_STATUS marco this patch replaces int with u32, deletes TAB, and defines MTK_SPI_PAUSE_INT_STATUS marco. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: add linux/io.h include fileLeilk Liu2015-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | mediatek spi driver uses readl/writel, so add linux/io.h, even so it's implicitly imported by spi/spi.h Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: use BIT() to instead of SPI_CMD_*_OFFSETLeilk Liu2015-08-201-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes SPI_CMD_*_OFFSET defines, and uses the BIT(x) defines instead. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: medaitek: revise quirks compatibility styleLeilk Liu2015-08-201-18/+7
| | | | | | | | | | | | | | | | | | | | | The quirks are true/false, so define these as bool. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: fix spi incorrect endian usageLeilk Liu2015-08-201-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | TX_ENDIAN/RX_ENDIAN bits define whether to reverse the endian order of the data DMA from/to memory. The endian order should keep the same with cpu endian. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardwareLeilk Liu2015-08-191-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | clock in prepare_hardware/unprepare_hardware is redundant with pm_runtime, so remove them. Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: Mediatek: fixup cpu_to_le32 incorrect usageLeilk Liu2015-08-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | writel() already does a cpu_to_le32 conversion, so remove cpu_to_le32(). Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: fix endian warningsLeilk Liu2015-08-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes endian warnings detected by sparse: - sparse: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] val got restricted __le32 [usertype] <noident> - sparse: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] val got restricted __le32 [usertype] <noident> Signed-off-by: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mt65xx: Fix module aliasAxel Lin2015-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Remove extra space and make the alias matches driver name. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: mediatek: mtk_spi_driver can be statickbuild test robot2015-08-071-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud