diff options
author | Yaniv Gardi <ygardi@codeaurora.org> | 2016-03-10 10:37:08 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-03-14 21:04:45 -0400 |
commit | 596585a285a41993f26efab686e1ef20fc16a04a (patch) | |
tree | 1c0d55d8dcdf89279b3ed260eb5f921bad2a3cfd /drivers/scsi/ufs/ufshcd.h | |
parent | f550c65b543b4d3fa55201084b1a16432b748365 (diff) |
scsi: ufs: verify hba controller hce reg value
Sometimes due to hw issues it takes some time to the
host controller register to update. In order to verify the register
has updated, a polling is done until its value is set.
In addition the functions ufshcd_hba_stop() and
ufshcd_wait_for_register() was updated with an additional input
parameter, indicating the timeout between reads will
be done by sleeping or spinning the cpu.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 9ae7f85b2a33..a6d35724ccdc 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h | |||
@@ -590,15 +590,9 @@ int ufshcd_alloc_host(struct device *, struct ufs_hba **); | |||
590 | void ufshcd_dealloc_host(struct ufs_hba *); | 590 | void ufshcd_dealloc_host(struct ufs_hba *); |
591 | int ufshcd_init(struct ufs_hba * , void __iomem * , unsigned int); | 591 | int ufshcd_init(struct ufs_hba * , void __iomem * , unsigned int); |
592 | void ufshcd_remove(struct ufs_hba *); | 592 | void ufshcd_remove(struct ufs_hba *); |
593 | 593 | int ufshcd_wait_for_register(struct ufs_hba *hba, u32 reg, u32 mask, | |
594 | /** | 594 | u32 val, unsigned long interval_us, |
595 | * ufshcd_hba_stop - Send controller to reset state | 595 | unsigned long timeout_ms, bool can_sleep); |
596 | * @hba: per adapter instance | ||
597 | */ | ||
598 | static inline void ufshcd_hba_stop(struct ufs_hba *hba) | ||
599 | { | ||
600 | ufshcd_writel(hba, CONTROLLER_DISABLE, REG_CONTROLLER_ENABLE); | ||
601 | } | ||
602 | 596 | ||
603 | static inline void check_upiu_size(void) | 597 | static inline void check_upiu_size(void) |
604 | { | 598 | { |