summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorDolev Raviv <draviv@codeaurora.org>2014-09-25 15:32:36 +0300
committerChristoph Hellwig <hch@lst.de>2014-10-01 13:11:26 +0200
commite785060ea3a1c8e37a8bc1449c79e36bff2b5b13 (patch)
treecc6960cb31f5f470f3dde576246170f39144f718 /drivers/scsi/ufs/ufshcd.h
parent374a246e4ebda1fc55d537877bf2412e511ecc7b (diff)
downloadtalos-obmc-linux-e785060ea3a1c8e37a8bc1449c79e36bff2b5b13.tar.gz
talos-obmc-linux-e785060ea3a1c8e37a8bc1449c79e36bff2b5b13.zip
ufs: definitions for phy interface
- Adding some of the definitions missing in unipro.h, including power enumeration. - Read Modify Write Line helper function - Indication for the type of suspend Signed-off-by: Dolev Raviv <draviv@codeaurora.org> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r--drivers/scsi/ufs/ufshcd.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index d7fec869d590..58ecdff5065c 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -474,6 +474,7 @@ struct ufs_hba {
struct devfreq *devfreq;
struct ufs_clk_scaling clk_scaling;
+ bool is_sys_suspended;
};
/* Returns true if clocks can be gated. Otherwise false */
@@ -499,6 +500,23 @@ static inline bool ufshcd_can_autobkops_during_suspend(struct ufs_hba *hba)
#define ufshcd_readl(hba, reg) \
readl((hba)->mmio_base + (reg))
+/**
+ * ufshcd_rmwl - read modify write into a register
+ * @hba - per adapter instance
+ * @mask - mask to apply on read value
+ * @val - actual value to write
+ * @reg - register address
+ */
+static inline void ufshcd_rmwl(struct ufs_hba *hba, u32 mask, u32 val, u32 reg)
+{
+ u32 tmp;
+
+ tmp = ufshcd_readl(hba, reg);
+ tmp &= ~mask;
+ tmp |= (val & mask);
+ ufshcd_writel(hba, tmp, reg);
+}
+
int ufshcd_alloc_host(struct device *, struct ufs_hba **);
int ufshcd_init(struct ufs_hba * , void __iomem * , unsigned int);
void ufshcd_remove(struct ufs_hba *);
OpenPOWER on IntegriCloud