tegra_bootloader_debug: Register resume callbacks

1. Register resume_noirq handler for profiling the time when early
driver resume sequence is started. Since this driver is loaded after
boot, this should get called very early in the resume sequence.

2. Register PM notifier to know when resume is complete. This helps
in profiling the time when entire resume sequence is complete.

These 2 timestamps should approximately indicate the time it takes
for Linux to resume.

Adding this code in this driver removes dependency of providing this
information from some other driver.

Bug 4454722

Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Change-Id: I214eb4ff2808ecb87b828cb4556a2a00cc2d4545
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3047836
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062030
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Bharat Nihalani
2024-01-08 09:45:26 +00:00
committed by mobile promotions
parent 6a2c18b943
commit ed0204e0ae
2 changed files with 77 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/platform/tegra/tegra_bootloader_debug.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Device tree binding for NVIDIA Tegra Bootloader Debug
maintainers:
- Deepak Nibade <dnibade@nvidia.com>
description: |
The tegra_bootloader_debug driver provides infrastructure to profile Boot and Resume KPIs
properties:
compatible:
enum:
- nvidia,tegra_bl_debug
required:
- compatible
additionalProperties: false
examples:
- |
profiler_device {
compatible = "nvidia,tegra_bl_debug";
status = "okay";
};
...