Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 834913c4 authored by Roman Kiryanov's avatar Roman Kiryanov Committed by Greg Kroah-Hartman
Browse files

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: default avatarRoman Kiryanov <rkir@google.com>
parent 31569bb4
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -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),
	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,
			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),
	gf_write_ptr(&dev->buffers->open_command_params,
		dev->base + PIPE_REG_OPEN_BUFFER,
		dev->base + PIPE_REG_OPEN_BUFFER_HIGH);
		writel((u32)(unsigned long)paddr,
			dev->base + PIPE_REG_OPEN_BUFFER);
	}

	return 0;
}