disp: msm: dsi: create generic interface for read poll timeout

Creating a generic api that can be used with the driver
for read poll timeouts. This allows for easy overriding
of the function, if necessary.

Change-Id: I7bc5176ebabe782089b1a4d6e94c17ad3eb9ada4
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Michael Ru <mru@codeaurora.org>
这个提交包含在:
Nilaan Gunabalachandran
2020-07-17 12:47:44 -04:00
提交者 Michael Ru
父节点 f470ecf038
当前提交 f3c66e9c1b
修改 6 个文件,包含 21 行新增12 行删除

查看文件

@@ -13,6 +13,12 @@
#define DSI_R64(dsi_hw, off) readq_relaxed((dsi_hw)->base + (off))
#define DSI_W64(dsi_hw, off, val) writeq_relaxed((val), (dsi_hw)->base + (off))
#define DSI_READ_POLL_TIMEOUT(dsi_hw, off, val, cond, delay_us, timeout_us) \
readl_poll_timeout((dsi_hw)->base + (off), (val), (cond), (delay_us), (timeout_us))
#define DSI_READ_POLL_TIMEOUT_ATOMIC_GEN(base, index, off, val, cond, delay_us, timeout_us) \
readl_poll_timeout_atomic((base) + (off), (val), (cond), (delay_us), (timeout_us))
#define DSI_GEN_W32_DEBUG(base, index, offset, val) \
do {\
pr_debug("[DSI_%d][%s] - [0x%08x]\n", \
@@ -24,6 +30,9 @@
#define DSI_W32(dsi_hw, off, val) DSI_GEN_W32_DEBUG((dsi_hw)->base, \
(dsi_hw)->index, off, val)
#define DSI_READ_POLL_TIMEOUT_ATOMIC(dsi_hw, off, val, cond, delay_us, timeout_us) \
DSI_READ_POLL_TIMEOUT_ATOMIC_GEN((dsi_hw)->base, (dsi_hw)->index, off, val, cond, delay_us, timeout_us)
#define PLL_CALC_DATA(addr0, addr1, data0, data1) \
(((data1) << 24) | ((((addr1)/4) & 0xFF) << 16) | \
((data0) << 8) | (((addr0)/4) & 0xFF))