OSDN Git Service

spi-nor: intel-spi: Fix broken software sequencing codes
authorBin Meng <bmeng.cn@gmail.com>
Mon, 11 Sep 2017 09:41:53 +0000 (02:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:55 +0000 (08:40 +0000)
commitbb76fcebb9c9edf843581e44c6a0a60033f3a66f
tree3c5344c884a43f0bb35baa3f24aecbc6e20989ef
parenteb2499b394805094884601b85d209bb9a9d16384
spi-nor: intel-spi: Fix broken software sequencing codes

commit 9d63f17661e25fd28714dac94bdebc4ff5b75f09 upstream.

There are two bugs in current intel_spi_sw_cycle():

- The 'data byte count' field should be the number of bytes
  transferred minus 1
- SSFSTS_CTL is the offset from ispi->sregs, not ispi->base

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/intel-spi.c