aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/atmel-quadspi.c
Commit message (Collapse)AuthorAgeFilesLines
...
* spi: atmel-quadspi: add support for named peripheral clockTudor Ambarus2019-02-061-15/+18
| | | | | | | | | | | | Naming clocks is a good practice. Keep supporting unnamed peripheral clock, to be backward compatible with old DTs. While here, rename clk to pclk, to indicate that it is a peripheral clock. Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: rework transfer macrosTudor Ambarus2019-02-061-9/+4
| | | | | | | | | | | | | | | | | Split the TFRTYP_TRSFR_ bitfields in 2: one bit encoding the mem/reg transfer type and one bit encoding the direction of the transfer (read/write). Remove NOP when setting read transfer type. Remove useless setting of write transfer type when op->data.dir == SPI_MEM_DATA_IN && !op->data.nbytes. QSPI_IFR_TFRTYP_TRSFR_WRITE is specific just to sama5d2 qspi, rename it to QSPI_IFR_SAMA5D2_WRITE_TRSFR. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: switch to SPDX license identifiersTudor Ambarus2019-02-061-12/+1
| | | | | | | | | Adopt the SPDX license identifiers to ease license compliance management. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: return appropriate error codeTudor Ambarus2019-02-061-2/+2
| | | | | | | | | Return -ENOTSUPP when atmel_qspi_find_mode() fails. Propagate the error in atmel_qspi_exec_op(). Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: remove unnecessary castTudor Ambarus2019-02-061-1/+1
| | | | | | | | The cast is done implicitly. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: fix naming schemeTudor Ambarus2019-02-061-8/+8
| | | | | | | | Let general names to core drivers. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: drop wrappers for iomem accessesTudor Ambarus2019-02-061-28/+17
| | | | | | | | | The wrappers hid that the accesses are relaxed. Drop them. Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: order header files inclusion alphabeticallyTudor Ambarus2019-02-061-5/+4
| | | | | | | | Cosmetic change, no functional change. Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: atmel-quadspi: cache MR value to avoid a write accessTudor Ambarus2019-02-061-1/+13
| | | | | | | | | | Set the controller by default in Serial Memory Mode (SMM) at probe. Cache Mode Register (MR) value to avoid write access when setting the controller in serial memory mode at exec_op(). Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* spi: Add QuadSPI driver for Atmel SAMA5D2Piotr Bugalski2018-11-071-0/+549
Kernel contains QSPI driver strongly tied to MTD and nor-flash memory. New spi-mem interface allows usage also other memory types, especially much larger NAND with SPI interface. This driver works as SPI controller and is not related to MTD, however can work with NAND-flash or other peripherals using spi-mem interface. Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Piotr Bugalski <[email protected]> Signed-off-by: Mark Brown <[email protected]>