summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorSeungwon Jeon <tgih.jun@samsung.com>2013-06-26 22:39:26 +0530
committerJames Bottomley <JBottomley@Parallels.com>2013-06-28 12:57:52 -0700
commitb873a27538dff59e77c15eaf23bdf7e6be7d36e9 (patch)
tree82d201759567ac986a9012b5019df684c6d81bc1 /drivers/scsi/ufs/ufshcd.h
parent8b612fa23f13a51f5ee8eb318fe05eef63dc3de9 (diff)
downloadlinux-stable-b873a27538dff59e77c15eaf23bdf7e6be7d36e9.tar.gz
linux-stable-b873a27538dff59e77c15eaf23bdf7e6be7d36e9.tar.bz2
linux-stable-b873a27538dff59e77c15eaf23bdf7e6be7d36e9.zip
[SCSI] ufs: wrap the i/o access operations
Simplify operations with hiding mmio_base. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Tested-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Santosh Y <santoshsy@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r--drivers/scsi/ufs/ufshcd.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 6b99a42f5819..807dd2d740d4 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -186,6 +186,11 @@ struct ufs_hba {
u32 errors;
};
+#define ufshcd_writel(hba, val, reg) \
+ writel((val), (hba)->mmio_base + (reg))
+#define ufshcd_readl(hba, reg) \
+ readl((hba)->mmio_base + (reg))
+
int ufshcd_init(struct device *, struct ufs_hba ** , void __iomem * ,
unsigned int);
void ufshcd_remove(struct ufs_hba *);
@@ -196,7 +201,7 @@ void ufshcd_remove(struct ufs_hba *);
*/
static inline void ufshcd_hba_stop(struct ufs_hba *hba)
{
- writel(CONTROLLER_DISABLE, (hba->mmio_base + REG_CONTROLLER_ENABLE));
+ ufshcd_writel(hba, CONTROLLER_DISABLE, REG_CONTROLLER_ENABLE);
}
#endif /* End of Header */