]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
spi: designware_spi: revisit FIFO size detection again
authorAxel Lin <axel.lin@ingics.com>
Thu, 26 Feb 2015 02:45:22 +0000 (10:45 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:35:13 +0000 (14:35 +0200)
commitc3768c0cbc7d4a2651205b708f67fb1ac4b066e7
tree767eb7c70c370dcf5d9a9820f32e3f78c51af76c
parent290562f9907dc2a3d6d7f3e3f22248e857057c15
spi: designware_spi: revisit FIFO size detection again

By specification the FIFO size would be in a range 2-256 bytes. From TX Level
prospective it means we can set threshold in the range 0-(FIFO size - 1) bytes.
Hence there are currently two issues:
  a) FIFO size 2 bytes is actually skipped since TX Level is 1 bit and could be
     either 0 or 1 byte;
  b) FIFO size is incorrectly decreased by 1 which already done by meaning of
     TX Level register.

Fixes: 501943696ea4 (spi: designware_spi: Fix detecting FIFO depth)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
drivers/spi/designware_spi.c