diff options
author | Michal Suchanek <hramrach@gmail.com> | 2015-12-02 05:38:21 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-01-05 11:33:54 -0500 |
commit | b541eef125fa3ae0df84572459af4e7084cb6343 (patch) | |
tree | b085c9d4299ec0cd7f16a8078ec7dbc27cc46086 | |
parent | 4acad4aae10d1fa79a075b38b5c73772c44f576c (diff) |
spi: fsl-espi: expose maximum transfer size limit
The fsl-espi hardware can trasfer at most 64K data so report teh
limitation.
Based on patch by Heiner Kallweit <hkallweit1@gmail.com>
CC: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index c27124a5ec8e..7fd6a4c009d2 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
@@ -643,6 +643,11 @@ static int fsl_espi_runtime_resume(struct device *dev) | |||
643 | } | 643 | } |
644 | #endif | 644 | #endif |
645 | 645 | ||
646 | static size_t fsl_espi_max_transfer_size(struct spi_device *spi) | ||
647 | { | ||
648 | return SPCOM_TRANLEN_MAX; | ||
649 | } | ||
650 | |||
646 | static struct spi_master * fsl_espi_probe(struct device *dev, | 651 | static struct spi_master * fsl_espi_probe(struct device *dev, |
647 | struct resource *mem, unsigned int irq) | 652 | struct resource *mem, unsigned int irq) |
648 | { | 653 | { |
@@ -670,6 +675,7 @@ static struct spi_master * fsl_espi_probe(struct device *dev, | |||
670 | master->cleanup = fsl_espi_cleanup; | 675 | master->cleanup = fsl_espi_cleanup; |
671 | master->transfer_one_message = fsl_espi_do_one_msg; | 676 | master->transfer_one_message = fsl_espi_do_one_msg; |
672 | master->auto_runtime_pm = true; | 677 | master->auto_runtime_pm = true; |
678 | master->max_transfer_size = fsl_espi_max_transfer_size; | ||
673 | 679 | ||
674 | mpc8xxx_spi = spi_master_get_devdata(master); | 680 | mpc8xxx_spi = spi_master_get_devdata(master); |
675 | 681 | ||