arch/arm/mach-omap2/pm-debug.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-omap2/pm-debug.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-omap2/pm-debug.c- Extension
.c- Size
- 5137 bytes
- Lines
- 245
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/sched.hlinux/sched/clock.hlinux/clk.hlinux/err.hlinux/io.hlinux/module.hlinux/slab.hclock.hpowerdomain.hclockdomain.hsoc.hcm2xxx_3xxx.hprm2xxx_3xxx.hpm.hlinux/debugfs.hlinux/seq_file.h
Detected Declarations
function pm_dbg_update_timefunction clkdm_dbg_show_counterfunction pwrdm_dbg_show_counterfunction pwrdm_dbg_show_timerfunction pm_dbg_counters_showfunction pm_dbg_timers_showfunction pwrdm_suspend_getfunction pwrdm_suspend_setfunction pwrdms_setupfunction option_getfunction option_setfunction pm_dbg_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* OMAP Power Management debug routines
*
* Copyright (C) 2005 Texas Instruments, Inc.
* Copyright (C) 2006-2008 Nokia Corporation
*
* Written by:
* Richard Woodruff <r-woodruff2@ti.com>
* Tony Lindgren
* Juha Yrjola
* Amit Kucheria <amit.kucheria@nokia.com>
* Igor Stoppa <igor.stoppa@nokia.com>
* Jouni Hogander
*
* Based on pm.c for omap2
*/
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/sched/clock.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "clock.h"
#include "powerdomain.h"
#include "clockdomain.h"
#include "soc.h"
#include "cm2xxx_3xxx.h"
#include "prm2xxx_3xxx.h"
#include "pm.h"
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#include <linux/seq_file.h>
static int pm_dbg_init_done;
static int pm_dbg_init(void);
static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = {
"OFF",
"RET",
"INA",
"ON"
};
void pm_dbg_update_time(struct powerdomain *pwrdm, int prev)
{
s64 t;
if (!pm_dbg_init_done)
return ;
/* Update timer for previous state */
t = sched_clock();
pwrdm->state_timer[prev] += t - pwrdm->timer;
pwrdm->timer = t;
}
static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
{
struct seq_file *s = (struct seq_file *)user;
if (strcmp(clkdm->name, "emu_clkdm") == 0 ||
strcmp(clkdm->name, "wkup_clkdm") == 0 ||
strncmp(clkdm->name, "dpll", 4) == 0)
return 0;
seq_printf(s, "%s->%s (%d)\n", clkdm->name, clkdm->pwrdm.ptr->name,
clkdm->usecount);
return 0;
}
static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
{
struct seq_file *s = (struct seq_file *)user;
int i;
if (strcmp(pwrdm->name, "emu_pwrdm") == 0 ||
strcmp(pwrdm->name, "wkup_pwrdm") == 0 ||
strncmp(pwrdm->name, "dpll", 4) == 0)
return 0;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/sched.h`, `linux/sched/clock.h`, `linux/clk.h`, `linux/err.h`, `linux/io.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `function pm_dbg_update_time`, `function clkdm_dbg_show_counter`, `function pwrdm_dbg_show_counter`, `function pwrdm_dbg_show_timer`, `function pm_dbg_counters_show`, `function pm_dbg_timers_show`, `function pwrdm_suspend_get`, `function pwrdm_suspend_set`, `function pwrdms_setup`, `function option_get`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.