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

Commit 538903b0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-fg-gen3: Write to profile integrity bit before restarting FG"

parents 3b589642 9b88a302
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, 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
@@ -747,7 +747,7 @@ int fg_interleaved_mem_write(struct fg_chip *chip, u16 address, u8 offset,
}

#define MEM_GNT_WAIT_TIME_US	10000
#define MEM_GNT_RETRIES		20
#define MEM_GNT_RETRIES		50
static int fg_direct_mem_request(struct fg_chip *chip, bool request)
{
	int rc, ret, i = 0;
+8 −9
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, 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
@@ -2905,14 +2905,6 @@ static void profile_load_work(struct work_struct *work)
		goto out;
	}

	rc = __fg_restart(chip);
	if (rc < 0) {
		pr_err("Error in restarting FG, rc=%d\n", rc);
		goto out;
	}

	fg_dbg(chip, FG_STATUS, "SOC is ready\n");

	/* Set the profile integrity bit */
	val = HLOS_RESTART_BIT | PROFILE_LOAD_BIT;
	rc = fg_sram_write(chip, PROFILE_INTEGRITY_WORD,
@@ -2922,6 +2914,13 @@ static void profile_load_work(struct work_struct *work)
		goto out;
	}

	rc = __fg_restart(chip);
	if (rc < 0) {
		pr_err("Error in restarting FG, rc=%d\n", rc);
		goto out;
	}

	fg_dbg(chip, FG_STATUS, "SOC is ready\n");
done:
	rc = fg_bp_params_config(chip);
	if (rc < 0)