OSDN Git Service

scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC
authorWei Li <liwei213@huawei.com>
Thu, 8 Nov 2018 17:08:29 +0000 (09:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:10 +0000 (09:16 +0100)
commitf2e78c08e8442f0b9098edc0fa6ceae1b83520e1
tree83ecb245608f1751d1755a39cc7d99dd182f9092
parentc97a2a726cef389dd0f85f12cb8a3bddb5711d9c
scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC

[ Upstream commit 8e4829c6f7470722c1f5a1dc5769ebe09ef036d6 ]

Hynix ufs has deviations on hi36xx platform which will result in ufs bursts
transfer failures.

To fix the problem, the Hynix device must set the register
VS_DebugSaveConfigTime to 0x10, which will set time reference for
SaveConfigTime is 250 ns. The time reference for SaveConfigTime is 40 ns by
default.

This patch is necessary to boot on HiKey960 boards that use Hynix UFS chips
(H28U62301AMR model: hB8aL1).

Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Wei Li <liwei213@huawei.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
[jstultz: Forward ported from older code, slight tweak to commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/ufs/ufs-hisi.c
drivers/scsi/ufs/ufs_quirks.h
drivers/scsi/ufs/ufshcd.c