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

Commit 701112bb authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Cleanup RBBM clock control defaults



Make and use the default value instead of stringing out
the code. Simplify the code to make it happier.

Change-Id: Ic5cc488668c6dde3fe53b5204eec98bb34f51927
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 1a467fcb
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -857,16 +857,9 @@
#define RBBM_BLOCK_ID_MARB_3           0x2b

/* RBBM_CLOCK_CTL default value */
#define A304_RBBM_CLOCK_CTL_DEFAULT   0xAAAAAAAA
#define A305_RBBM_CLOCK_CTL_DEFAULT   0xAAAAAAAA
#define A305C_RBBM_CLOCK_CTL_DEFAULT  0xAAAAAAAA
#define A306_RBBM_CLOCK_CTL_DEFAULT   0xAAAAAAAA
#define A306A_RBBM_CLOCK_CTL_DEFAULT  0xAAAAAAAA
#define A310_RBBM_CLOCK_CTL_DEFAULT   0xAAAAAAAA
#define A3XX_RBBM_CLOCK_CTL_DEFAULT   0xAAAAAAAA
#define A320_RBBM_CLOCK_CTL_DEFAULT   0xBFFFFFFF
#define A330_RBBM_CLOCK_CTL_DEFAULT   0xBFFCFFFF
#define A330v2_RBBM_CLOCK_CTL_DEFAULT 0xAAAAAAAA
#define A305B_RBBM_CLOCK_CTL_DEFAULT  0xAAAAAAAA

#define A330_RBBM_GPR0_CTL_DEFAULT    0x00000000
#define A330v2_RBBM_GPR0_CTL_DEFAULT  0x05515455
+0 −3
Original line number Diff line number Diff line
@@ -815,9 +815,6 @@ void adreno_shadermem_regread(struct kgsl_device *device,
						unsigned int offsetwords,
						unsigned int *value);

unsigned int adreno_a3xx_rbbm_clock_ctl_default(struct adreno_device
							*adreno_dev);

void adreno_snapshot(struct kgsl_device *device,
		struct kgsl_snapshot *snapshot,
		struct kgsl_context *context);
+4 −19
Original line number Diff line number Diff line
@@ -109,31 +109,16 @@ const unsigned int a3xx_cp_addr_regs[ADRENO_CP_ADDR_MAX] = {
				A3XX_SP_FS_OBJ_START_REG),
};

unsigned int adreno_a3xx_rbbm_clock_ctl_default(struct adreno_device
static unsigned int adreno_a3xx_rbbm_clock_ctl_default(struct adreno_device
							*adreno_dev)
{
	if (adreno_is_a304(adreno_dev))
		return A304_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a305(adreno_dev))
		return A305_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a305c(adreno_dev))
		return A305C_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a306(adreno_dev))
		return A306_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a306a(adreno_dev))
		return A306A_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a310(adreno_dev))
		return A310_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a320(adreno_dev))
	if (adreno_is_a320(adreno_dev))
		return A320_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a330v2(adreno_dev))
		return A330v2_RBBM_CLOCK_CTL_DEFAULT;
		return A3XX_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a330(adreno_dev))
		return A330_RBBM_CLOCK_CTL_DEFAULT;
	else if (adreno_is_a305b(adreno_dev))
		return A305B_RBBM_CLOCK_CTL_DEFAULT;

	BUG_ON(1);
	return A3XX_RBBM_CLOCK_CTL_DEFAULT;
}

static const unsigned int _a3xx_pwron_fixup_fs_instructions[] = {