spi: img-spfi: Verify max spfi transfer length
authorSifan Naeem <sifan.naeem@imgtec.com>
Mon, 2 Mar 2015 16:06:46 +0000 (16:06 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 3 Mar 2015 14:26:34 +0000 (14:26 +0000)
commitf165ed63370cfcc3a459cbd855822559f375a538
tree317c7a3c358c80495ea7976204db3000d6c578d0
parentc517d838eb7d07bbe9507871fab3931deccff539
spi: img-spfi: Verify max spfi transfer length

Maximum transfer length supported by SPFI is 65535, this is limited
by the number of bits available in SPFI TSize register to represent
the transfer size.
For transfer requests larger than the maximum supported the driver
will return an invalid argument error.

Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-img-spfi.c