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

Commit e6e46ed8 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

soc: qcom: cx_ipeak: Add handling of client ID higher or equal to 10



Vote registers for client ID 10 and onwards are at offset 0x3000
from vote registers for client IDs 0 to 9. This change takes
care of this while calculating client vote register offset. This
is need to ensure CX Ipeak vote for client ID 10 and onwards are
set correctly.

Change-Id: Ie789c86cb2baad54f9c8dafb0061c7db6cb99664
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent d66d368d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#define TCSR_CXIP_LM_DANGER_OFFSET			0x24

#define CXIP_CLIENT_OFFSET				0x1000
#define CXIP_CLIENT10_OFFSET				0x3000

#define CXIP_POLL_TIMEOUT_US (50 * 1000)

struct cx_ipeak_client;
@@ -121,6 +123,9 @@ static struct cx_ipeak_client *cx_ipeak_register_v2(int client_id)
	for (i = 0; i <= client_id; i++)
		client_offset += CXIP_CLIENT_OFFSET;

	if (client_id >= 10)
		client_offset += CXIP_CLIENT10_OFFSET;

	reg_enable = readl_relaxed(device_ipeak.tcsr_vptr +
			TCSR_CXIP_LM_VOTE_FEATURE_ENABLE_OFFSET);
	reg_bypass = readl_relaxed(vptr + client_offset +