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

Commit 38b03951 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: qcom: Add Bootloader timestamps to the boot_marker list"

parents b57c0b42 c58a7869
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -156,6 +156,25 @@ void destroy_marker(const char *name)
}
EXPORT_SYMBOL(destroy_marker);

static void set_bootloader_stats(void)
{
	if (IS_ERR_OR_NULL(boot_stats)) {
		pr_err("boot_marker: imem not initialized!\n");
		return;
	}

	_create_boot_marker("M - APPSBL Start - ",
		readl_relaxed(&boot_stats->bootloader_start));
	_create_boot_marker("M - APPSBL Kernel Load Start - ",
		readl_relaxed(&boot_stats->bootloader_load_kernel_start));
	_create_boot_marker("M - APPSBL Kernel Load End - ",
		readl_relaxed(&boot_stats->bootloader_load_kernel_end));
	_create_boot_marker("D - APPSBL Kernel Load Time - ",
		readl_relaxed(&boot_stats->bootloader_load_kernel));
	_create_boot_marker("M - APPSBL End - ",
		readl_relaxed(&boot_stats->bootloader_end));
}

static ssize_t bootkpi_reader(struct kobject *obj, struct kobj_attribute *attr,
		char *user_buffer)
{
@@ -357,6 +376,9 @@ static int __init boot_stats_init(void)
			pr_err("boot_stats: BootKPI init failed %d\n");
			return ret;
		}
#ifdef CONFIG_QGKI_MSM_BOOT_TIME_MARKER
		set_bootloader_stats();
#endif
	} else {
		iounmap(boot_stats);
		iounmap(mpm_counter_base);