summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-armada-3700.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'spi/topic/armada', 'spi/topic/ath79', ↵Mark Brown2017-02-191-8/+6
|\ \ | | | | | | | | | 'spi/topic/bcm-qspi' and 'spi/topic/bcm53xx' into spi-next
| * | spi: armada-3700: Remove spi_master_put in a3700_spi_remove()Wei Yongjun2017-02-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to spi_master_put() in a3700_spi_remove() is redundant since the master is registered using devm_spi_register_master() and no reference hold by using spi_master_get() in a3700_spi_remove(). This is detected by Coccinelle semantic patch. Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: armada-3700: Remove .owner field for driverWei Yongjun2017-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: armada-3700: Coding style fixesRomain Perier2016-12-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following warning are reported by checkpatch.pl: CHECK: Alignment should match open parenthesis +static void a3700_spi_transfer_setup(struct spi_device *spi, + struct spi_transfer *xfer) WARNING: Missing a blank line after declarations + u32 data = le32_to_cpu(val); + memcpy(a3700_spi->rx_buf, &data, 4); total: 0 errors, 1 warnings, 1 checks, 923 lines checked Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: armada-3700: Replaced raw values for nbits by the SPI macrosRomain Perier2016-12-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, function a3700_spi_pin_mode_set() configures the SPI transfer mode according to the value passed as second argument. This value is detected using the raw values from a switch case. This commit replaces these raw values by the corresponding macro constants in linux/spi/spi.h Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: armada-3700: Remove unnecessary conditionDan Carpenter2016-12-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We checked that "a3700_spi->wait_mask & cause" was set at the beginning of the function so we don't need to check again here. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Romain Perier <romain.perier@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | spi: armada-3700: Set mode bits correctlyDan Carpenter2016-12-161-1/+1
|/ / | | | | | | | | | | | | | | | | We set SPI_RX_DUAL twice instead of setting SPI_TX_DUAL. Fixes: 5762ab71eb24 ("spi: Add support for Armada 3700 SPI Controller") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Romain Perier <romain.perier@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | spi: armada-3700: fix unsigned compare than zero on irqColin Ian King2016-12-141-4/+5
|/ | | | | | | | | | | | spi->irq is an unsigned integer hence the check if status is less than zero has no effect. Fix this by replacing spi->irq with an int irq so the less than zero compare will correctly detect errors. Issue found with static analysis with CoverityScan, CID1388567 Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Romain Perier <romain.perier@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* spi: Add support for Armada 3700 SPI ControllerRomain Perier2016-12-081-0/+923
Marvell Armada 3700 SoC comprises an SPI Controller. This Controller supports up to 4 SPI slave devices, with dedicated chip selects,supports SPI mode 0/1/2 and 3, CPIO or Fifo mode with DMA transfers and different SPI transfer mode (Single, Dual or Quad). This commit adds basic driver support for FIFO mode. In this mode, dedicated registers are used to store the instruction, the address, the read mode and the data. Write and Read FIFO are used to store the outcoming or incoming data. The data FIFOs are accessible via DMA or by the CPU. Only the CPU is supported for now. Signed-off-by: Romain Perier <romain.perier@free-electrons.com> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud