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

Commit 7df1df99 authored by Hareesh Gundu's avatar Hareesh Gundu
Browse files

msm: kgsl: Get RGMU firmware version from register



The RGMU firmware writes the version information to
GMU general register. Read firmware version from
the register and store it to rgmu structure.

Change-Id: I1dcc8d7e606e486ba81702d824419b84f71b2c1f
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 4e009b46
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1026,6 +1026,7 @@
#define A6XX_GMU_HOST2GMU_INTR_INFO_1		0x1F99C
#define A6XX_GMU_HOST2GMU_INTR_INFO_2		0x1F99D
#define A6XX_GMU_HOST2GMU_INTR_INFO_3		0x1F99E
#define A6XX_GMU_GENERAL_0			0x1F9C5
#define A6XX_GMU_GENERAL_1			0x1F9C6
#define A6XX_GMU_GENERAL_6			0x1F9CB
#define A6XX_GMU_GENERAL_7			0x1F9CC
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -434,6 +434,9 @@ static int a6xx_rgmu_fw_start(struct kgsl_device *device,
		return -ETIMEDOUT;
	}

	/* Read the RGMU firmware version from registers */
	gmu_core_regread(device, A6XX_GMU_GENERAL_0, &rgmu->ver);

	return 0;
}

+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -25,6 +25,7 @@

/**
 * struct rgmu_device - rGMU device structure
 * @ver: RGMU firmware version
 * @reg_phys: RGMU CSR physical address
 * @reg_virt: RGMU CSR virtual address
 * @reg_len: RGMU CSR range
@@ -44,6 +45,7 @@
 * @fault_count: RGMU fault count
 */
struct rgmu_device {
	u32 ver;
	struct platform_device *pdev;
	unsigned long reg_phys;
	unsigned int reg_len;