summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2018-04-30 18:04:11 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2018-05-02 18:49:28 +0000
commit834913c4b790f7bf04e7181337ade138702959e4 (patch)
treed17b11319b9cf7c7167f8dbee15ac7a60b747ce7
parent31569bb45018feb5a484c8d6b9d01ae03acbf73b (diff)
goldfish: pipe: ANDROID: Replace writel with gf_write_ptr
We have a function around a pair of writel to simplify 64-bit support. Bug: 72717639 bug: 66884503 Change-Id: Id23d23f6998e7be348646bb4ea9884f165c1149b Signed-off-by: Roman Kiryanov <rkir@google.com>
-rw-r--r--drivers/platform/goldfish/goldfish_pipe_v2.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c
index 64907d3ad83e..f8a4e47581fc 100644
--- a/drivers/platform/goldfish/goldfish_pipe_v2.c
+++ b/drivers/platform/goldfish/goldfish_pipe_v2.c
@@ -839,22 +839,16 @@ static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
dev->buffers = (struct goldfish_pipe_dev_buffers *)page;
/* Send the buffer addresses to the host */
- {
- u64 paddr = __pa(&dev->buffers->signalled_pipe_buffers);
-
- writel((u32)(unsigned long)(paddr >> 32),
- dev->base + PIPE_REG_SIGNAL_BUFFER_HIGH);
- writel((u32)(unsigned long)paddr,
- dev->base + PIPE_REG_SIGNAL_BUFFER);
- writel((u32)MAX_SIGNALLED_PIPES,
- dev->base + PIPE_REG_SIGNAL_BUFFER_COUNT);
-
- paddr = __pa(&dev->buffers->open_command_params);
- writel((u32)(unsigned long)(paddr >> 32),
- dev->base + PIPE_REG_OPEN_BUFFER_HIGH);
- writel((u32)(unsigned long)paddr,
- dev->base + PIPE_REG_OPEN_BUFFER);
- }
+ gf_write_ptr(&dev->buffers->signalled_pipe_buffers,
+ dev->base + PIPE_REG_SIGNAL_BUFFER,
+ dev->base + PIPE_REG_SIGNAL_BUFFER_HIGH);
+
+ writel((u32)MAX_SIGNALLED_PIPES,
+ dev->base + PIPE_REG_SIGNAL_BUFFER_COUNT);
+
+ gf_write_ptr(&dev->buffers->open_command_params,
+ dev->base + PIPE_REG_OPEN_BUFFER,
+ dev->base + PIPE_REG_OPEN_BUFFER_HIGH);
return 0;
}