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

Commit 1c056b5f authored by Hareesh Gundu's avatar Hareesh Gundu
Browse files

msm: kgsl: Add rgmu_init() for firmware loading



Add rgmu_init() to load firmware for RGMU
based targets.

Change-Id: I49d250db70b49e220ce4292e12b6cb852686e678
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent f8b00cea
Loading
Loading
Loading
Loading
+14 −1
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/clk-provider.h>
#include <linux/clk-provider.h>
@@ -404,6 +404,18 @@ static int rgmu_suspend(struct kgsl_device *device)
	return 0;
	return 0;
}
}


static int rgmu_init(struct kgsl_device *device)
{
	struct gmu_dev_ops *ops = GMU_DEVICE_OPS(device);
	int ret;

	ret = ops->load_firmware(device);
	if (ret)
		return ret;

	return 0;
}

/* To be called to power on both GPU and RGMU */
/* To be called to power on both GPU and RGMU */
static int rgmu_start(struct kgsl_device *device)
static int rgmu_start(struct kgsl_device *device)
{
{
@@ -470,6 +482,7 @@ static bool rgmu_regulator_isenabled(struct kgsl_device *device)
struct gmu_core_ops rgmu_ops = {
struct gmu_core_ops rgmu_ops = {
	.probe = rgmu_probe,
	.probe = rgmu_probe,
	.remove = rgmu_stop,
	.remove = rgmu_stop,
	.init = rgmu_init,
	.start = rgmu_start,
	.start = rgmu_start,
	.stop = rgmu_stop,
	.stop = rgmu_stop,
	.dcvs_set = rgmu_dcvs_set,
	.dcvs_set = rgmu_dcvs_set,