linux_dsm_epyc7002/drivers/spi
Cyrille Pitchen 11f2764fe7 spi: atmel: add support to FIFOs
The latest SPI controllers embedded inside sama5d2x SoCs come with FIFOs.
When FIFOs are enabled, they can either work in SINGLE data mode or
MULTIPLE data mode. The selected mode depends on the configuration of the
SPI controller (see below).

In SINGLE data mode (or legacy mode), for a single I/O access, only one
data can be read from the Receive Data Register (RDR) or written into the
Transmit Data Register (TDR). On the other hand, in MULTIPLE data mode, up
to 4 data can be read from the RDR or up 2 data can be written into the
TDR in a single 32bit I/O access. So programmers should take good care of
the width of the I/O access to read/write the right number of data. The
exact number of read/written data depends on both the I/O access width and
the data width (from 8 up to 16 bits).

To enable the FIFO feature a "atmel,fifo-size" property must be set to
provide the maximum number of data (not bytes) the RX and TX FIFOs can
store. Hence a 32 data FIFO can always store up to 32 data unrelated with
the actual data width.

When FIFOs are enabled, the RX one is forced to operate in SINGLE data
mode because this driver configures the spi controller as a master. In
master mode only, the Received Data Register has an additionnal Peripheral
Chip Select field, which prevents us from reading more than a single data
at each register access.

Besides, the TX FIFO operates in MULTIPLE data mode. However, even when a
8bit data size is used, only two data by access could be written into the
Transmit Data Register. Indeed the first data has to be written into the
lowest 16 bits whereas the second data has to be written into the highest
16 bits of the TDR. When DMA transfers are used to send data, we don't
rework the transmit buffer to cope with this hardware limitation: the
additional copies required to prepare a new input buffer suited to both
the DMA controller and the spi controller would waste all the benefit of
the DMA transfer. Instead, the DMA controller is configured to write only
one data at time into the TDR.

In pio mode, two data are written in the TDR in a single access.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-16 13:08:19 +01:00
..
Kconfig Merge remote-tracking branches 'spi/topic/blackfin', 'spi/topic/cadence', 'spi/topic/dw' and 'spi/topic/err' into spi-next 2015-04-11 23:09:09 +01:00
Makefile Merge remote-tracking branches 'spi/topic/sirf', 'spi/topic/spidev', 'spi/topic/st-ssc' and 'spi/topic/ti-qspi' into spi-next 2015-02-08 11:16:58 +08:00
spi-adi-v3.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-altera.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ath79.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-atmel.c spi: atmel: add support to FIFOs 2015-06-16 13:08:19 +01:00
spi-au1550.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-bcm53xx.c Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/bcm2385', 'spi/topic/bcm2835', 'spi/topic/bcm53xx' and 'spi/topic/bitbang' into spi-next 2015-04-11 23:09:03 +01:00
spi-bcm53xx.h spi: bcm53xx: driver for SPI controller on Broadcom bcma SoC 2014-08-19 11:30:55 -05:00
spi-bcm63xx-hsspi.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bcm63xx.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-bcm2835.c spi: bcm2835: enabling polling mode for transfers shorter than 30us 2015-04-10 19:50:52 +01:00
spi-bfin5xx.c spi: spi-bfin5xx: Initialize cr_width in bfin_spi_pump_transfers() 2015-04-01 21:28:56 +01:00
spi-bfin-sport.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-bitbang-txrx.h spi: bitbang: only toggle bitchanges 2015-03-31 17:20:36 +01:00
spi-bitbang.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-butterfly.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-cadence.c Merge remote-tracking branches 'spi/topic/atmel', 'spi/topic/cadence', 'spi/topic/dw' and 'spi/topic/fsl-cpm' into spi-next 2014-12-08 12:17:12 +00:00
spi-clps711x.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-coldfire-qspi.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-davinci.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-dln2.c spi/dln2: simplify return flow for dln2_spi_transfer_setup and dln2_spi_enable 2015-01-06 17:02:50 +00:00
spi-dw-mid.c spi: dw-spi: Convert 16bit accesses to 32bit accesses 2015-03-17 12:27:09 +00:00
spi-dw-mmio.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-dw-pci.c spi: dw-pci: correct number of chip selects 2015-02-24 16:59:32 +09:00
spi-dw.c spi: dw: fix crash on setup stage 2015-03-25 11:54:40 -07:00
spi-dw.h spi: dw-spi: Convert 16bit accesses to 32bit accesses 2015-03-17 12:27:09 +00:00
spi-efm32.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ep93xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-falcon.c Merge remote-tracking branches 'spi/topic/falcon', 'spi/topic/fsf', 'spi/topic/fsl', 'spi/topic/fsl-dspi' and 'spi/topic/gpio' into spi-next 2015-02-08 11:16:46 +08:00
spi-fsl-cpm.c spi: fsl-(e)spi: Support compile as module 2015-01-06 17:03:34 +00:00
spi-fsl-cpm.h spi/spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment 2013-04-07 10:07:54 +01:00
spi-fsl-dspi.c Merge branch 'fix/fsl-dspi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-fsl-dspi 2015-04-07 11:54:40 +01:00
spi-fsl-espi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-fsl-lib.c spi: fsl-(e)spi: Support compile as module 2015-01-06 17:03:34 +00:00
spi-fsl-lib.h spi: fsl-(e)spi: Support compile as module 2015-01-06 17:03:34 +00:00
spi-fsl-spi.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-fsl-spi.h spi/spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC 2013-04-07 10:07:56 +01:00
spi-gpio.c Merge remote-tracking branches 'spi/topic/falcon', 'spi/topic/fsf', 'spi/topic/fsl', 'spi/topic/fsl-dspi' and 'spi/topic/gpio' into spi-next 2015-02-08 11:16:46 +08:00
spi-img-spfi.c Merge remote-tracking branch 'spi/fix/img-spfi' into spi-linus 2015-04-11 23:08:54 +01:00
spi-imx.c Merge remote-tracking branches 'spi/topic/fsl-cspi', 'spi/topic/fsl-dspi', 'spi/topic/imx' and 'spi/topic/of-id' into spi-next 2015-04-11 23:09:14 +01:00
spi-lm70llp.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-meson-spifc.c spi: meson: Constify struct regmap_config 2015-01-05 20:11:32 +00:00
spi-mpc52xx-psc.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-mpc52xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-mpc512x-psc.c spi: constify of_device_id array 2015-03-17 12:15:22 +00:00
spi-mxs.c spi: mxs: cleanup wait_for_completion return handling 2015-02-05 18:04:57 +00:00
spi-nuc900.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-oc-tiny.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-octeon.c spi: constify of_device_id array 2015-03-17 12:15:22 +00:00
spi-omap2-mcspi.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-omap-100k.c spi/omap100k: Convert to runtime PM 2015-03-17 12:25:48 +00:00
spi-omap-uwire.c spi: omap-uwire: Remove needless include asm/irq.h 2015-03-23 09:43:37 -07:00
spi-orion.c spi: orion: Add multiple chip select support to spi-orion 2015-01-16 12:38:54 +00:00
spi-pl022.c Merge remote-tracking branches 'spi/topic/omap-100k', 'spi/topic/omap-uwire', 'spi/topic/pl022', 'spi/topic/pm' and 'spi/topic/pxa2xx' into spi-next 2015-04-11 23:09:18 +01:00
spi-ppc4xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-pxa2xx-dma.c spi: pxa2xx: Cleanup register access macros 2014-12-22 20:17:23 +00:00
spi-pxa2xx-pci.c spi: spi-pxa2xx: SPI support for Intel Quark X1000 2014-11-26 18:07:45 +00:00
spi-pxa2xx-pxadma.c Merge remote-tracking branches 'spi/topic/orion', 'spi/topic/pxa2xx', 'spi/topic/qup', 'spi/topic/rockchip' and 'spi/topic/samsung' into spi-next 2015-02-08 11:16:55 +08:00
spi-pxa2xx.c spi: pxa2xx: missing break in pxa2xx_ssp_get_clk_div() 2015-03-31 15:05:43 +01:00
spi-pxa2xx.h spi: pxa2xx: Cleanup register access macros 2014-12-22 20:17:23 +00:00
spi-qup.c Merge remote-tracking branches 'spi/topic/qup', 'spi/topic/rockchip', 'spi/topic/rspi', 'spi/topic/s3c64xx' and 'spi/topic/sc18is602' into spi-next 2015-04-11 23:09:25 +01:00
spi-rockchip.c Merge remote-tracking branches 'spi/topic/qup', 'spi/topic/rockchip', 'spi/topic/rspi', 'spi/topic/s3c64xx' and 'spi/topic/sc18is602' into spi-next 2015-04-11 23:09:25 +01:00
spi-rspi.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-04-24 09:49:37 -07:00
spi-s3c24xx-fiq.h spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx-fiq.S spi: reorganize drivers 2011-06-06 01:16:30 -06:00
spi-s3c24xx.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-s3c64xx.c spi: s3c64xx: fix compiler warning in spi-s3c64xx 2015-02-24 10:37:39 +09:00
spi-sc18is602.c Merge remote-tracking branches 'spi/topic/qup', 'spi/topic/rockchip', 'spi/topic/rspi', 'spi/topic/s3c64xx' and 'spi/topic/sc18is602' into spi-next 2015-04-11 23:09:25 +01:00
spi-sh-hspi.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-sh-msiof.c spi: sh-msiof: remove slave_id settings for DMAEngine 2015-02-23 16:13:18 +05:30
spi-sh-sci.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sh.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-sirf.c spi: sirf: drop redundant sirf,marco-spi compatible string 2015-01-06 17:38:59 +00:00
spi-st-ssc4.c spi: constify of_device_id array 2015-03-17 12:15:22 +00:00
spi-sun4i.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-sun6i.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra20-sflash.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra20-slink.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-tegra114.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi-ti-qspi.c drivers: spi: ti-qspi: wait for busy bit clear before data write/read 2015-02-21 18:29:09 +09:00
spi-tle62x0.c spi: tle62x0: remove unnecessary OOM messages 2014-04-29 12:01:42 -07:00
spi-topcliff-pch.c spi: Remove FSF mailing addresses 2014-12-22 15:32:42 +00:00
spi-txx9.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
spi-xcomm.c Merge remote-tracking branches 'spi/topic/sunxi', 'spi/topic/tegra114', 'spi/topic/ti-qspi', 'spi/topic/ti-ssp', 'spi/topic/topcliff-pch', 'spi/topic/txx9', 'spi/topic/xcomm' and 'spi/topic/xfer' into spi-next 2014-03-30 00:51:41 +00:00
spi-xilinx.c spi/xilinx: Fix access invalid memory on xilinx_spi_tx 2015-02-02 12:17:19 +00:00
spi-xtensa-xtfpga.c spi: drop owner assignment from platform_drivers 2014-10-20 16:21:36 +02:00
spi.c Merge remote-tracking branches 'spi/topic/omap-100k', 'spi/topic/omap-uwire', 'spi/topic/pl022', 'spi/topic/pm' and 'spi/topic/pxa2xx' into spi-next 2015-04-11 23:09:18 +01:00
spidev.c spi: spidev: Warn loudly if instantiated from DT as "spidev" 2015-03-27 16:43:03 -07:00