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>
This commit is contained in:
parent
31569bb450
commit
834913c4b7
1 changed files with 8 additions and 14 deletions
|
@ -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);
|
||||
gf_write_ptr(&dev->buffers->signalled_pipe_buffers,
|
||||
dev->base + PIPE_REG_SIGNAL_BUFFER,
|
||||
dev->base + PIPE_REG_SIGNAL_BUFFER_HIGH);
|
||||
|
||||
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);
|
||||
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->open_command_params,
|
||||
dev->base + PIPE_REG_OPEN_BUFFER,
|
||||
dev->base + PIPE_REG_OPEN_BUFFER_HIGH);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue